Repository navigation
[CUB] Refactor DeviceReduce::Arg{Min, Max} to always take an environment - #9403
Conversation
|
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 (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughDeviceReduce ArgMin and ArgMax now take execution environments by const-reference, use environment-aware dispatch internally, update PSTL CUDA backends to pass policies, and expand tests to cover multiple environment types with user-provided temporary storage. ChangesDeviceReduce ArgMin/ArgMax Environment Migration
Suggested reviewers: Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
cub/test/catch2_test_device_find_env.cu (1)
186-252: ⚡ Quick winsuggestion: factor the repeated env-variant/user-memory matrix into a shared test helper. The same structure is duplicated across
FindIf,LowerBound, andUpperBound, which increases drift risk when adding/removing env forms or changing sync/error assertions.Also applies to: 288-379, 415-506
cub/test/catch2_test_device_reduce.cu (1)
233-315: ⚡ Quick winsuggestion: The ArgMax and ArgMin “user provided memory and environment” sections are nearly identical; extract a shared helper to run size-query, allocation, execution, and verification so future environment/tuning updates don’t drift between the two paths.
Also applies to: 338-420
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0ca9b054-9d82-47f1-a65e-7e5384aba088
📒 Files selected for processing (8)
cub/cub/detail/env_dispatch.cuhcub/cub/device/device_find.cuhcub/cub/device/device_reduce.cuhcub/test/catch2_test_device_find_env.cucub/test/catch2_test_device_reduce.culibcudacxx/include/cuda/std/__pstl/cuda/find_if.hlibcudacxx/include/cuda/std/__pstl/cuda/max_element.hlibcudacxx/include/cuda/std/__pstl/cuda/min_element.h
This comment has been minimized.
This comment has been minimized.
162c1f6 to
dbfdda1
Compare
This comment has been minimized.
This comment has been minimized.
…nment We want to be able to pass tunings even to the APIs that currently only take a stream. Refactor so that we can pass an arbitrary environment to those APIs that take user provided memory
dbfdda1 to
ef5f96f
Compare
🥳 CI Workflow Results🟩 Finished in 2h 21m: Pass: 100%/345 | Total: 13d 12h | Max: 2h 21m | Hits: 37%/1338008See results here. |
| typename IndexOutIteratorT, | ||
| typename CompareOpT, | ||
| typename EnvT = ::cuda::std::execution::env<>> | ||
| CUB_RUNTIME_FUNCTION static cudaError_t __arg_min( |
There was a problem hiding this comment.
Important: With the new changes, __arg_min is almost identical to __arg_min_env. Please unify the two functions, I am sure this is possible.
We want to be able to pass tunings even to the APIs that currently only take a stream.
Refactor so that we can pass an arbitrary environment to those APIs that take user provided memory
Also port the PSTL algorithms to use the new API
DeviceFindIf#9318