Skip to content

fix(rocshmem): use scoped atomics in Anvil SDMA device code - #11591

Closed
dlamd1dai wants to merge 1 commit into
ROCm:developfrom
dlamd1dai:users/dondai/rocshmem-anvil-scoped-atomics
Closed

dlamd1dai wants to merge 1 commit into
ROCm:developfrom
dlamd1dai:users/dondai/rocshmem-anvil-scoped-atomics

Conversation

@dlamd1dai

Copy link
Copy Markdown
Contributor

Summary

  • Replace __hip_atomic_* with __scoped_atomic_* helpers in anvil_device.hpp so Anvil SDMA device code builds when RCCL poisons HIP atomics in device translation units.
  • Keeps queue polling, packet submission, and signal spin-wait semantics unchanged; only the atomic API surface changes.

Motivation

GIN cluster CI on RCCL device builds failed with poisoned __hip_atomic_* after the Anvil SDMA path started compiling rocSHMEM device headers. This fix is intentionally split from the AICOMRCCL-2339 signal de-alias work in #11569.

Test plan

  • TheRock / RCCL GIN cluster CI (device build that includes anvil_device.hpp)
  • rocSHMEM SDMA unit/device tests if available on the runner

Made with Cursor

RCCL device builds poison __hip_atomic_*; route Anvil queue/signal
polling through __scoped_atomic_* with explicit memory scopes instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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/sdma/anvil_device.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?

@omor1

omor1 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Superseded by #11350.

@dlamd1dai dlamd1dai self-assigned this Sep 15, 2026
@dlamd1dai

Copy link
Copy Markdown
Contributor Author

Closing without merge. This Anvil-only __scoped_atomic_* change is superseded by #11350, which replaces __hip_atomic* with __scoped_atomic* across rocSHMEM.

@dlamd1dai dlamd1dai closed this Sep 16, 2026
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.

2 participants