diff --git a/fbgemm_gpu/test/quantize_ops_test.py b/fbgemm_gpu/test/quantize_ops_test.py index f0b82b29b..5f24f1632 100644 --- a/fbgemm_gpu/test/quantize_ops_test.py +++ b/fbgemm_gpu/test/quantize_ops_test.py @@ -118,7 +118,10 @@ def test_quantize_op( ncols_aligned = (ncols + 4 - 1) // 4 * 4 # compare quantized data np.testing.assert_allclose( - quantized_data_numpy[:, :ncols], reference[:, :ncols] + quantized_data_numpy[:, :ncols], + reference[:, :ncols], + # Allow 1 mantissa bit difference (LSB) + atol=1, ) # compare scales np.testing.assert_array_almost_equal(