Skip to content

Commit 0da65f8

Browse files
authored
Fix/quant test precision for Cuda (#2467)
* fix(tests): relax precision for test_int8_wo_quant_save_load on ROCm * fix(tests): relax precision for int8 wo quant save/load test
1 parent a5158bc commit 0da65f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/quantization/test_quant_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def api(model):
307307
res = m2(*example_inputs)
308308

309309
# TODO: figure out why ROCm has a larger error
310-
atol, rtol = (1e-2, 1e-2) if torch.version.hip else (0, 0)
310+
atol, rtol = (1e-2, 1e-2) if torch.version.hip else (1e-7, 1e-5)
311311
torch.testing.assert_close(ref, res.cpu(), atol=atol, rtol=rtol)
312312

313313
@unittest.skipIf(

0 commit comments

Comments
 (0)