fix pt2e block wise quantization test (#147035)

Differential Revision: D69559217

https://github.com/pytorch/pytorch/pull/145941 breaks the unit test added for prepare pt2e + block wise quantization. Fixing

Pull Request resolved: https://github.com/pytorch/pytorch/pull/147035
Approved by: https://github.com/andrewor14
This commit is contained in:
Chen Lai
2025-02-13 19:44:56 +00:00
committed by PyTorch MergeBot
parent b0553cee6b
commit 2d3db4509a
2 changed files with 8 additions and 8 deletions

View File

@ -2545,14 +2545,14 @@ class TestQuantizePT2EAffineQuantization(PT2EQuantizationTestCase):
return self.linear(x)
node_occurrence = {
torch.ops.quant.quantize_affine: 2,
torch.ops.quant.dequantize_affine: 2,
torch.ops.pt2e_quant.quantize_affine: 2,
torch.ops.pt2e_quant.dequantize_affine: 2,
}
node_list = [
torch.ops.quant.quantize_affine,
torch.ops.quant.dequantize_affine,
torch.ops.quant.quantize_affine,
torch.ops.quant.dequantize_affine,
torch.ops.pt2e_quant.quantize_affine,
torch.ops.pt2e_quant.dequantize_affine,
torch.ops.pt2e_quant.quantize_affine,
torch.ops.pt2e_quant.dequantize_affine,
]
example_inputs = (torch.randn(5, 128),)
self._test_quantizer(