Repository navigation
[Test] [AMD] deepseek-v4.1: Fix the HIP breakable-graph unit tests for the default prefill context limit and the DSpark draft ring - #45507
Merged
HaiShaw merged 1 commit intoOct 22, 2026
Conversation
…t prefill context limit and the DSpark draft ring test_dsv41_bcg_hip.py: since sgl-project#43733 the HIP backend captures and replays the DeepSeek-V4.1 prefill graph at its default context limit, so build the eager reference and the expected page-table width at that limit. test_dsv4_hip_bcg_metadata.py: since sgl-project#44673 the DSpark draft SWA path reads swa_req_ring_size / swa_valid_from from the pool; give the mock pool the paged defaults (None).
bingxche
approved these changes
Oct 21, 2026
This was referenced Oct 22, 2026
maocheng23
pushed a commit
to maocheng23/sglang
that referenced
this pull request
Oct 23, 2026
Include the upstream lm_head shared-buffer precision fix (sgl-project#45855), AMD kernel import and graph fixture fixes (sgl-project#45676, sgl-project#45507), and NIXL device selection fix (sgl-project#45722). Preserve the auxiliary hidden-state capture diff unchanged.
This was referenced Oct 23, 2026
5 tasks
5 tasks done
Open
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Test-only fix for the two unit tests that keep
stage-b-test-1-gpu-small-amd-mi35xred on main.Why
Both partitions fail on every scheduled run since Oct 19, e.g. partition 0 and partition 1.
test_dsv41_bcg_hip.py:AssertionError: 2 != 1on the captured page-table width. Since [Perf] deepseek-v4.1: Replay the breakable prefill CUDA graph at any context length #43733 the HIP backend captures and replays the DeepSeek-V4.1 prefill graph atprefill_cuda_graph_default_max_seq_len(16K) when nomax_seq_lenis configured, instead of the bucket's own length. The page table is that limit clamped to thereq_to_tokenwidth (512 in the fixture), so 2 pages, not 1.test_dsv4_hip_bcg_metadata.py:AttributeError: 'types.SimpleNamespace' object has no attribute 'swa_req_ring_size'. Since [Fix] deepseek-v4.1: Keep the DSpark draft SWA out of the radix tree #44673,get_dspark_swa_page_indicesreadsswa_req_ring_sizeandswa_valid_fromfrom the KV pool, and the test's mock pool doesn't have them.Fix
test_dsv41_bcg_hip.py: take the limit frombackend._graph_metadata_max_seq_len(capture_batch), which is what capture and replay actually use. Build the eager reference at that limit and expectceil(min(limit, req_to_token width) / page_size)columns. This also turns on the existing limit branch (eager rebuild at the limit, overflow raises), which had no caller before.test_dsv4_hip_bcg_metadata.py: addswa_req_ring_size=Noneandswa_valid_from=Noneto the mock pool. These match the real pool's paged-SWA defaults.No library code changes.
Test plan
stage-b-test-1-gpu-small-amd-mi35xon rocm10 via dispatch: https://github.com/sgl-project/sglang/actions/runs/39541960302. Both partitions passed (31/31 and 32/32).test_dsv41_bcg_hip.pyran 1 test andtest_dsv4_hip_bcg_metadata.pyran 19 tests, all OK.CI States
Latest PR Test (Base): ❌ Run #39542002257
Latest PR Test (Extra): ❌ Run #39542002294
Latest PR Test (AMD ROCm 10): ❌ Run #39542002188