Skip to content

Commit b4351a7

Browse files
authored
Update test_dynamic_activation_lut.py (#2637)
* Update test_dynamic_activation_lut.py * Update test_int8_dynamic_activation_intx_weight.py
1 parent a8ca216 commit b4351a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/prototype/test_dynamic_activation_lut.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def test_parq_conversion(dtype, granularity, bit_width, lead_dim):
120120

121121
assert torch.allclose(parq_out, parq_with_dyn_quant_out, atol=1e-1, rtol=1e-1)
122122
if dtype == torch.float32:
123-
assert torch.allclose(lut_out, parq_with_dyn_quant_out, atol=1e-4, rtol=1e-4)
123+
assert torch.allclose(lut_out, parq_with_dyn_quant_out, atol=1e-3, rtol=1e-3)
124124
elif dtype == torch.bfloat16:
125125
assert torch.allclose(lut_out, parq_with_dyn_quant_out, atol=1e-2, rtol=1e-2)
126126
else:

torchao/experimental/tests/test_int8_dynamic_activation_intx_weight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_accuracy_aten(self):
221221
self._assert_close(result, expected_result)
222222

223223
def _assert_close(
224-
self, result, expected_result, mse_tol=1e-6, atol=1e-2, rtol=1e-5
224+
self, result, expected_result, mse_tol=1e-5, atol=5e-2, rtol=5e-5
225225
):
226226
mse_loss = torch.nn.functional.mse_loss(result, expected_result)
227227
self.assertTrue(

0 commit comments

Comments
 (0)