qubee.configs.compile_config.CompileConfig Class Reference

qubee.configs.compile_config.CompileConfig Class Reference#

Mobilint SDK qb Compiler: qubee.configs.compile_config.CompileConfig Class Reference
Mobilint SDK qb Compiler v0.11.0.1
MCS002-EN
qubee.configs.compile_config.CompileConfig Class Reference
Inheritance diagram for qubee.configs.compile_config.CompileConfig:

Public Member Functions

 __init__ (self, str|None calib_data_path, bool use_random_calib, str save_path, str model_nickname, str|None save_msgpack_name, str|None model_path, str inference_scheme, bool save_sample, bool cpu_offload, bool singlecore_compile, int optimize_option, str sample_dtype, dict|None preprocess_dict, int buffer_mode, str version, QuantConfig quant_config, bool optional=False)
 default_config (cls)
 check_valid_str_configs (self)
 to_dict (self)

Public Attributes

 calib_data_path
 save_path = save_path
 model_nickname = model_nickname
 save_msgpack_name = save_msgpack_name
 model_path = model_path
 inference_scheme = inference_scheme
 save_sample = save_sample
 cpu_offload = cpu_offload
 singlecore_compile = singlecore_compile
 optimize_option = optimize_option
 sample_dtype = sample_dtype
 preprocess_dict = preprocess_dict
 version = version
 quant_config = quant_config
 buffer_mode = buffer_mode
 calib_file = tempfile.NamedTemporaryFile(suffix=".txt")

Static Public Attributes

dict py_to_cpp_name
dict min_max_check = {"optimize_option": [0, None]}
list inference_scheme_types = ["single", "multi", "global", "global4", "global8"]
list sample_dtypes = ["float", "int8"]

Protected Member Functions

 _get_calibration_path (self, str calib_data_path, bool use_random_calib)

Detailed Description

Definition at line 14 of file compile_config.py.

Constructor & Destructor Documentation

◆ __init__()

qubee.configs.compile_config.CompileConfig.__init__ ( self,
str | None calib_data_path,
bool use_random_calib,
str save_path,
str model_nickname,
str | None save_msgpack_name,
str | None model_path,
str inference_scheme,
bool save_sample,
bool cpu_offload,
bool singlecore_compile,
int optimize_option,
str sample_dtype,
dict | None preprocess_dict,
int buffer_mode,
str version,
QuantConfig quant_config,
bool optional = False )

Definition at line 35 of file compile_config.py.

Member Function Documentation

◆ default_config()

qubee.configs.compile_config.CompileConfig.default_config ( cls)

Definition at line 78 of file compile_config.py.

◆ check_valid_str_configs()

qubee.configs.compile_config.CompileConfig.check_valid_str_configs ( self)

Definition at line 116 of file compile_config.py.

◆ to_dict()

qubee.configs.compile_config.CompileConfig.to_dict ( self)

Definition at line 132 of file compile_config.py.

◆ _get_calibration_path()

qubee.configs.compile_config.CompileConfig._get_calibration_path ( self,
str calib_data_path,
bool use_random_calib )
protected

Definition at line 146 of file compile_config.py.

Member Data Documentation

◆ py_to_cpp_name

dict qubee.configs.compile_config.CompileConfig.py_to_cpp_name
static
Initial value:
= {
"calib_data_path": "calibData",
"save_path": "savePath",
"model_nickname": "modelNickname",
"save_msgpack_name": "saveMsgpackName",
"model_path": "modelPath",
"inference_scheme": "inferenceScheme",
"save_sample": "saveSample",
"cpu_offload": "cpuOffload",
"singlecore_compile": "singlecoreCompile",
"optimize_option": "optimizeOption",
"sample_dtype": "sampleDtype",
"preprocess_dict": "preprocess",
"version": "version",
}

Definition at line 15 of file compile_config.py.

◆ min_max_check

dict qubee.configs.compile_config.CompileConfig.min_max_check = {"optimize_option": [0, None]}
static

Definition at line 30 of file compile_config.py.

◆ inference_scheme_types

list qubee.configs.compile_config.CompileConfig.inference_scheme_types = ["single", "multi", "global", "global4", "global8"]
static

Definition at line 31 of file compile_config.py.

◆ sample_dtypes

list qubee.configs.compile_config.CompileConfig.sample_dtypes = ["float", "int8"]
static

Definition at line 32 of file compile_config.py.

◆ calib_data_path

qubee.configs.compile_config.CompileConfig.calib_data_path
Initial value:
= self._get_calibration_path(
calib_data_path, use_random_calib
)

Definition at line 56 of file compile_config.py.

◆ save_path

qubee.configs.compile_config.CompileConfig.save_path = save_path

Definition at line 59 of file compile_config.py.

◆ model_nickname

qubee.configs.compile_config.CompileConfig.model_nickname = model_nickname

Definition at line 60 of file compile_config.py.

◆ save_msgpack_name

qubee.configs.compile_config.CompileConfig.save_msgpack_name = save_msgpack_name

Definition at line 61 of file compile_config.py.

◆ model_path

qubee.configs.compile_config.CompileConfig.model_path = model_path

Definition at line 62 of file compile_config.py.

◆ inference_scheme

qubee.configs.compile_config.CompileConfig.inference_scheme = inference_scheme

Definition at line 63 of file compile_config.py.

◆ save_sample

qubee.configs.compile_config.CompileConfig.save_sample = save_sample

Definition at line 64 of file compile_config.py.

◆ cpu_offload

qubee.configs.compile_config.CompileConfig.cpu_offload = cpu_offload

Definition at line 65 of file compile_config.py.

◆ singlecore_compile

qubee.configs.compile_config.CompileConfig.singlecore_compile = singlecore_compile

Definition at line 66 of file compile_config.py.

◆ optimize_option

qubee.configs.compile_config.CompileConfig.optimize_option = optimize_option

Definition at line 67 of file compile_config.py.

◆ sample_dtype

qubee.configs.compile_config.CompileConfig.sample_dtype = sample_dtype

Definition at line 68 of file compile_config.py.

◆ preprocess_dict

qubee.configs.compile_config.CompileConfig.preprocess_dict = preprocess_dict

Definition at line 69 of file compile_config.py.

◆ version

qubee.configs.compile_config.CompileConfig.version = version

Definition at line 70 of file compile_config.py.

◆ quant_config

qubee.configs.compile_config.CompileConfig.quant_config = quant_config

Definition at line 71 of file compile_config.py.

◆ buffer_mode

qubee.configs.compile_config.CompileConfig.buffer_mode = buffer_mode

Definition at line 72 of file compile_config.py.

◆ calib_file

qubee.configs.compile_config.CompileConfig.calib_file = tempfile.NamedTemporaryFile(suffix=".txt")

Definition at line 157 of file compile_config.py.


The documentation for this class was generated from the following file: