From 6c2a682b59bdd1bfbdb809b664579586a96b3b95 Mon Sep 17 00:00:00 2001 From: Michael <13900043+michaelzhang-ai@users.noreply.github.com> Date: Mon, 12 Oct 2026 14:39:08 -0700 Subject: [PATCH] [AMD] Keep the FP4 varctx schedule test off AITER's 2048-row compile (#41793) --- .../ops/attention/test_fp4_indexer_hip.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/test/registered/kernels/ops/attention/test_fp4_indexer_hip.py b/test/registered/kernels/ops/attention/test_fp4_indexer_hip.py index 4d4559eb78..6b185a7db7 100644 --- a/test/registered/kernels/ops/attention/test_fp4_indexer_hip.py +++ b/test/registered/kernels/ops/attention/test_fp4_indexer_hip.py @@ -497,14 +497,25 @@ def test_decode_cta_count_stays_within_available_chunks( assert cta_count <= max(1024, num_queries * 4) -@pytest.mark.parametrize("num_queries", [1, 1536]) -def test_decode_schedule_matches_aiter_varctx_schedule(num_queries: int) -> None: +@pytest.mark.parametrize("num_queries", [1, 200]) +def test_decode_schedule_matches_aiter_varctx_schedule( + num_queries: int, monkeypatch: pytest.MonkeyPatch +) -> None: """The in-tree decode schedule writes AITER compute_varctx_schedule's cta_info rows and - split factor, including zero-length rows and prefix sums carried across row blocks.""" + split factor, including zero-length rows and prefix sums carried across row blocks. + + The row block is shrunk so 200 rows span four blocks. Crossing the production block + (1024) needs over a thousand rows, and AITER's reference kernel holds a [256, rows] + tile; at 2048 it spent ~9 minutes compiling on the ROCm 10 image.""" from aiter.ops.flydsl.kernels.mqa_logits.pa_mqa_logits_fp4 import ( compute_varctx_schedule, ) + monkeypatch.setattr( + "sglang.kernels.ops.attention.dsv4.fp4_indexer_schedule_hip._DECODE_ROW_BLOCK", + 64, + ) + torch.manual_seed(num_queries) max_seq_len = 65536 c4_seq_lens = torch.randint(