Repository navigation
[CUB] Refactor DevicePartition::Flagged to always take an environment - #9463
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. |
724ef30 to
04194e2
Compare
558503f to
003860d
Compare
003860d to
214516b
Compare
ef6e110 to
5fc7e96
Compare
This comment has been minimized.
This comment has been minimized.
5fc7e96 to
7252c69
Compare
7252c69 to
45c5b58
Compare
This comment has been minimized.
This comment has been minimized.
45c5b58 to
e2fea4c
Compare
bac0c41 to
81235e5
Compare
This comment has been minimized.
This comment has been minimized.
81235e5 to
e1b621b
Compare
This comment has been minimized.
This comment has been minimized.
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
e1b621b to
277942e
Compare
📝 WalkthroughSummary by CodeRabbit
WalkthroughChanges
Partition environment dispatch
Suggested reviewers: Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
cub/cub/device/device_partition.cuh (1)
340-340: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valuesuggestion: good change to avoid a copy of
env. For consistency, the siblingIfenv overloads (two-way at Line 604, three-way at Line 989) still takeEnvT env = {}by value — worth aligning them the same way in a follow-up ifEnvTtypes aren't guaranteed trivial.cub/test/catch2_test_device_partition_flagged.cu (1)
268-305: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winsuggestion: none of these sections pass a custom
PartitionPolicyselector throughenvfor this overload — only stream/default-policy variants are covered. Given the dispatch-path concern flagged indevice_partition.cuh(Flagged's temp-storage overload possibly mishandling customPartitionPolicytunings), adding a section that supplies a custom policy selector (mirroring the pattern incatch2_test_device_partition_env_api.cu) would close this coverage gap and catch that class of regression.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1501ead6-4c92-4c22-a6a0-8c7fee5b73bc
📒 Files selected for processing (4)
cub/cub/device/device_partition.cuhcub/test/catch2_test_device_partition_flagged.culibcudacxx/include/cuda/std/__pstl/cuda/rotate.hlibcudacxx/include/cuda/std/__pstl/cuda/rotate_copy.h
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cub/cub/device/device_partition.cuh (1)
340-379: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winsuggestion: lines 360-378 duplicate the dispatch/policy-selection body of lines 239-260 almost verbatim (same
default_policy_selector,policy_selector_t, and__policy_selector_adapterwiring), differing only in the outerdispatch_with_envcall shape. Given the earlier critical bug stemmed from exactly this kind of overload divergence (one path skipping the adapter), extracting a shared private helper that builds the policy-adapted dispatch lambda would remove the duplication and prevent future drift between the two overloads.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8aaf1d55-86c8-4327-8caa-b1ef1355db81
📒 Files selected for processing (1)
cub/cub/device/device_partition.cuh
🥳 CI Workflow Results🟩 Finished in 1h 34m: Pass: 100%/345 | Total: 6d 20h | Max: 1h 33m | Hits: 66%/780706See results here. |
…nt (NVIDIA#9463) 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 Co-authored-by: Bernhard Manfred Gruber <[email protected]>
Description
closes
Checklist