Skip to content

Commit 60eca6e

Browse files
committed
up
1 parent 5f3bfe7 commit 60eca6e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

torchao/experimental/tests/test_int8_dynamic_activation_intx_weight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def test_export_QDQLayout(self):
360360
self.assertTrue(torch.allclose(eager_results, exported_results))
361361

362362
expected_lines = [
363-
"torch.ops.torchao.choose_qparams_affine.default(input_1, 'ASYMMETRIC', [1, 512], torch.int8, None, None, None, torch.float32, torch.int32)",
363+
"torch.ops.torchao.choose_qparams_affine.default(input_1, 'ASYMMETRIC', [1, 512], torch.int8, None, None, None, torch.float32, torch.int8)",
364364
"torch.ops.torchao.quantize_affine.default(input_1, [1, 512], getitem, getitem_1, torch.int8)",
365365
"torch.ops.torchao.dequantize_affine.default(quantize_affine, [1, 512], getitem, getitem_1, torch.int8)",
366366
"torch.ops.torchao.dequantize_affine.default",

torchao/quantization/quant_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def _int8_asymm_per_token_quant(x: torch.Tensor) -> torch.Tensor:
569569
mapping_type = MappingType.ASYMMETRIC
570570
target_dtype = torch.int8
571571
scale_dtype = torch.float32
572-
zero_point_dtype = torch.int32
572+
zero_point_dtype = torch.int8
573573
if TORCH_VERSION_AT_LEAST_2_6:
574574
return to_affine_quantized_intx(
575575
x,

0 commit comments

Comments
 (0)