Skip to content

test(scatter): reproduce #1592 dynamic-address GM scatter deadlock in cube+vec mix scope#1627

Open
Little-oil wants to merge 1 commit into
hw-native-sys:mainfrom
Little-oil:issue-1592-mix-scatter-diagnostic
Open

test(scatter): reproduce #1592 dynamic-address GM scatter deadlock in cube+vec mix scope#1627
Little-oil wants to merge 1 commit into
hw-native-sys:mainfrom
Little-oil:issue-1592-mix-scatter-diagnostic

Conversation

@Little-oil

Copy link
Copy Markdown
Contributor

Summary

Adds a runtime regression repro for #1592 to tests/st/runtime/test_fused_matmul_scatter.py: a cube matmul fused with a per-row, block-table-indirected (dynamic-address) GM scatter in one CORE_GROUP mix scope, in both SplitMode.NONE and SplitMode.UP_DOWN.

Per the issue's isolation matrix, this dynamic-address WRITE on the vec side of a cube+vec mix scope compiles clean but deadlocks at runtime (507018), while the static-address WRITE (#1564, already in this file) runs. This PR adds the repro only — no fix yet — to confirm the behavior on a2a3 CI before committing to a fix.

New programs/cases (golden identical to the #1564 static variants — only the addressing mode differs):

  • FusedMatmulDynScatterProgram / …NoSplitProgram — scatter row read from a block table at runtime (cache_row = pl.read(block_table, [b]) * CACHE; the * CACHE keeps the offset index-typed so codegen is clean, matching the issue).
  • TestFusedMatmulDynScatter / TestFusedMatmulDynScatterNoSplit.

Why a repro-only PR

I grounded the diagnosis offline (generated the post-PTOAS aiv.cpp via --codegen-only --save-kernels). Findings:

So it is possible this minimal repro does not deadlock. CI on a2a3 is the decisive signal:

  • If it deadlocks (507018) → repro confirmed; proceed with the fix on this branch.
  • If it passes → enrich the repro toward the real models/deepseek/v4/decode_indexer_compressor.py shape (the gate(c_idx) guard + block-table-via-tile-load path).

Testing

  • Compiles clean through PTOAS offline (--codegen-only) for both NONE and UP_DOWN
  • a2a3 runtime result (this PR's purpose — awaiting CI)

Related

#1592

…s#1592

Add FusedMatmulDynScatterProgram + block-table helper: the scatter row
index is read from a GM block table (dynamic-address pto.tstore) on the
vec side of a cube+vec mix scope — the variant that compiles clean but
deadlocks at runtime (507018) per the hw-native-sys#1592 isolation matrix.
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Little-oil, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 minute and 37 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f0ad8e7-75d5-4eda-b78c-540244c4b5ac

📥 Commits

Reviewing files that changed from the base of the PR and between e851ba5 and 3f7016b.

📒 Files selected for processing (1)
  • tests/st/runtime/test_fused_matmul_scatter.py

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

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

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces new test cases and programs to address Issue #1592, which involves a fused matmul followed by a dynamic-address scatter operation where the row index is read from a block table. Specifically, it adds the _make_block_table helper, FusedMatmulDynScatterProgram, FusedMatmulDynScatterNoSplitProgram, and their corresponding test cases and test runners to verify behavior under both SplitMode.UP_DOWN and SplitMode.NONE. There are no review comments, so no additional feedback is provided.

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