neural_compressor.adaptor.query
¶
Module Contents¶
Classes¶
Base class that defines Query Interface. |
- class neural_compressor.adaptor.query.QueryBackendCapability¶
Base class that defines Query Interface. Each adaption layer should implement the inherited class for specific backend on their own.
- abstract get_version()¶
Get the current backend’s version string.
- abstract get_precisions()¶
Get the supported low precisions, e.g [‘int8’, ‘bf16’]
- abstract get_op_types()¶
Get the op types for specific backend per low precision. e.g {‘2.3.0’: {‘int8’: [‘Conv2D’, ‘MatMuL’]}}
- abstract get_fuse_patterns()¶
Get the fusion patterns for specified op type for every specific precision
- abstract set_quantization_config(q_config)¶
Set the quantization config to backend. :param q_config: set the organized quantization configuration to backend. :type q_config: yaml content?
- abstract get_quantization_capability()¶
Get the quantization capability of low precision op types. e.g, granularity, scheme and etc.
- abstract get_mixed_precision_combination(unsupported_precisions)¶
Get the valid precision combination base on hardware and user’ config. e.g[‘fp32’, ‘bf16’, ‘int8’]