Skip to content

Commit 4d1d8a3

Browse files
authored
Fix module name extraction logic in quant_api.py
1 parent 7d91f11 commit 4d1d8a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchao/quantization/quant_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ def quantize_(
485485
or ("_default" in config.fqn_to_config and _is_linear(module))
486486
):
487487
module_name = (
488-
module_fqn.rsplit(".", 1) if "." in module_fqn else module_fqn
488+
module_fqn.rsplit(".", 1)[0] if "." in module_fqn else module_fqn
489489
)
490490
# this replaces inplace, so no need to reassign
491491
_fqn_to_config_handler(module, module_name, config, device)

0 commit comments

Comments
 (0)