Repository navigation
Conversation
|
Caution Review failedPull request was closed or merged during review
OverviewThis PR refactors Core Changes
|
| Layer / File(s) | Summary |
|---|---|
DevicePartition::Flagged environment adaptation cub/cub/device/device_partition.cuh |
Devicestorage overload replaces cudaStream_t with const EnvT& env parameter; constructs default policy_selector from iterator/flag/output/offset types; dispatches through detail::dispatch_with_env_and_tuning, forwarding policy_selector into detail::select::dispatch; convenience overload takes env by const-ref. |
DevicePartition::If two-way partition environment adaptation cub/cub/device/device_partition.cuh |
Devicestorage overload signature changes from cudaStream_t to const EnvT& env; constructs default policy_selector from iterator/value/offset types; routes through detail::dispatch_with_env_and_tuning, forwarding policy_selector into detail::select::dispatch; convenience overload takes env by const-ref. |
DevicePartition::If three-way partition environment adaptation cub/cub/device/device_partition.cuh |
Devicestorage overload replaces cudaStream_t with const EnvT& env; constructs three-way policy_selector from input value type and per-partition offset types; dispatches via detail::dispatch_with_env_and_tuning into detail::three_way_partition::dispatch; convenience overload takes env by const-ref. |
DevicePartition tests for user-provided temp storage and environment forms cub/test/catch2_test_device_partition_flagged.cu, cub/test/catch2_test_device_partition_if.cu |
CUDA headers added for execution environment and device selection; comprehensive tests validate both Flagged and If with nullptr sizing queries followed by user-provided temp allocations, exercising multiple environment forms (cudaStream_t, cuda::stream, cuda::stream_ref, cuda::std::execution::env, cuda::execution::gpu with/without stream); assert CUDA status, temp-size consistency, and output correctness against std::stable_partition reference. |
PSTL partition and partition_copy: propagate execution policy to DevicePartition libcudacxx/include/cuda/std/__pstl/cuda/partition.h, libcudacxx/include/cuda/std/__pstl/cuda/partition_copy.h |
Pass execution __policy to cub::DevicePartition::If calls in both temporary-storage sizing queries (replacing nullptr) and kernel invocations (replacing __stream.get()). |
PSTL rotate and rotate_copy: propagate execution policy to DevicePartition libcudacxx/include/cuda/std/__pstl/cuda/rotate.h, libcudacxx/include/cuda/std/__pstl/cuda/rotate_copy.h |
Pass execution __policy to cub::DevicePartition::Flagged calls in temporary-storage sizing and kernel invocations; rotate also adjusts raw buffer pointer source. |
PSTL stable_partition: propagate execution policy to DevicePartition and DeviceTransform libcudacxx/include/cuda/std/__pstl/cuda/stable_partition.h |
Pass execution __policy to cub::DevicePartition::If and cub::DeviceTransform::TransformIf calls, replacing prior __stream.get() arguments in sizing, staging, and partition invocations. |
Possibly related PRs
- NVIDIA/cccl#9316: Introduces public
PartitionPolicytuning API; main PR's policy selector construction and dispatch_with_env_and_tuning routing directly build on that infrastructure. - NVIDIA/cccl#9324: Establishes three-way partition policy selection and dispatch; main PR's three-way DevicePartition::If refactoring depends on that tuning work.
Suggested reviewers
- gevtushenko
- gonidelis
- davebayer
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
cub/cub/detail/env_dispatch.cuh (1)
117-129: suggestion: This new user-memory path now feeds policy selection through the env/tuning dispatcher, so it can change the kernel variant selected forDeviceFindandDevicePartition. Please run the SASS-diff and benchmark flow for the affectedDevice*benchmarks before merge. As per coding guidelines,**/*.{cpp,cu,cuh}: Do not commit SASS code changes without running benchmarks to check for performance regressions.Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 18345e1e-685e-4c8c-9fd7-da9a89f1a7dd
📒 Files selected for processing (9)
cub/cub/detail/env_dispatch.cuhcub/cub/device/device_find.cuhcub/cub/device/device_partition.cuhcub/test/catch2_test_device_find_env.cucub/test/catch2_test_device_partition_if.culibcudacxx/include/cuda/std/__pstl/cuda/find_if.hlibcudacxx/include/cuda/std/__pstl/cuda/partition.hlibcudacxx/include/cuda/std/__pstl/cuda/partition_copy.hlibcudacxx/include/cuda/std/__pstl/cuda/stable_partition.h
This comment has been minimized.
This comment has been minimized.
7efaa10 to
b587246
Compare
This comment has been minimized.
This comment has been minimized.
bernhardmgruber
left a comment
There was a problem hiding this comment.
Please fix the above, otherwise LGTM
We want to be able to pass tunings to the APIs that take user provided memory Make sure we can pass any environment or stream type to them
b587246 to
cc62cf4
Compare
😬 CI Workflow Results🟥 Finished in 1h 32m: Pass: 81%/343 | Total: 5d 20h | Max: 1h 28m | Hits: 71%/662747See results here. |
We want to be able to pass tunings to the APIs that take user provided memory
Make sure we can pass any environment or stream type to them
DeviceFindIf#9318