TrainingExtensions/torch/src/python/aimet_torch/quantsim_config/quantsim_config.py
def _set_op_type_configs(self, op_configs: OpTypeType):
        """
        Set configurations for all ops of specific types (third level of specificity in configuration file)
        :param op_configs: Dictionary containing configurations for ops of certain types
        """
        modified_tensor_quantizers = {}
        # Set op type configs for named modules
        for module, input_output_tensor_quantizers in self._named_modules_to_tensor_quantizers_dict.items():
            onnx_types = map_torch_types_to_onnx.get(type(module))
            if not onnx_types:
                continue
            for onnx_type in onnx_types:
                if onnx_type in op_configs:
                    op_config = op_configs[onnx_type]
                    self._set_config_for_module(input_output_tensor_quantizers, op_config, modified_tensor_quantizers,
                                                module)
        # Set op type configs for elementwise ops
        for op, input_output_tensor_quantizers in self._elementwise_op_to_tensor_quantizers_dict.items():
            if op.type in op_configs:
                op_config = op_configs[op.type]
                self._set_config_for_module(input_output_tensor_quantizers, op_config, modified_tensor_quantizers)

        Set configurations for all ops of specific types (third level of specificity in configuration file)
        :param op_configs: Dictionary containing configurations for ops of certain types
        
Set configurations for all ops of specific types (third level of specificity in configuration file)
Set configurations for all ops of specific types ( third level of specificity in configuration file )
def _set_op_type_configs(self, op_configs: OpTypeType):
        modified_tensor_quantizers = {}
        for module, input_output_tensor_quantizers in self._named_modules_to_tensor_quantizers_dict.items():
            onnx_types = map_torch_types_to_onnx.get(type(module))
            if not onnx_types:
                continue
            for onnx_type in onnx_types:
                if onnx_type in op_configs:
                    op_config = op_configs[onnx_type]
                    self._set_config_for_module(input_output_tensor_quantizers, op_config, modified_tensor_quantizers,
                                                module)
        for op, input_output_tensor_quantizers in self._elementwise_op_to_tensor_quantizers_dict.items():
            if op.type in op_configs:
                op_config = op_configs[op.type]
                self._set_config_for_module(input_output_tensor_quantizers, op_config, modified_tensor_quantizers)
def _set_op_type_configs ( self , op_configs : OpTypeType ) : modified_tensor_quantizers = { } for module , input_output_tensor_quantizers in self . _named_modules_to_tensor_quantizers_dict . items ( ) : onnx_types = map_torch_types_to_onnx . get ( type ( module ) ) if not onnx_types : continue for onnx_type in onnx_types : if onnx_type in op_configs : op_config = op_configs [ onnx_type ] self . _set_config_for_module ( input_output_tensor_quantizers , op_config , modified_tensor_quantizers , module ) for op , input_output_tensor_quantizers in self . _elementwise_op_to_tensor_quantizers_dict . items ( ) : if op . type in op_configs : op_config = op_configs [ op . type ] self . _set_config_for_module ( input_output_tensor_quantizers , op_config , modified_tensor_quantizers )
Set configurations for all ops of specific types (third level of specificity in configuration file)
Set configurations for all ops of specific types ( third level of specificity in configuration file )
"""
        Set configurations for all ops of specific types (third level of specificity in configuration file)
        :param op_configs: Dictionary containing configurations for ops of certain types
        """ # Set op type configs for named modules # Set op type configs for elementwise ops
self
op_configs
OpTypeType
Dictionary containing configurations for ops of certain types
Dictionary containing configurations for ops of certain types