[CI] Wire untethered test files into CI jobs (#49340)
Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
62d8db7c05
commit
94100b5915
@@ -147,8 +147,11 @@ def test_dense_norm_rope(num_tokens, num_heads, num_kv_heads):
|
||||
eps,
|
||||
).view(num_tokens, kvsz)
|
||||
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=1e-2, atol=1e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=1e-2, atol=1e-2)
|
||||
# The fused kernel keeps an fp32 intermediate across norm->rope, while the
|
||||
# reference materializes bf16 after the norm (the unfused boundary), so
|
||||
# rounding-boundary elements can differ by ~1 bf16 ulp.
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=2e-2, atol=2e-2)
|
||||
# V is untouched.
|
||||
torch.testing.assert_close(v_out, v_in, rtol=0, atol=0)
|
||||
|
||||
@@ -255,8 +258,11 @@ def test_sparse_full(num_tokens, block_size, kv_cache_dtype):
|
||||
ik_orig.view(num_tokens, 1, HEAD_DIM), ik_w, positions, cos_sin, eps
|
||||
).view(num_tokens, HEAD_DIM)
|
||||
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=1e-2, atol=1e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=1e-2, atol=1e-2)
|
||||
# The fused kernel keeps an fp32 intermediate across norm->rope, while the
|
||||
# reference materializes bf16 after the norm (the unfused boundary), so
|
||||
# rounding-boundary elements can differ by ~1 bf16 ulp.
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(index_q, iq_ref, rtol=1e-2, atol=1e-2)
|
||||
torch.testing.assert_close(index_k, ik_ref, rtol=1e-2, atol=1e-2)
|
||||
|
||||
@@ -376,8 +382,11 @@ def test_sparse_skip_index_branch(num_tokens, block_size, kv_cache_dtype):
|
||||
eps,
|
||||
).view(num_tokens, kvsz)
|
||||
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=1e-2, atol=1e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=1e-2, atol=1e-2)
|
||||
# The fused kernel keeps an fp32 intermediate across norm->rope, while the
|
||||
# reference materializes bf16 after the norm (the unfused boundary), so
|
||||
# rounding-boundary elements can differ by ~1 bf16 ulp.
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(v_out, v_in, rtol=0, atol=0)
|
||||
torch.testing.assert_close(index_q_out, index_q_in, rtol=0, atol=0)
|
||||
torch.testing.assert_close(index_k_out, index_k_in, rtol=0, atol=0)
|
||||
|
||||
Reference in New Issue
Block a user