def check_layer_config(self):
        """Copy arguments from weight_config to built-in attributes."""
        if "wbits" in self.weight_config:
            tmp_weight_config = {}
            for name, module in self.model.named_modules():
                tmp_weight_config[name] = {}
                tmp_weight_config[name]["wbits"] = self.weight_config.get(
                    "wbits", self.wbits_default
                )
                tmp_weight_config[name]["group_size"] = self.weight_config.get(
                    "group_size", self.group_size_default
                )
                tmp_weight_config[name]["block_size"] = self.weight_config.get(
                    "block_size", self.group_size_default
                )
                tmp_weight_config[name]["percdamp"] = self.weight_config.get(
                    "pecdamp", self.percdamp_default
                )
                tmp_weight_config[name]["sym"] = self.weight_config.get(
                    "sym", self.sym_default
                )
                tmp_weight_config[name]["act_order"] = self.weight_config.get(
                    "act_order", self.act_order_default
                )
                tmp_weight_config[name]["static_groups"] = self.weight_config.get(
                    "static_groups", self.static_groups_default
                )
                tmp_weight_config[name]["true_sequential"] = self.weight_config.get(
                    "true_sequential", self.true_sequential_default
                )
                tmp_weight_config[name]["perchannel"] = self.weight_config.get(
                    "perchannel", self.perchannel_default
                )
                tmp_weight_config[name]["mse"] = self.weight_config.get(
                    "mse", self.mse_default
                )
            self.weight_config = tmp_weight_config
        else:
            for layer_name, config in self.weight_config.items():
                self.weight_config[layer_name]["wbits"] = config.get(
                    "wbits", self.wbits_default
                )
                self.weight_config[layer_name]["group_size"] = config.get(
                    "group_size", self.group_size_default
                )
                self.weight_config[layer_name]["block_size"] = config.get(
                    "block_size", self.group_size_default
                )
                self.weight_config[layer_name]["percdamp"] = config.get(
                    "pecdamp", self.percdamp_default
                )
                self.weight_config[layer_name]["sym"] = config.get(
                    "sym", self.sym_default
                )
                self.weight_config[layer_name]["act_order"] = config.get(
                    "act_order", self.act_order_default
                )
                self.weight_config[layer_name]["static_groups"] = config.get(
                    "static_groups", self.static_groups_default
                )
                self.weight_config[layer_name]["true_sequential"] = config.get(
                    "true_sequential", self.true_sequential_default
                )
                self.weight_config[layer_name]["perchannel"] = config.get(
                    "perchannel", self.perchannel_default
                )
                self.weight_config[layer_name]["mse"] = config.get(
                    "mse", self.mse_default
                )
Copy arguments from weight_config to built-in attributes.
intel_extension_for_pytorch/quantization/_GPTQ/gptq/gptq.py