Skip to content

Commit 2bd94bb

Browse files
committed
Update on "Remove unified.py (Quantizer and TwoStepQuantizer ABCs)"
Summary: Delete `torchao/quantization/unified.py` which defined the `Quantizer` and `TwoStepQuantizer` abstract base classes. These were trivial ABCs that only declared method signatures (`quantize`, `prepare`, `convert`) which all subclasses already implement. Remove the base class inheritance from all subclasses and clean up imports. Test Plan: pytest test/quantization/test_qat.py -x pytest test/quantization/test_quant_api.py -x [ghstack-poisoned]
2 parents 5970f6b + c8d7198 commit 2bd94bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/quantization/test_qat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
_replace_linear_8da4w,
3838
_replace_linear_int4,
3939
)
40+
from torchao.quantization.qat import TwoStepQuantizer
4041
from torchao.quantization.qat.api import (
4142
ComposableQATQuantizer,
4243
FromIntXQuantizationAwareTrainingConfig,
@@ -63,7 +64,6 @@
6364
Int4WeightOnlyQATLinear,
6465
Int8DynActInt4WeightQATLinear,
6566
)
66-
from torchao.quantization.qat.two_step_quantizer import TwoStepQuantizer
6767
from torchao.quantization.qat.utils import (
6868
_fake_quantize_per_channel_group,
6969
_fake_quantize_per_token,

0 commit comments

Comments
 (0)