[https://nvbugs/6756848][fix] Exchange the handle as its raw CUDA_IPC_HANDLE_SIZE (64-byte) struct bytes… - #19086
Open
trtllm-agent wants to merge 1 commit into
Open
Conversation
…ct bytes cuda-python 13.4 removed the `reserved` field from `cudaIpcMemHandle_t`, leaving `getPtr()` as the only accessor. `open_ipc_memory` read and wrote that field directly, so every multi-GPU run aborted while allocating the AllReduce workspace with: AttributeError: 'cuda.bindings.runtime.cudaIpcMemHandle_t' object has no attribute 'reserved' requirements.txt pins only `cuda-python>=13`, so 13.4 is an allowed resolution and the crash reproduces on a stock install. Exchange the handle as its raw CUDA_IPC_HANDLE_SIZE struct bytes via `getPtr()`. Both 13.2.0 and 13.4.1 expose `getPtr()` and a 64-byte CUDA_IPC_HANDLE_SIZE with a byte-identical round-trip, so a single path covers the supported range without a version branch. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. WalkthroughThe CUDA IPC memory path now serializes handles as raw bytes. It uses ChangesCUDA IPC handle exchange
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The IPC handle compatibility update is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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
open_ipc_memoryread/wrotecudaIpcMemHandle_t.reserved, removed in cuda-python 13.4, which the unboundedcuda-python>=13pin allows.CUDA_IPC_HANDLE_SIZE(64-byte) struct bytes viagetPtr(), which both 13.2.0 and 13.4.1 expose, so one path covers the supported range.pytest tests/integration/defs/accuracy/test_llm_api_pytorch.py::TestLlama4SpeculativeDecoding::test_llama4_eagle3[dynamic] -vTest plan
Links
Reproduction comparison
Signature: RuntimeError: Executor worker returned error
Dev Engineer Review
tensorrt_llm/_ipc_utils.pynow serializes CUDA IPC handles as raw 64-byte buffers throughgetPtr().cudaIpcMemHandle_t.reserved, restoring compatibility withcuda-python13.2.0–13.4.1.cuda-pythonversions. Confirm thatctypes.memmovecopies exactlyCUDA_IPC_HANDLE_SIZEbytes.QA Engineer Review
No test changes.