[rocSHMEM] Reduce IPC RMA latency in symmetric address translation - #9872
[rocSHMEM] Reduce IPC RMA latency in symmetric address translation#9872avinashkethineedi wants to merge 4 commits into
Conversation
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
There was a problem hiding this comment.
Pull request overview
This PR optimizes the rocSHMEM IPC RMA hot path by avoiding per-operation heap metadata loads/range checks during symmetric address translation, while preserving the fallback path for symmetrically-registered user buffers and updating affected IPC/GDA call sites.
Changes:
- Cache the local symmetric heap base/size in device constant memory and use them in
ipcPeerPtr()’s heap fast path. - Remove the unused local-PE argument from
ipcPeerPtr()and update IPC + GDA device call sites accordingly. - Remove the GDA-side
ipc_peer_ptr()wrapper and callipcPeerPtr()directly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/rocshmem/src/ipc/context_ipc_tmpl_device.hpp | Updates IPC AMO paths to use the new ipcPeerPtr(sym_addr, pe) signature. |
| projects/rocshmem/src/ipc/context_ipc_device.cpp | Updates IPC put/get and shmem_ptr paths to use the new ipcPeerPtr() signature. |
| projects/rocshmem/src/ipc_policy.hpp | Updates ipcPeerPtr() implementation to use constmem.heap_base/heap_size and removes the my_pe parameter. |
| projects/rocshmem/src/gda/context_gda_tmpl_device.hpp | Switches GDA templated ops to call ipcImpl_.ipcPeerPtr() directly. |
| projects/rocshmem/src/gda/context_gda_device.hpp | Removes the now-unneeded ipc_peer_ptr() wrapper helper. |
| projects/rocshmem/src/gda/context_gda_device.cpp | Updates GDA device operations to call ipcImpl_.ipcPeerPtr() directly. |
| projects/rocshmem/src/constmem.hpp | Adds heap_base and heap_size fields to device constant memory. |
| projects/rocshmem/src/constmem.cpp | Initializes the new constant-memory heap base/size values from the backend heap. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Avoid per-operation local heap metadata indirection on IPC RMA paths, reducing fixed get/put latency without changing registered-buffer translation.
- Remove the unused PE parameter from ipcPeerPtr - Update IPC and GDA call sites
- Call ipcPeerPtr directly from GDA paths - Remove the forwarding helper
188c5c8 to
dff8fa9
Compare
Motivation
Symmetric user-buffer registration routed IPC get/put operations through
ipcPeerPtr()to distinguish symmetric-heap addresses from registered buffers. This added heap metadata loads and a range check to the common RMA hot path, increasing short-message latency.This PR removes the avoidable memory indirection while preserving registered-buffer support and the existing address-translation behavior.
Technical Details
ipcPeerPtr()heap fast path.Issue Tracking
Test Plan
Test Result
Submission Checklist