[Bug] Fix test flashmla for DSv4 (#45052)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-06-11 16:22:26 -04:00
committed by GitHub
parent c9340e6f35
commit 5a6c7b7ab5
@@ -29,8 +29,10 @@ def test_sparse_flashmla_metadata_smoke():
topk=topk,
is_fp8_kvcache=True,
)
assert tile_md.dtype == torch.int32
assert num_splits.dtype == torch.int32
assert isinstance(tile_md, fm.FlashMLASchedMeta)
assert tile_md.tile_scheduler_metadata is None
assert tile_md.num_splits is None
assert num_splits is None
def test_sparse_flashmla_decode_smoke():
@@ -116,7 +118,7 @@ def test_sparse_flashmla_prefill_smoke():
kv = torch.zeros((s_kv, h_kv, d_qk), dtype=torch.bfloat16, device=device)
indices = torch.zeros((s_q, h_kv, topk), dtype=torch.int32, device=device)
out, max_logits, lse = fm.flash_mla_sparse_prefill(q, kv, indices, 1.0, d_v)
out, max_logits, lse = fm.flash_mla_sparse_fwd(q, kv, indices, 1.0, d_v)
assert out.shape == (s_q, h_q, d_v)
assert max_logits.shape == (s_q, h_q)
assert lse.shape == (s_q, h_q)