chop.passes.transform.quantize

quantize_transform_pass

chop.passes.graph.transforms.quantize.quantize_transform_pass(graph, pass_args=None)[source]

Apply quantization transformation to the given graph.

Parameters:
  • graph (MaseGraph) – The input graph to be transformed.

  • pass_args (dict, optional) – Additional arguments for the transformation.

Returns:

The transformed graph.

Return type:

tuple

Raises:

ValueError – If the quantize “by” argument is unsupported.

  • pass_args
    • by -> str : different quantization schemes choose from [“type”, “name”, “regx_name”]

summarize_quantization_analysis_pass

chop.passes.graph.transforms.quantize.summarize_quantization_analysis_pass(graph, pass_args={'original_graph': None, 'save_dir': None}) None[source]

Summarizes the quantization analysis pass. Apply quantization transformation to the given graph.

Parameters:
  • graph (MaseGraph) – The input graph to be transformed.

  • pass_args (dict, optional) – Additional arguments for the transformation.

Returns:

The transformed MaseGraph.

Return type:

tuple