Skip to content

[Test] [AMD] aiter: Run the HD128 ASM prefill test on gfx950 with a routed pool - #48438

Merged
michaelzhang-ai merged 2 commits into
sgl-project:mainfrom
siliangchen-amd:rocm-hd128-asm-test-pool
Nov 7, 2026
Merged

michaelzhang-ai merged 2 commits into
sgl-project:mainfrom
siliangchen-amd:rocm-hd128-asm-test-pool

Conversation

@siliangchen-amd

@siliangchen-amd siliangchen-amd commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

test/registered/amd/test_minimax_hd128_asm_prefill.py, added with the MiniMax-M3 HD128 ASM prefill in #41707, checks that route with an fp8 cache and non-unit KV scales. Its setUpClass skips on anything but gfx950, but the file is registered for stage-b-test-1-gpu-small-amd, which runs on MI300, so CI never runs it.

On gfx950 all three cases fail on main: the backend now reads the cache through token_to_kv_pool.layer_router (kv_layers), and the test's stand-in pool, a SimpleNamespace with only get_kv_buffer, has no router.

Modifications

  • test/registered/amd/test_minimax_hd128_asm_prefill.py: the stand-in pool is a small class with a PlainPoolRouter, like _FakeKVPool in test_aiter_fp8_kv_scales_paths.py, and the file is registered for stage-b-test-1-gpu-small-amd-mi35x, the gfx950 suite.

Nothing outside the test changes.

Accuracy Tests

One MI355X (gfx950). On main (854bf5a) the three cases fail with AttributeError: 'types.SimpleNamespace' object has no attribute 'layer_router'; with this change, on main at 61a3c7f, they pass (3 passed in 21.06s).

Speed Tests and Profiling

Test-only change; the MI35x suite gains the file's 45 s estimate.

Setup: the lmsysorg/sglang-rocm rocm720-mi35x image of 2026-11-03, with sglang from source and blake3 installed.

Checklist

Review and Merge Process

  1. Ping Merge Oncalls to start the process. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • Common commands include /tag-and-rerun-ci, /tag-run-ci-label, /rerun-failed-ci
  4. After green CI and required approvals, ask Merge Oncalls or people with Write permission to merge the PR.

CI States

Latest PR Test (Base): ✅ Run #42186051179
Latest PR Test (Extra): ❌ Run #42186051206
Latest PR Test (AMD ROCm 10): ❌ Run #42186051113

Tip

Base CI only covers the core cases, and its workload may not exercise your change. Use /rerun-test to run the tests your change touches, or copy this prompt for an agent:

Find the registered tests this PR affects and run them with /rerun-test, following https://github.com/sgl-project/sglang/blob/main/.agents/skills/rerun-test/SKILL.md

test_minimax_hd128_asm_prefill skips everywhere but gfx950, yet it was registered for the MI300 suite, so CI never
ran it. On gfx950 all three cases fail on main: the backend reads the cache through token_to_kv_pool.layer_router,
which the test's stand-in pool does not have. The test now builds its pool with a PlainPoolRouter and runs in the
MI35x suite.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@siliangchen-amd

Copy link
Copy Markdown
Contributor Author

@zijiecode could you take a look? The HD128 ASM prefill test you added in #41707 has been skipping in the MI300 suite, and on gfx950 it broke when the backend started reading the cache through layer_router; this gives its stand-in pool a router and moves it to the MI35x suite. Thanks!

@siliangchen-amd

Copy link
Copy Markdown
Contributor Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Nov 4, 2026
@zijiecode zijiecode assigned zijiecode and unassigned zijiecode Nov 4, 2026
@zijiecode
zijiecode self-requested a review November 4, 2026 19:40

@zijiecode zijiecode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up. The fix looks good to me.

@siliangchen-amd

Copy link
Copy Markdown
Contributor Author

@HaiShaw could you merge this when you have a moment? zijiecode has approved it and no check has failed; seven are still waiting for runners, among them stage-b-test-1-gpu-small-amd-mi35x, which now runs this test on gfx950. On an MI355X the three cases fail on main and pass with this change. Thanks!

# Conflicts:
#	test/registered/amd/test_minimax_hd128_asm_prefill.py
@siliangchen-amd

Copy link
Copy Markdown
Contributor Author

@HaiShaw a note on this PR: it now also fixes a red test on main. test/registered/amd/test_minimax_hd128_asm_prefill.py on main fakes token_to_kv_pool with a SimpleNamespace that has no layer_router, which aiter_backend.py now reads (line 4897). Since #48366 made the test run, test_first_chunk_reads_fp8_pool fails on stage-b-test-1-gpu-small-amd-mi35x with AttributeError: 'types.SimpleNamespace' object has no attribute 'layer_router', for example on #48536 (job). This PR's remaining diff is the fix: a _Pool that carries layer_router (PlainPoolRouter).

@Phoenix3334 Phoenix3334 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent CI evidence from #48404 supports this fix. I reviewed the test-only diff against the current KV routing API and the existing _FakeKVPool pattern in test_aiter_fp8_kv_scales_paths.py.

  • On #48404 head 64bbfed2, the AMD MI35x job failed in TestMiniMaxHD128AsmPrefill.test_first_chunk_reads_fp8_pool with exactly AttributeError: 'types.SimpleNamespace' object has no attribute 'layer_router'.
  • Traceback: AiterAttnBackend.forward_extend() -> self.kv_layers.read(layer.layer_id).kv() -> BaseAttnBackend.kv_layers -> token_to_kv_pool.layer_router. The failure happens before the attention kernel is exercised.
  • The test file is byte-identical on upstream main and #48404 (same blob), and #48404 changes only EPLB argument validation / recorder tests. This independently corroborates that the CI failure is upstream, not an EPLB regression.
  • The proposed _Pool supplies PlainPoolRouter(self, "full") and the key/value accessors needed by KVLayer.kv(), matching the established fake-pool pattern. Production code is untouched. The author's reported 3 passing cases on MI355X are consistent with this fix (I have not separately rerun them).

LGTM for the scoped test fix. This is currently blocking unrelated PRs, including #48404; merging #48438 should clear this specific upstream AMD failure, subject to the remaining CI checks.

Phoenix3334 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to my review with CI evidence from this PR's own run (head bca0c384):

  • Targeted AMD fix verified by CI: in the MI35x stage-B job, test/registered/amd/test_minimax_hd128_asm_prefill.py executed and passed (suite summary lists passed: true). The earlier missing-layer_router error is gone.
  • Why that AMD job is still red: the unrelated test/registered/kernels/ops/gemm/test_hc_mix_flydsl.py fails with ModuleNotFoundError: No module named 'aiter.ops.flydsl.hc_mix'. This is outside [Test] [AMD] aiter: Run the HD128 ASM prefill test on gfx950 with a routed pool #48438's test-only diff and needs a separate AITER/test-environment investigation.
  • Base CI red is a cascade: wait-for-base-b was waiting for 3 queued GPU jobs (10/13 finished) when GitHub's Actions jobs API returned HTTP 500 even after retries. Subsequent GPU jobs failed at check-pr-test-health (fail-fast), before running tests.
  • The head already contains the required MIN_BASE_SHA baseline; this particular failure is not the maintenance/rebase gate.

This strengthens the APPROVED assessment of the scoped PlainPoolRouter test fix, but is not a claim of fully green CI. I'd keep the fix isolated and handle the unrelated AITER import / CI infrastructure failures separately.

@BBuf BBuf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[BBuf Review Agent] LGTM. Let's wait for the MI35x CI.

@BBuf

BBuf commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

Copy link
Copy Markdown
Contributor

Follow-up from #48404: the EPLB recorder-mode validation fix has now been merged into main (merge commit d0c2bd97, Nov 7).

Before merging, its AMD MI35x stage-B job reproduced the same existing failure in test_minimax_hd128_asm_prefill.py: AttributeError: 'types.SimpleNamespace' object has no attribute 'layer_router'. This is unrelated to the EPLB argument-validation change in #48404.

The targeted test has already been shown passing with #48438's PlainPoolRouter-backed pool mock in this MI35x CI job. So #48438 remains the appropriate, separate fix for this upstream test failure. Thanks!

@michaelzhang-ai
michaelzhang-ai merged commit bf1aa1a into sgl-project:main Nov 7, 2026
234 of 253 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants