Skip to content

[AMD] Fix DSpark draft bucket tests for the raw in-graph metadata default - #42230

Merged
HaiShaw merged 3 commits into
sgl-project:mainfrom
michaelzhang-ai:fix/amd-dsv4-bcg-test-raw-dspark-metadata
Oct 8, 2026
Merged

HaiShaw merged 3 commits into
sgl-project:mainfrom
michaelzhang-ai:fix/amd-dsv4-bcg-test-raw-dspark-metadata

Conversation

@michaelzhang-ai

@michaelzhang-ai michaelzhang-ai commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

#42014 turned on SGLANG_HIP_DSPARK_DRAFT_RAW_METADATA by default on HIP. Since then, a DSpark draft TARGET_VERIFY bucket holds DSV4RawDSparkDraftMetadata until init_forward_metadata_in_graph materializes it. Two tests in test/registered/amd/test_dsv4_hip_bcg_metadata.py still read core_attn_metadata straight after init_forward_metadata_out_graph, so stage-b-test-1-gpu-small-amd-mi35x now fails on every PR:

AttributeError: 'DSV4RawDSparkDraftMetadata' object has no attribute 'core_attn_metadata'

Example: #42061's mi35x job, where this file was 2/54 and the lane stopped there. #42014's own mi35x lane was cancelled, so CI did not catch the failure before merge.

Modifications

Test-only, test/registered/amd/test_dsv4_hip_bcg_metadata.py:

  • TestDsparkDraftBlockWindowHip: the block-window replay check now runs with the flag both off and on. On the raw path it asserts that the bucket holds DSV4RawDSparkDraftMetadata, calls init_forward_metadata_in_graph the way the graph would, and checks the same window rows, lengths and positions. This also adds coverage for the new default.
  • TestAiterSparseLengthFoldPerStep: patched to the eager path. That is the only path whose bucket keeps one core object across steps, which is the cache-reuse bug this test guards. The raw path builds a fresh core inside the graph on every forward.

No backend change.

Checklist

  • Still needed on current main: main's own stage-b-test-1-gpu-small-amd-mi35x shard 0 fails test_dsv4_hip_bcg_metadata.py with the same 'DSV4RawDSparkDraftMetadata' object has no attribute 'core_attn_metadata' (job)
  • CI: stage-a-test-1-gpu-small-amd passes 9/9 on this branch after merging main (job)
  • CI: stage-b-test-1-gpu-small-amd-mi35x passes test_dsv4_hip_bcg_metadata.py on this branch (job, shard 0, 24/27). A normal PR run stops shard 0 at its first failure, test_fused_kda_conv_recurrent_verify.py (file 5 of 27; this file is 18), so this is a continue_on_error dispatch of the stage on the PR head. The three files that still fail there — test_quark_mxfp4.py (fixed by [AMD] Recalibrate test_quark_mxfp4 GSM8K thresholds to observed MI355X noise #41980), test_fused_kda_conv_recurrent_verify.py and test_compact_attention_hip.py — are exactly the ones that fail on main's shard 0, which fails test_dsv4_hip_bcg_metadata.py on top of them.

CI States

Latest PR Test (Base): ❌ Run #37557039147
Latest PR Test (Extra): ❌ Run #37557038987
Latest PR Test (AMD ROCm 10): ❌ Run #37557039112

…ault

DSpark draft TARGET_VERIFY bucket now holds DSV4RawDSparkDraftMetadata until
init_forward_metadata_in_graph materializes it. The two tests that read
core_attn_metadata straight after init_forward_metadata_out_graph failed with
AttributeError on the mi35x small lane.

Run the block-window replay check on both the eager and raw paths, and pin the
length-fold test to the eager path, the only one whose bucket keeps a core
object across steps.

@kkHuang-amd kkHuang-amd 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.

LGTM

@HaiShaw
HaiShaw merged commit 5afe4d6 into sgl-project:main Oct 8, 2026
188 of 226 checks passed
@michaelzhang-ai
michaelzhang-ai deleted the fix/amd-dsv4-bcg-test-raw-dspark-metadata branch October 8, 2026 14:03
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.

3 participants