frontend.py File Reference

frontend.py File Reference#

Mobilint SDK qb Compiler: frontend.py File Reference
Mobilint SDK qb Compiler v1.1
MCS002-EN
frontend.py File Reference

Go to the source code of this file.

Classes

class  qbcompiler.frontend.Model_Dict
 Wrapper around the Mobilint compiler to support compilation and inference workflows. More...

Functions

 qbcompiler.frontend._resolve_deprecated_kwargs (*, calibration_config, optq_config, mod_config, equivalent_transformation_config, search_weight_scale_config, uint8_input_config, preprocessing_config, save_sample_config, **kwargs)
 Extract and resolve deprecated parameters from kwargs into modern equivalents.
 qbcompiler.frontend.mxq_compile (model, Union[str, List[str]] calib_data_path=_UNSET, int save_subgraph_type=0, output_subgraph_path="", Union[str, List[str]] save_path=_UNSET, backend="onnx", feed_dict=None, dynamic_axes=None, in_dformats=None, yolo_decode_include=False, use_custom_mask=False, exclude_first_subgraph=False, device=_UNSET, inference_scheme=_UNSET, use_random_calib=_UNSET, cpu_offload=_UNSET, optimize_option=_UNSET, buffer_mode=_UNSET, input_shape_dict=_UNSET, force_npu_input_reposition=_UNSET, force_npu_output_reposition=_UNSET, image_channels=_UNSET, split_blocks=_UNSET, split_parts=_UNSET, Optional[str] config_preset=None, Optional[CompileConfig] compile_config=None, Optional[ResourceManagementConfig] resource_management_config=None, Optional[CalibrationConfig] calibration_config=None, Optional[BitConfig] bit_config=None, Optional[LlmConfig] llm_config=None, Optional[OptqConfig] optq_config=None, Optional[ModConfig] mod_config=None, Optional[EquivalentTransformationConfig] equivalent_transformation_config=None, Optional[SearchWeightScaleConfig] search_weight_scale_config=None, Optional[SaveSampleConfig] save_sample_config=None, Optional[Uint8InputConfig] uint8_input_config=None, Optional[PreprocessingConfig] preprocessing_config=None, **kwargs)
 Compile a model into a Mobilint eXeCUtable (MXQ) package for execution on Mobilint NPUs.
 qbcompiler.frontend.mblt_compile (str|Any model, str mblt_save_path, backend="onnx", device="cpu", feed_dict=None, dynamic_axes=None, in_dformats=None, yolo_decode_include=False, cpu_offload=False, use_custom_mask=False, exclude_first_subgraph=False, **kwargs)
 Export a model to the Mobilint .mblt format without producing an MXQ package.
 qbcompiler.frontend.run_mblt_model (str path_to_mblt, bool save_all_outputs=True, Optional[str] inference_output_path=None, Optional[int] target_subgraph=None)

Variables

 qbcompiler.frontend._UNSET = object()

Function Documentation

◆ _resolve_deprecated_kwargs()

qbcompiler.frontend._resolve_deprecated_kwargs ( * ,
calibration_config,
optq_config,
mod_config,
equivalent_transformation_config,
search_weight_scale_config,
uint8_input_config,
preprocessing_config,
save_sample_config,
** kwargs )
protected

Extract and resolve deprecated parameters from kwargs into modern equivalents.

Mutates kwargs by popping consumed deprecated keys. Returns a tuple of resolved sub-config values.

Definition at line 36 of file frontend.py.

Variable Documentation

◆ _UNSET

qbcompiler.frontend._UNSET = object()
protected

Definition at line 32 of file frontend.py.