Skip to content

Commit 926e2b8

Browse files
committed
Less forgiving atol in fp8 tests
1 parent 83089d0 commit 926e2b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/kernels/test_cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ def test_reshape_and_cache(
169169
cloned_value_cache[block_idx, :, :, block_offset] = value[i]
170170

171171
if kv_cache_dtype == "fp8_e5m2":
172-
assert torch.allclose(result_key_cache, cloned_key_cache, atol=0.01, rtol=0.1)
173-
assert torch.allclose(result_value_cache, cloned_value_cache, atol=0.01, rtol=0.1)
172+
assert torch.allclose(result_key_cache, cloned_key_cache, atol=0.001, rtol=0.1)
173+
assert torch.allclose(result_value_cache, cloned_value_cache, atol=0.001, rtol=0.1)
174174
else:
175175
assert torch.allclose(key_cache, cloned_key_cache)
176176
assert torch.allclose(value_cache, cloned_value_cache)
@@ -279,4 +279,4 @@ def test_fp8_conversion(
279279
converted_cache = torch.empty_like(cache)
280280
cache_ops.convert_fp8(cache_fp8, converted_cache)
281281

282-
assert torch.allclose(cache, converted_cache, atol=0.01, rtol=0.1)
282+
assert torch.allclose(cache, converted_cache, atol=0.001, rtol=0.1)

0 commit comments

Comments
 (0)