quark.onnx.optimizations.convert_transforms_pipeline#

Transformations pipeline for onnx model conversion.

Module Contents#

Classes#

ConvertQDQToQOPTransformsPipeline

Convert QDQ to QOperator transformations pipeline.

RemoveQDQTransformsPipeline

Remove QDQ pairs transformations pipeline.

class quark.onnx.optimizations.convert_transforms_pipeline.ConvertQDQToQOPTransformsPipeline#

Convert QDQ to QOperator transformations pipeline.

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

Implement the transforms.

Args:

model: Onnx model to be quantized.

Returns:

Conveted onnx model.

class quark.onnx.optimizations.convert_transforms_pipeline.RemoveQDQTransformsPipeline#

Remove QDQ pairs transformations pipeline.

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

Implement the transforms.

Args:

model: Onnx model to be quantized.

Returns:

Conveted onnx model.