Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update base_config attributes names in TPC #1051

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,15 @@ def clone_and_map_weights_attr_keys(self, layer_attrs_mapping: Union[Dict[str, s
"""
qc_options = copy.deepcopy(self)

for qc in qc_options.quantization_config_list:
# Extract the list of existing quantization configurations from qc_options

# Check if the base_config is already included in the quantization configuration list
# If not, add base_config to the list of configurations to update
cfgs_to_update = [cfg for cfg in qc_options.quantization_config_list]
if not any(qc_options.base_config is cfg for cfg in cfgs_to_update):
ofirgo marked this conversation as resolved.
Show resolved Hide resolved
cfgs_to_update.append(qc_options.base_config)

for qc in cfgs_to_update:
if layer_attrs_mapping is None:
qc.attr_weights_configs_mapping = {}
else:
Expand Down
Loading