quark.onnx.optimizations.convert_transforms_pipeline#

Module Contents#

Classes#

class quark.onnx.optimizations.convert_transforms_pipeline.ConvertQDQToQOPTransformsPipeline(configs: Optional[Dict[str, Any]] = None)#

Convert QDQ to QOperator transformations pipeline.

apply(model: onnx.ModelProto, candidate_nodes: Any, node_metadata: Any) Tuple[onnx.ModelProto, Any]#

Implement the transforms.

Parameters:

model – Onnx model to be quantized.

Returns:

Conveted onnx model.

class quark.onnx.optimizations.convert_transforms_pipeline.RemoveQDQTransformsPipeline(configs: Optional[Dict[str, Any]] = None)#

Remove QDQ pairs transformations pipeline.

apply(model: onnx.ModelProto, candidate_nodes: Any, node_metadata: Any) Tuple[onnx.ModelProto, Any]#

Implement the transforms.

Parameters:

model – Onnx model to be quantized.

Returns:

Conveted onnx model.