Skip to content

Commit a349409

Browse files
committed
Revert "Add quant+sparse subclasses to torchao"
This reverts commit ada04bf.
1 parent ada04bf commit a349409

File tree

7 files changed

+0
-406
lines changed

7 files changed

+0
-406
lines changed

benchmark_sam.py

Lines changed: 0 additions & 95 deletions
This file was deleted.

torchao/quantization/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"apply_weight_only_int8_quant",
1717
"apply_dynamic_quant",
1818
"change_linear_weights_to_int8_dqtensors",
19-
"change_linear_weights_to_int8_dq_semi_structured_sparsetensors",
2019
"change_linear_weights_to_int8_woqtensors",
2120
"change_linear_weights_to_int4_woqtensors",
2221
"swap_conv2d_1x1_to_linear"

torchao/quantization/dynamic_quant_sparse.py

Lines changed: 0 additions & 166 deletions
This file was deleted.

torchao/quantization/quant_api.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from .subclass import (
2323
QuantizedLinearWeightBase,
2424
Int8DynamicallyQuantizedLinearWeight,
25-
Int8DynamicallyQuantizedSemiStructuredSparseLinearWeight,
2625
Int8WeightOnlyQuantizedLinearWeight,
2726
Int4WeightOnlyQuantizedLinearWeight,
2827
)
@@ -34,7 +33,6 @@
3433
"apply_weight_only_int8_quant",
3534
"apply_dynamic_quant",
3635
"change_linear_weights_to_int8_dqtensors",
37-
"change_linear_weights_to_int8_dq_semi_structured_sparsetensors",
3836
"change_linear_weights_to_int8_woqtensors",
3937
"change_linear_weights_to_int4_woqtensors",
4038
"swap_conv2d_1x1_to_linear"
@@ -155,17 +153,6 @@ def change_linear_weights_to_int4_woqtensors(model, **kwargs):
155153
filter_fn,
156154
)
157155

158-
159-
def change_linear_weights_to_int8_dq_semi_structured_sparsetensors(model, **kwargs):
160-
filter_fn = kwargs.pop("filter_fn", _is_linear)
161-
162-
_replace_with_custom_fn_if_matches_filter(
163-
model,
164-
_get_subclass_inserter(Int8DynamicallyQuantizedSemiStructuredSparseLinearWeight, **kwargs),
165-
filter_fn,
166-
)
167-
168-
169156
def swap_conv2d_1x1_to_linear(model, filter_fn=None):
170157
"""
171158
Changes all conv2d 1x1 modules to equivalent linear modules so that they can then be quantized.

0 commit comments

Comments
 (0)