fix: stage inline data in ProxyCmd for PROXY_RDMA_WRITE_INLINE - #22
Merged
itej89 merged 1 commit intoAug 28, 2026
Merged
Conversation
itej89
force-pushed
the
feat/ep-rdma-sharing-fix-r2-2-inline
branch
3 times, most recently
from
August 28, 2026 14:49
b60ece5 to
7c36de0
Compare
PROXY_RDMA_WRITE_INLINE set IBV_SEND_INLINE but left sge.addr as the GPU VRAM address from cmd->src_addr. libibverbs memcpys from sge.addr at post time — a GPU pointer the CPU cannot access. Fix: add inline_data[48], inline_tag, and inline_len fields to ProxyCmd (uses existing padding, struct stays 128 bytes). GPU copies data into cmd->inline_data via 8-byte stores on host-pinned ring, sets tag to PROXY_INLINE_IMM_WRITE and len. CPU validates tag+len before reading. - proxy_types.hpp: add ProxyInlineTag enum, inline_data[48], inline_tag, inline_len fields, PROXY_MAX_INLINE_DATA constant, static_assert - proxy_device_primitives.hpp: ProxyPostWriteInline copies src into cmd->inline_data, sets tag and len - proxy_thread.cpp: BuildWr validates tag+len, reads from cmd->inline_data - shmem_proxy_kernels.hpp: pass val pointer directly (not cast to u64) Tagged payload design: inline_tag tells CPU what inline_data contains. Future callers add new tags for new payload types without protocol changes. Addresses PR ROCm#558 round-2 review comment R2-2. Co-Authored-By: Claude <noreply@anthropic.com>
itej89
force-pushed
the
feat/ep-rdma-sharing-fix-r2-2-inline
branch
from
August 28, 2026 14:51
7c36de0 to
4816aef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses PR ROCm#558 round-2 review comment R2-2.
PROXY_RDMA_WRITE_INLINEsetIBV_SEND_INLINEbut leftsge.addrpointing at GPU VRAM (cmd->src_addr). libibverbsmemcpys fromsge.addrat post time — a GPU pointer the CPU cannot access.Fix: add
inline_data[48]toProxyCmd(uses existing padding, struct stays 128 bytes). GPU copies data intocmd->inline_datavia byte loop on host-pinned ring. CPU pointssge.addratcmd->inline_data(host-accessible).Changes:
proxy_types.hpp: addinline_data[48],PROXY_MAX_INLINE_DATA,static_asserton struct sizeproxy_device_primitives.hpp:ProxyPostWriteInlinecopies src data intocmd->inline_dataproxy_thread.cpp:BuildWrreads fromcmd->inline_datafor inline opsshmem_proxy_kernels.hpp: passvalpointer directly (not cast touint64_t)Max inline data per WQE is 12 bytes (
MaxInlineDataSizePerWqe). 48-byte field has safe headroom.Test plan
🤖 Generated with Claude Code