Skip to content

Commit c20863d

Browse files
committed
renaming rest
1 parent fdb607c commit c20863d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/quantization/test_quant_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ def test_workflow_e2e_numerics(self, config):
946946
assert sqnr >= 16.5, f"SQNR {sqnr} is too low"
947947

948948
@unittest.skipIf(not torch.cuda.is_available(), "Need CUDA available")
949-
def test_ao_per_module_config_default(self):
949+
def test_module_fqn_to_config_default(self):
950950
config1 = Int4WeightOnlyConfig(group_size=32)
951951
config2 = Int8WeightOnlyConfig()
952952
config = ModuleFqnToConfig({"_default": config1, "linear2": config2})
@@ -960,7 +960,7 @@ def test_ao_per_module_config_default(self):
960960
assert isinstance(model.linear2.weight._layout, PlainLayout)
961961

962962
@unittest.skipIf(not torch.cuda.is_available(), "Need CUDA available")
963-
def test_ao_per_module_config_module_name(self):
963+
def test_module_fqn_to_config_module_name(self):
964964
config1 = Int4WeightOnlyConfig(group_size=32)
965965
config2 = Int8WeightOnlyConfig()
966966
config = ModuleFqnToConfig({"linear1": config1, "linear2": config2})
@@ -974,7 +974,7 @@ def test_ao_per_module_config_module_name(self):
974974
assert isinstance(model.linear2.weight._layout, PlainLayout)
975975

976976
@unittest.skipIf(not TORCH_VERSION_AT_LEAST_2_6, "Need torch 2.6+")
977-
def test_ao_per_module_config_embedding_linear(self):
977+
def test_module_fqn_to_config_embedding_linear(self):
978978
weight_dtype = torch.int8
979979
granularity = PerGroup(8)
980980
mapping_type = MappingType.SYMMETRIC
@@ -1006,7 +1006,7 @@ def test_ao_per_module_config_embedding_linear(self):
10061006
assert isinstance(model.linear.weight, LinearActivationQuantizedTensor)
10071007

10081008
@unittest.skipIf(not torch.cuda.is_available(), "Need CUDA available")
1009-
def test_ao_per_module_config_skip(self):
1009+
def test_module_fqn_to_config_skip(self):
10101010
config1 = Int4WeightOnlyConfig(group_size=32)
10111011
config = ModuleFqnToConfig({"_default": config1, "linear2": None})
10121012
model = ToyLinearModel().cuda().to(dtype=torch.bfloat16)

torchao/quantization/quant_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def quantize_(
599599
if isinstance(config, ModuleFqnToConfig):
600600
_replace_with_custom_fn_if_matches_filter_with_name(
601601
model,
602-
_ao_per_module_config_handler,
602+
_module_fqn_to_config_handler,
603603
filter_fn,
604604
device=device,
605605
extra_args=(config,),
@@ -2024,7 +2024,7 @@ class ModuleFqnToConfig(AOBaseConfig):
20242024
)
20252025

20262026

2027-
def _ao_per_module_config_handler(
2027+
def _module_fqn_to_config_handler(
20282028
module: torch.nn.Module, module_fqn: str, config: ModuleFqnToConfig
20292029
):
20302030
c = None

0 commit comments

Comments
 (0)