patch for block-wise quantization + pt2e (#144492)

Summary: As title, needed for enable qcom block-wise quantization kernel

Test Plan: local test

Differential Revision: D67985303

Pull Request resolved: https://github.com/pytorch/pytorch/pull/144492
Approved by: https://github.com/angelayi, https://github.com/billmguo
This commit is contained in:
Chen Lai
2025-01-17 04:10:46 +00:00
committed by PyTorch MergeBot
parent adbbcd87d9
commit 1d43b81508
4 changed files with 4 additions and 3 deletions

View File

@ -2546,14 +2546,12 @@ class TestQuantizePT2EAffineQuantization(PT2EQuantizationTestCase):
return self.linear(x)
node_occurrence = {
torch.ops.quant.quantize_affine: 2,
torch.ops.quant.quantize_affine: 1,
torch.ops.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,
]
example_inputs = (torch.randn(5, 128),)
self._test_quantizer(