Skip to content

test(spmd): retire the mixed-kernel xfail and cover documented flags - #2946

Open
georgebisbas wants to merge 1 commit into
hw-native-sys:mainfrom
georgebisbas:tests/spmd-suite-hardening
Open

georgebisbas wants to merge 1 commit into
hw-native-sys:mainfrom
georgebisbas:tests/spmd-suite-hardening

Conversation

@georgebisbas

Copy link
Copy Markdown
Contributor

What this PR offers

A tests-and-example-only hardening pass over the SPMD ST suite — no compiler or runtime changes (5 files, +247/−7). It retires a stale xfail that was misreporting a fixed bug, adds the first executed coverage for two documented pl.spmd kwargs, enables a long-commented ragged-context case, and fixes two hygiene items.

# Item Was Now
F1 test_spmd_mixed_kernel precision xfail (test_spmd.py) stale, non-strict marker retired — XPASSed 4/4 in sim (a2a3sim ×3, a5sim) and pypto#2887's device log recorded the same XPASS; now a normal assertion
F2 stale path in test_golden_writer.py comment pointed at tests/st/codegen/test_paged_attention_spmd.py (does not exist) corrected to the module's current home
F3 ragged context_len paged-attention case commented out enabled — the varctx path now has end-to-end coverage
F4a allow_early_resolve=True on pl.spmd parser + codegen UT only new executed ST: SPMDEarlyResolveProgram / test_spmd_early_resolve
F4b dumps=[...] on pl.spmd manifest test covered pl.submit only new grid-dump section in test_dump_tag.py: correctness + two --dump-args manifest assertions (single dispatch retained; roles cover input + inout)
F6 example Run: line (examples/models/09_paged_attention_spmd.py) missing added

Verification

Sim Docker (same commit, a2a3sim / a5sim):

Check Result
tests/st/runtime/cross_core/test_spmd.py 9 / 9 passed (both platforms)
same file, -k mixed_kernel, before the marker removal 4× XPASS (a2a3sim ×3, a5sim)
ragged test_paged_attention_spmd_ptoas[4-16-128-128-context_len3-32768] 1 passed
tests/st/runtime/framework_and_models/test_dump_tag.py full, --dump-args 11 passed
tests/ut/codegen/test_golden_writer.py 46 passed
ruff + pre-commit on the changed files clean

Developer verification — NPU (Ascend 910B2 / a2a3, via the shared task queue, at branch commit 16c07767):

Job Result
tests/st/runtime/cross_core/test_spmd.py (a2a3) 9 passed — test_spmd_mixed_kernel[a2a3] PASSED as a normal test (not xfail/XPASS/skipped); test_spmd_early_resolve[a2a3] PASSED
ragged case nodeid above (a2a3) 1 passed
tests/st/runtime/framework_and_models/test_dump_tag.py -k SpmdDumps --dump-args (a2a3) 3 passed — manifest: one task_id; roles input + inout

The only warning in the hardware run is the known attrs={"split": …} deprecation (F9 below) — recorded, not a failure. The branch touches no distributed/HCCL surface.

Notes for review

  • The test_spmd_mixed_kernel retirement is evidence-backed (sim XPASS ×4 + pypto#2887's device log) and was re-confirmed on hardware before this PR — a future need to re-xfail would itself be a finding.
  • test_spmd_early_resolve proves the flag survives lowering and does not change the computed result; it does not observe whether dispatch was actually staged early (that needs a swimlane / L2 record) — stated in the test docstring.
  • Out of scope, deliberately (tracked separately): F4c (optimizations=[pl.cross_core_slot(...)] on pl.spmd reaching the pipe-buffer sizing), F5 (example @pl.jit migration — own PR), F7 (behavioural sync_start test), F9 (corpus-wide attrs={"split": …} → pl.func_attr migration, 22 sites / 5 files).

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3459beb8-f1d5-4eae-97ef-f81dff12e47f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 94b5e9c6-348d-4ee2-9231-93dba32abb15

📥 Commits

Reviewing files that changed from the base of the PR and between 5452182 and 16c0776.

📒 Files selected for processing (5)
  • examples/models/09_paged_attention_spmd.py
  • tests/st/runtime/cross_core/test_spmd.py
  • tests/st/runtime/framework_and_models/test_dump_tag.py
  • tests/st/runtime/framework_and_models/test_paged_attention_spmd.py
  • tests/ut/codegen/test_golden_writer.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The changes add SPMD coverage for early resolve and selective dumps, remove an expected-failure marker, activate a paged-attention test case, and update the related example command and test-helper comment.

Changes

SPMD Early Resolve

Layer / File(s) Summary
Early-resolve test path
tests/st/runtime/cross_core/test_spmd.py
Adds a platform-parameterized four-block addition test with allow_early_resolve=True. Removes the expected-failure marker from the mixed-kernel SPMD test.

SPMD Selective Dump

Layer / File(s) Summary
SPMD selective-dump pipeline and checks
tests/st/runtime/framework_and_models/test_dump_tag.py
Adds a two-dispatch SPMD test that selects bindings in the first dispatch. Checks numerical correctness and, when applicable, verifies the manifest contains entries from one dispatch with input and inout roles.

Paged Attention SPMD

Layer / File(s) Summary
Paged-attention example and test case
tests/st/runtime/framework_and_models/test_paged_attention_spmd.py, examples/models/09_paged_attention_spmd.py, tests/ut/codegen/test_golden_writer.py
Enables the batch-4 variable-context test case, adds an a2a3sim example command, and updates the test-module path in a helper comment.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 16c07

This change adds test coverage and small documentation fixes without changing product behavior. No merge-blocking risk was found.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: retiring the mixed-kernel xfail and adding coverage for documented SPMD flags.
Description check ✅ Passed The description is detailed and directly explains the SPMD test, example, and hygiene changes in the pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit hops through four neat rows,
And checks the sums as each block goes.
It tags the scratch, then reads the flow,
While paged-attention tests now grow.
“The paths are clear,” it nibbles greens,
And bounds away through test routines.

Comment @coderabbitai help to get the list of available commands.

…ag surface

- retire the stale xfail on test_spmd_mixed_kernel: the case XPASSes on a2a3sim (x3) and a5sim, and pypto#2887's device log recorded the same XPASS
- add an allow_early_resolve=True SPMD dispatch ST case (documented on all three pl.spmd forms; previously parser/codegen coverage only)
- add grid-scope dumps= correctness + --dump-args manifest tests (the third selective-dump front-end, next to the dump_tag and submit ones)
- enable the ragged context_len paged-attention ST case (varctx path)
- fix a stale path in the golden-writer UT comment; add a Run: line to the SPMD example
@georgebisbas
georgebisbas force-pushed the tests/spmd-suite-hardening branch from 16c0776 to 6ff3aa1 Compare October 8, 2026 15:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant