Skip to content

feat(rocSHMEM): audit rocSHMEM hand-written GCN assembly for XNACK-Replay compliance, #AIROCSHMEM-533 - #13747

Merged
amirsojoodi merged 4 commits into
developfrom
users/asojoodi/rocshmem-fix-xnack-replay
Oct 26, 2026
Merged

amirsojoodi merged 4 commits into
developfrom
users/asojoodi/rocshmem-fix-xnack-replay

Conversation

@amirsojoodi

@amirsojoodi amirsojoodi commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Compiler-generated code handles the required hazard avoidance automatically, but for hand-written inline assembly the programmer is responsible to follow the XNACK-Replay rules (group semantics, not clobbering source registers of in-flight VMEM/SMEM translations, correct wait instructions, mode-specific hazards for single- vs multi-group REPLAY_MODE).

Details

Issue Tracking

JIRA ID: AIROCSHMEM-533

Copilot AI balanced review requested due to automatic review settings October 19, 2026 15:43
@amirsojoodi
amirsojoodi requested a review from a team as a code owner October 19, 2026 15:43
@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/rocshmem/src/assembly.hpp; no test file found
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

Copilot AI 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.

🟡 Changes recommended

The replay-wait guard excludes gfx1250-strict, leaving its inline stores vulnerable to premature source-register reuse.

1 open issue
What changed in this PR

Updates rocSHMEM’s hand-written GPU assembly to address XNACK replay hazards.

Changes:

  • Adds gfx1250 translation waits and early-clobber load constraints.
  • Replaces flat memory instructions with global instructions and renames the corresponding cache policy.
  • Adjusts buffer descriptors for gfx1250 variants.
File Description
projects/​rocshmem/​src/​assembly.hpp Updates memory instructions, register constraints, replay waits, and buffer descriptors.

Review effort: Balanced

Comment thread projects/rocshmem/src/assembly.hpp Resolved
Comment thread projects/rocshmem/src/assembly.hpp Resolved
Comment thread projects/rocshmem/src/assembly.hpp Resolved
@amirsojoodi
amirsojoodi force-pushed the users/asojoodi/rocshmem-fix-xnack-replay branch from ba0f39c to 79c268d Compare October 23, 2026 20:17

@abouteiller abouteiller 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.

cosmetic indent issue, no need to rereview after done

Comment thread projects/rocshmem/src/assembly.hpp Resolved
@amirsojoodi
amirsojoodi force-pushed the users/asojoodi/rocshmem-fix-xnack-replay branch from 79c268d to 34419f4 Compare October 23, 2026 23:13
@amirsojoodi
amirsojoodi merged commit f91f5a1 into develop Oct 26, 2026
66 of 68 checks passed
@amirsojoodi
amirsojoodi deleted the users/asojoodi/rocshmem-fix-xnack-replay branch October 26, 2026 05:12
@systems-assistant

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants