Repository navigation
Add C2H utilities: c2h::current_device() / c2h::make_current_device_stream() - #11491
Conversation
…n CUB tests
c2h selects the device via -d/--device, so device-affine test resources
(streams, buffers) must be created against that device rather than assuming
device 0 or hand-rolling cudaGetDevice() boilerplate per test. Several tests
constructed streams via cuda::stream{cuda::devices[0]}, which silently
targeted the wrong device when run with a non-default -d/--device selection.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
d050d04 to
fa034df
Compare
|
@oleksandr-pavlyk for vis |
|
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 (26)
Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughChangesThe PR adds shared C2H helpers for retrieving the active CUDA device and creating a stream for it. CUB tests replace direct device-indexed stream construction and current-device queries with these helpers. Current-device stream handling
Suggested reviewers: Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to The test migration preserves active-device stream affinity, with no concrete merge-blocking issue identified. Comment |
c2h::current_device() / c2h::make_current_device_stream()
🥳 CI Workflow Results🟩 Finished in 3h 04m: Pass: 100%/182 | Total: 10d 01h | Max: 3h 01m | Hits: 27%/846760See results here. |
Adds
c2h::current_device()/c2h::make_current_device_stream()(in a new lightweight headerc2h/include/c2h/device_and_stream.h) and uses them across CUB's Catch2 tests wherever a test needs a stream or device on the CUDA device currently selected via-d/--device. Several tests constructed streams viacuda::stream{cuda::devices[0]}, which silently targeted device 0 regardless of the selected device; others repeatedcudaGetDevice/REQUIREboilerplate per test that the new helper replaces with a single call.🤖 Generated with Claude Code