Add CPU RoCE to playback emulator - #834
eliotheinrich wants to merge 8 commits into
Conversation
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
3cd2c2a to
0a7a6a5
Compare
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
| rx_data_ + static_cast<std::size_t>(slot) * stride_, stride_); | ||
| __atomic_store_n(&rx_flags_[slot], 0ull, __ATOMIC_RELEASE); // re-arm | ||
| cursor_ = (cursor_ + 1) & slot_mask_; | ||
| slot_owner_[slot] = kNoOwner; |
There was a problem hiding this comment.
CUDA-Q’s existing RingSlotChannel serializes response-bearing calls and exits the dispatch on a timeout, while this implementation frees timed-out slots and continues publishing requests. A late unmatched response could therefore clear slot_owner_[slot] after that slot has been assigned to a newer request. Would it make sense to update ownership only after matching the response ID and confirming that slot_owner_[it->second.slot] still equals that ID? It may also be worth adding a delayed-response-after-timeout-and-ring-wrap test.
| worker_ = std::thread([this] { worker_loop(); }); | ||
| } | ||
|
|
||
| void send(const frame &f, tag t) override { |
There was a problem hiding this comment.
Could we also validate f.size <= stride_ in send()? The current playback paths check max_frame_bytes upstream, but this session is the component that owns the fixed RDMA slot size, and try_publish() later copies frame_len bytes into that slot without another bound check. Keeping the invariant at this boundary would make the backend safer to reuse and straightforward to test with a slot_size + 1 frame.
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
Description
This PR adds a CPU RoCE
sessionbackend to the playback emulator.Docs will follow (#835).
Runtime / performance impact
N/A
Self-review checklist
Please confirm each item before requesting review. Check
[x]or strikethrough and explain.
Before requesting review
Scope and size
(if so, an issue has been raised).
Tests
just when it is missing.
EXPECT_*/assertchecks areinsufficient for algorithmic correctness.
Documentation
tracked.
Code style
snake_casevscamelCase) forthe area being modified.
Dependencies
OSRB tickets filed.