furiosa.common package

Submodules

furiosa.common.error module

exception furiosa.common.error.FuriosaError(message: str)

Bases: Exception

General exception caused by Furiosa Runtime

furiosa.common.error.is_err(err: Union[ctypes.c_int, int]) bool
furiosa.common.error.is_ok(err: Union[ctypes.c_int, int]) bool

furiosa.common.native module

class furiosa.common.native.LogLevel(value)

Bases: enum.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_global_lib_path(libname: str)
furiosa.common.native.find_native_lib_path(libname: str)

Finding a native lib 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.

furiosa.common.native.find_native_libs(libname: str)

Finding a native lib according to the 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.

furiosa.common.native.find_user_lib_path(libname: str)

furiosa.common.utils module

class furiosa.common.utils.FuriosaVersionInfo(parts: Iterable[str])

Bases: object

furiosa.common.utils.eprint(*args, **kwargs)
furiosa.common.utils.get_sdk_version(module) furiosa.common.utils.FuriosaVersionInfo

Returns the git commit hash representing the current version of the application.

Module contents

Furiosa sdk tools