Migrate MGMN to the cuda::__logical_device and friends - #11011
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
/ok to test |
a3c6b68 to
70c7c1f
Compare
70c7c1f to
bf8d875
Compare
|
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 (9)
🚧 Files skipped from review as they are similar to previous changes (9)
Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesMulti-GPU resource handling now uses logical device references and locality-domain memory pools. NCCL communicator APIs and tests use Logical device migration
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This PR updates MGMN implementations to use the newer CUDA logical-device and locality-domain interfaces; no actionable merge-blocking risk remains based on the supplied evidence. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 68ca7c4b-c986-44f6-9e40-9b788de55859
📒 Files selected for processing (9)
cudax/include/cuda/experimental/__multi_gpu/algorithm/common.hcudax/include/cuda/experimental/__multi_gpu/algorithm/reduce/reduce.hcudax/include/cuda/experimental/__multi_gpu/algorithm/reduce/segmented_reduce.hcudax/include/cuda/experimental/__multi_gpu/algorithm/sort/hss/histogramming.hcudax/include/cuda/experimental/__multi_gpu/algorithm/sort/hss/local_setup.hcudax/include/cuda/experimental/__multi_gpu/nccl_communicator.hcudax/include/cuda/experimental/__multi_gpu/nccl_communicator_ref.hcudax/test/multi_gpu/communicators/nccl/basic.cucudax/test/multi_gpu/include/nccl_test_common.h
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review.
🥳 CI Workflow Results🟩 Finished in 1h 34m: Pass: 100%/63 | Total: 1d 16h | Max: 1h 04m | Hits: 17%/235859See results here. AI failure analysis1. cuVS balanced k-means rejects rvalue initialization of RMM device scalars · 2 jobsExplanation: Both matrices first fail while compiling the same cuVS balanced-k-means source because integer literal `0` selects RMM 26.10's deleted rvalue constructor; the same issue also occurs for `search_count` three lines later. The PR diff only changes cudax multi-GPU code and does not reference these APIs, so the evidence points to incompatible cuVS and RMM main-branch revisions rather than the submitted cudax changes. Evidence: Copy this prompt into a coding agentJobs: |
| //! @throws std::runtime_error If the device reported by NCCL does not match `__device`. | ||
| [[nodiscard]] static _CCCL_HOST_API nccl_communicator | ||
| from_native_handle(native_handle_type __handle, ::cuda::experimental::logical_device __device) | ||
| from_native_handle(native_handle_type __handle, ::cuda::__logical_device_ref __device) |
There was a problem hiding this comment.
This looks like a public function depending on a private typename (__logical_device_ref), I assume it's intentional but worth the question.
There was a problem hiding this comment.
Yes, __logical_device_ref itself is currently "private" but still needs to be exposed publicly. It will eventually become public once this finalizes
| _CCCL_HOST_API explicit nccl_communicator(::cuda::no_init_t) noexcept | ||
| : nccl_communicator_ref{::cuda::experimental::__nccl::__NCCL_COMM_NULL, | ||
| ::cuda::experimental::logical_device{0}, | ||
| ::cuda::__logical_device_ref{0}, |
There was a problem hiding this comment.
(This was existing behavior.) Since I'm obsessed with exceptions... looks like this could terminate the entire app. This is fine but possibly unexpected from a function that's innocently "no-init".
There was a problem hiding this comment.
Yeah, I considered this as well. The only scenario this throws though is if you cannot initialize device 0 at all. So even if we are no_init-ing the communicator, if we can't even initialize the device then we are basically screwed anyways and the program cannot continue.
| { | ||
| // One stream per rank, each current on its own device. | ||
| [[nodiscard]] inline std::vector<cudax::stream> make_streams() | ||
| [[nodiscard]] inline std::vector<cuda::stream> make_streams() |
There was a problem hiding this comment.
guess this unrelated bit could be in the commit msg
There was a problem hiding this comment.
It's related. cuda::stream could not be constructed from cudax::logical_device, but it can now be constructed from a cuda::__logical_device_ref.
Description
Migrate the MGMN implementations to using
cuda::__logical_deviceand friends as well as the new locality domain pools.Requires #10978Checklist