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

Add back mistakenly deleted QAT BC import test #1417

Merged
merged 1 commit into from
Dec 13, 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
47 changes: 47 additions & 0 deletions test/quantization/test_qat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,53 @@ def test_qat_prototype_bc(self):
Just to make sure we can import all the old prototype paths.
We will remove this test in the near future when we actually break BC.
"""
from torchao.quantization.prototype.qat import ( # noqa: F401, F811, I001
disable_4w_fake_quant,
disable_8da4w_fake_quant,
enable_4w_fake_quant,
enable_8da4w_fake_quant,
ComposableQATQuantizer,
Int8DynActInt4WeightQATLinear,
Int4WeightOnlyEmbeddingQATQuantizer,
Int4WeightOnlyQATQuantizer,
Int8DynActInt4WeightQATQuantizer,
)
from torchao.quantization.prototype.qat._module_swap_api import ( # noqa: F401, F811
disable_4w_fake_quant_module_swap,
enable_4w_fake_quant_module_swap,
disable_8da4w_fake_quant_module_swap,
enable_8da4w_fake_quant_module_swap,
Int4WeightOnlyQATQuantizerModuleSwap,
Int8DynActInt4WeightQATQuantizerModuleSwap,
)
from torchao.quantization.prototype.qat.affine_fake_quantized_tensor import ( # noqa: F401, F811
AffineFakeQuantizedTensor,
to_affine_fake_quantized,
)
from torchao.quantization.prototype.qat.api import ( # noqa: F401, F811
ComposableQATQuantizer,
FakeQuantizeConfig,
)
from torchao.quantization.prototype.qat.embedding import ( # noqa: F401, F811
FakeQuantizedEmbedding,
Int4WeightOnlyEmbeddingQATQuantizer,
Int4WeightOnlyEmbedding,
Int4WeightOnlyQATEmbedding,
)
from torchao.quantization.prototype.qat.fake_quantizer import ( # noqa: F401, F811
FakeQuantizer,
)
from torchao.quantization.prototype.qat.linear import ( # noqa: F401, F811
disable_4w_fake_quant,
disable_8da4w_fake_quant,
enable_4w_fake_quant,
enable_8da4w_fake_quant,
FakeQuantizedLinear,
Int4WeightOnlyQATLinear,
Int4WeightOnlyQATQuantizer,
Int8DynActInt4WeightQATLinear,
Int8DynActInt4WeightQATQuantizer,
)


if __name__ == "__main__":
Expand Down
Loading