[cudax] Expose implict_hierarchy[_1d] - #10911
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesThe change adds Implicit hierarchy support
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The PR exposes the hierarchy APIs and removes default construction for these groups; the remaining concerns are limited to test assertions, headers, naming, and const-correctness. No actionable merge-blocking risk remains after normal checks and review. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
cudax/include/cuda/experimental/__group/implicit_hierarchy.cuh (2)
25-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winsuggestion: Remove the unused span forward-declaration header. This file does not use
span.As per coding guidelines, “Remove unneeded headers.” As per path instructions,
cudax/**changes apply CCCL common style guidance.Sources: Coding guidelines, Path instructions
55-55: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winsuggestion: Use snake_case for both local type aliases.
cudax/include/cuda/experimental/__group/implicit_hierarchy.cuh#L55-L55: Rename_Exts1Dto a snake_case alias.cudax/test/group/make_this_group.cu#L26-L26: RenameHierarchytohierarchy_type.As per coding guidelines, “Use snake_case for all other symbols, except that the CUB public API uses PascalCase.”
Source: Coding guidelines
cudax/test/group/this_group.cu (1)
275-283: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winsuggestion: Declare the test-only group values
const.
cudax/test/group/this_group.cu#L275-L283: Changetest_common_propertiesto acceptconst Group&, then declaregroupasconst.cudax/test/group/make_this_group.cu#L31-L32: Declaregroupasconst;sync()is const and no mutation occurs.As per coding guidelines, “All variables that are not modified must be declared
const.”Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1c974cb3-f8c7-43e5-95df-88b579d1afd2
📒 Files selected for processing (9)
cudax/include/cuda/experimental/__group/fwd.cuhcudax/include/cuda/experimental/__group/implicit_hierarchy.cuhcudax/include/cuda/experimental/__group/this_group.cuhcudax/test/CMakeLists.txtcudax/test/coop/any_of/this_thread.cucudax/test/coop/any_of/this_warp.cucudax/test/group/implicit_hierarchy.cucudax/test/group/make_this_group.cucudax/test/group/this_group.cu
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.
| __device__ void operator()(const Config& config) | ||
| { | ||
| test_group(cudax::this_thread{}); | ||
| test_group(cudax::this_thread{cudax::implicit_hierarchy()}); |
There was a problem hiding this comment.
Should this also test implicit_hierarchy_1d?
There was a problem hiding this comment.
I don't think so to be honest. We will change these tests anyway sooner or later
🥳 CI Workflow Results🟩 Finished in 1h 21m: Pass: 100%/63 | Total: 19h 59m | Max: 49m 12s | Hits: 25%/128243See results here. |
This PR makes the
implicit_hierarchypublic and adds theimplicit_hierarchy_1dfunction for generating dynamic 1D hierarchy. This will be useful for users that don't usecuda::launchto use the groups and need to construct the hierarchy themselves on device.I've also removed the default constructor from
this_meowgroups. User should be aware he is using the dynamic hierarchy and useimplicit_hierarchy_1dwhenever possible to optimize the queries.