furiosa.common package
Subpackages
Submodules
furiosa.common.error module
furiosa.common.native module
- class furiosa.common.native.LogLevel(value)
Bases:
IntEnum
Python object correspondnig to nux_log_level_t in Nux C API
- ERROR = 1
- INFO = 3
- OFF = 0
- WARN = 2
- furiosa.common.native.find_native_lib_path(libname: str) str | None
Finding a native library path according to the following priority 1. If the environment variable ‘LD_LIBRARY_PATH’ is set, this function tries to find native library found from LD_LIBRARY_PATH. 2. Otherwise, it tries find the native library from global library paths, such as /usr/lib, /usr/local/lib. 3. If the library still cannot be founded, it returns None.
- furiosa.common.native.find_native_libs(libname: str, register_hook: ~typing.Callable = <function __register_common_capis>)
Finding a native library c interface according to the following priority 1. If the environment variable ‘LD_LIBRARY_PATH’ is set, this function tries to find native library found from LD_LIBRARY_PATH. 2. Otherwise, it tries to find the native library embedded in the python package. 3. If the embedded native library cannot be found, it tries find the native library from global library paths, such as /usr/lib, /usr/local/lib.
After loading C Library, it will call register_hook(ciface).
furiosa.common.thread module
furiosa.common.utils module
- furiosa.common.utils.eprint(*args, **kwargs)
- furiosa.common.utils.get_sdk_version(module) FuriosaVersionInfo | None
Returns the git commit hash representing the current version of the application.
- furiosa.common.utils.removeprefix(word: str, prefix: str) str
Python 3.9 removeprefix().
See https://docs.python.org/3/library/stdtypes.html#str.removeprefix
Module contents
Furiosa SDK common utilities
- furiosa.common.get_sdk_version(module) FuriosaVersionInfo | None
Returns the git commit hash representing the current version of the application.