afe.ir.sima_irο
Attributesο
Classesο
dict() -> new empty dictionary |
|
Module Contentsο
- class afe.ir.sima_ir.SiMaIRMetadata(relay_ir_name: str)[source]ο
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping objectβs
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class afe.ir.sima_ir.SiMaIR[source]ο
- Parameters:
operation β Contains the nodeβs functions
_attrs β Floating-point operator attributes. If the operator is quantized, it should be None.
calib_attrs β Calibration attributes
_quant_attrs β Quantized operator attributes. If the operator is not quantized, it should be None.
quant_config β Parameters that influence how the operator is quantized. This field is immutable.
backend β If this node is assigned to a backend by itself (not counting being part of a subgraph assigned to a backend), this is the assigned backend. Otherwise, this is Backend.NONE.
- calib_attrs: afe.ir.attributes.AwesomeCalibAttrs[source]ο
- quant_config: afe.core.configs.QuantizationConfigs[source]ο
- backend: afe.backends.Backend[source]ο
- property attrs: afe.ir.attributes.AwesomeAttributes | None[source]ο
- get_attrs() afe.ir.attributes.AwesomeAttributes | afe.ir.attributes.AwesomeQuantAttrBase [source]ο
- property quant_attrs: afe.ir.attributes.AwesomeQuantAttrBase | None[source]ο
- run(inputs: SiMaIRInputTypes, config: afe.core.configs.RunConfigs)[source]ο
- calibrate(inputs: SiMaIRInputTypes, config: afe.core.configs.RunConfigs)[source]ο
- quantize(inputs: Dict[afe.ir.defines.InputName, afe.ir.operations.QuantizationTensorData], placeholder_value: afe.ir.operations.QuantizationTensorData | None, quantize_attributes: bool, error_reporter: afe.ir.defines.NodeReporter | None = None) Tuple[afe.ir.operations.QuantizationTensorData, afe.ir.defines.InputsQuantCast] [source]ο
Select quantization scales of input and output tensors, and quantize this operation.
The input and output attributes are planned to be removed, and they should not be used in new code.
- Parameters:
inputs β Properties of the inputs. It has quantization scales of the input tensors and attributes of the nodes that calculate the inputs.
placeholder_value β If the node being quantized is a placeholder node, the properties of the placeholderβs input data. None otherwise.
quantize_attributes β If True, the operation will be quantized. If False, the operation will not be quantized. Either way, quantization scales will be selected.
error_reporter β Node reporter of the node to be quantized.
- Returns:
Properties of the nodeβs output and casts that should be applied to the nodeβs input. It has quantization scales of the output and attributes of this node.
- run_quant(inputs: SiMaIRInputTypes, config: afe.core.configs.RunConfigs)[source]ο
- class afe.ir.sima_ir.SiMaIRParamsDict[source]ο
- attrs: Type[afe.ir.attributes.AwesomeAttributes][source]ο
- quant_attrs: Type[afe.ir.attributes.AwesomeQuantAttrBase][source]ο
- afe.ir.sima_ir.NODE_DICT_OPERATORS: Dict[str, SiMaIRParamsDict][source]ο
- afe.ir.sima_ir.NODE_DICT_SPECIAL: Dict[str, SiMaIRParamsDict][source]ο
- afe.ir.sima_ir.NODE_DICT: Dict[str, SiMaIRParamsDict][source]ο
- afe.ir.sima_ir.ATTRS_NAME_DICT: Dict[str, Type[afe.ir.attributes.AwesomeAttributes]][source]ο