neural_compressor.common.base_config
Module Contents
Classes
|
|
The base config for all algorithm configs. |
|
The base config for all algorithm configs. |
Functions
|
Register config decorator. |
|
|
|
Register supported configs for specific framework. |
Attributes
|
- neural_compressor.common.base_config.register_config(framework_name: str, algo_name: str, priority: float | int = 0)[source]
Register config decorator.
The register the configuration classes for different algorithms within specific frameworks.
- Usage example:
@register_config(framework_name=FRAMEWORK_NAME, algo_name=ExampleAlgorithm, priority=100) class ExampleAlgorithmConfig:
# Configuration details for the ExampleAlgorithm
- Parameters:
framework_name – the framework name.
algo_name – the algorithm name.
priority – the priority of the configuration. A larger number indicates a higher priority, which will be tried first at the auto-tune stage. Defaults to 0.
- class neural_compressor.common.base_config.BaseConfig(white_list: List[neural_compressor.common.utils.OP_NAME_OR_MODULE_TYPE] | None = DEFAULT_WHITE_LIST)[source]
The base config for all algorithm configs.
- class neural_compressor.common.base_config.ComposableConfig(configs: List[BaseConfig])[source]
The base config for all algorithm configs.