メインコンテンツまでスキップ
バージョン: v2512

intelligence.acuirt.dataclasses

AcuiRTBaseConversionConfig Objects

@dataclass
class AcuiRTBaseConversionConfig()

Base configuration for AcuiRT model conversion.

Attributes:

  • rt_mode Optional[str] - The runtime mode for conversion (e.g., 'onnx', 'torch2trt').
  • auto bool - Whether to enable automatic conversion.
  • children Optional[Dict[str, "AcuiRTBaseConversionConfig"]] - Configuration for child modules.
  • input_shapes Optional[tuple] - Input shapes for the model.
  • input_args Optional[tuple] - Input arguments for the model.

AcuiRTBaseConversionReport Objects

@dataclass
class AcuiRTBaseConversionReport()

Base report for AcuiRT model conversion.

Attributes:

  • rt_mode Optional[str] - The runtime mode used for conversion (e.g., 'onnx', 'torch2trt').
  • children Optional[Dict[str, "AcuiRTBaseConversionReport"]] - Reports for child modules.
  • input_shapes Optional[tuple] - Input shapes used during conversion.
  • input_args Optional[tuple] - Input arguments used during conversion.
  • class_name Optional[Type[nn.Module]] - Class name of the converted module.
  • status str - Status of the conversion ('success', 'failed', etc.).
  • error Optional[str] - Error message if the conversion failed.
  • traceback Optional[str] - Traceback information if an error occurred.

AcuiRTONNXConversionInfo Objects

@dataclass
class AcuiRTONNXConversionInfo()

ONNX conversion specific information.

Attributes:

  • int8 bool - Whether INT8 quantization was used.
  • fp16 bool - Whether FP16 precision was used.
  • input_names Optional[List[str]] - Names of the model inputs. dynamic_axes (Optional[Dict[str, Dict[int, Union[str, Tuple[str, int, int]]]]): Dynamic axes information for ONNX export.

AcuiRTONNXConversionConfig Objects

@dataclass
class AcuiRTONNXConversionConfig(AcuiRTONNXConversionInfo,
AcuiRTBaseConversionConfig)

Configuration for ONNX model conversion. Inherits from AcuiRTONNXConversionInfo and AcuiRTBaseConversionConfig.

AcuiRTONNXConversionReport Objects

@dataclass
class AcuiRTONNXConversionReport(AcuiRTONNXConversionInfo,
AcuiRTBaseConversionReport)

Report for ONNX model conversion. Inherits from AcuiRTONNXConversionInfo and AcuiRTBaseConversionReport.

AcuiRTTorch2TRTConversionInfo Objects

@dataclass
class AcuiRTTorch2TRTConversionInfo()

Torch2TRT conversion specific information.

Attributes:

  • int8 bool - Whether INT8 quantization was used.
  • fp16 bool - Whether FP16 precision was used.
  • use_dla bool - Whether DLA was used for acceleration.

AcuiRTTorch2TRTConversionConfig Objects

@dataclass
class AcuiRTTorch2TRTConversionConfig(AcuiRTTorch2TRTConversionInfo,
AcuiRTBaseConversionConfig)

Configuration for Torch2TRT model conversion. Inherits from AcuiRTTorch2TRTConversionInfo and AcuiRTBaseConversionConfig.

AcuiRTTorch2TRTConversionReport Objects

@dataclass
class AcuiRTTorch2TRTConversionReport(AcuiRTTorch2TRTConversionInfo,
AcuiRTBaseConversionReport)

Report for Torch2TRT model conversion. Inherits from AcuiRTTorch2TRTConversionInfo and AcuiRTBaseConversionReport.

AcuiRTPerformanceReport Objects

@dataclass
class AcuiRTPerformanceReport()

Report containing performance metrics.

Attributes:

  • accuracy Dict[str, Real] - Dictionary of accuracy metrics.
  • latency np.timedelta64 - Measured latency.

from_dict

def from_dict(input: dict)

Converts a dictionary to an AcuiRTBaseConversionReport or AcuiRTBaseConversionConfig object.

Arguments:

  • input dict - Input dictionary to convert.

Returns:

Union[AcuiRTBaseConversionReport, AcuiRTBaseConversionConfig]: Converted object based on the input dictionary.

AcuiRTWorkFlowReport Objects

@dataclass
class AcuiRTWorkFlowReport()

Report for the AcuiRT conversion workflow.

Attributes:

  • performance AcuiRTPerformanceReport - Performance report of the converted model.
  • non_converted_performance Optional[AcuiRTPerformanceReport] - Performance report of the original model.
  • conversion_result AcuiRTBaseConversionReport - Conversion report.
  • profile torch.profiler.profile - Profiling information.
  • conversion_rate Tuple[int, int] - Conversion rate of the model. Both converted and total include non-leaf nn.Module (converted, total)
  • num_modules int - Number of modules in the model.