Repository navigation
[cudax] Rework cudax::coop::group_as mapping - #12223
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Range-based group_as mapping cudax/include/cuda/experimental/coop/__group/fwd.cuh, cudax/include/cuda/experimental/coop/__group/mapping/group_as.cuh, cudax/include/cuda/experimental/coop/__group/synchronizer/interwarp_synchronizer.cuh |
group_as stores a sized range whose values convert to uint32_t. It derives group counts and mapping validity from the range. Forward declarations and the interwarp synchronizer diagnostic use the _RangeView parameter name. |
Range mapping test coverage cudax/test/coop/group/mapping/group_as.cu, cudax/test/coop/group/mapping/composite_mapping.cu |
Tests cover exhaustive and non-exhaustive mappings with C arrays, cuda::std::array, and cuda::std::span. Composite mapping tests use array-backed counts and expect dynamic group counts. |
Array-based group_as call sites cudax/test/coop/group/group_stacking.cu, cudax/test/coop/group/virtual_group_stacking.cu, cudax/test/coop/group/make_group.cu |
These tests pass cuda::std::array values to group_as instead of index_sequence values. |
Possibly related PRs
- NVIDIA/cccl#12229: Both changes apply a range-view template contract to
cudax::coopsynchronizer components.
Priority:
Change: Feature
Merge Risk: 
Low · up to fffca
-
Several narrow range-input cases can fail to compile or produce incorrect group mappings; address them before relying on the new flexibility.
✨ Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟠 Major · important: Cast __n to uint32_t before the braced _MappingResult… · group_as.cuh:114-125
cudax/include/cuda/experimental/coop/__group/mapping/group_as.cuh:114-125
🎯 Functional Correctness | 🟠 Major | ⚡ Quick winimportant: Cast
__ntouint32_tbefore the braced_MappingResultinitialization.
__nkeeps the range element type. The_MappingResultaggregate initializes itsuint32_t __unit_count_field from__nin braces. When the range element type isintorsize_t, that conversion narrows. Narrowing in list-initialization is ill-formed when the source value is not a constant expression, and__i_countis not one. The classstatic_assertadmits any element type convertible touint32_t, sogroup_asaccepts these ranges, but__do_mapcannot compile for them.Suggested fix
- const auto __n = __i_count; + const auto __n = static_cast<::cuda::std::uint32_t>(__i_count);
ℹ️ Review info
⚙️ Run configuration
- Source mode: Auto
- Repository: NVIDIA/cccl
- Branch: main
- File: .coderabbit.yaml
- Commit: 72a288d
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Enterprise
- Run ID:
372375f7-8deb-4f21-a1c5-064901c0cdcb
📒 Files selected for processing: 8
cudax/include/cuda/experimental/coop/__group/fwd.cuhcudax/include/cuda/experimental/coop/__group/mapping/group_as.cuhcudax/include/cuda/experimental/coop/__group/synchronizer/interwarp_synchronizer.cuhcudax/test/coop/group/group_stacking.cucudax/test/coop/group/make_group.cucudax/test/coop/group/mapping/composite_mapping.cucudax/test/coop/group/mapping/group_as.cucudax/test/coop/group/virtual_group_stacking.cu
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
cudax::coop::group_as mappingcudax::coop::group_as mapping
This comment has been minimized.
This comment has been minimized.
4aab0d7 to
ed846e1
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Source mode: Auto
- Repository: NVIDIA/cccl
- Branch: main
- File: .coderabbit.yaml
- Commit: 4811a1c
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Enterprise
- Run ID:
c7d01e7a-5ed4-4fc0-9eb8-d5ed3112e252
📒 Files selected for processing: 1
cudax/include/cuda/experimental/coop/__group/mapping/group_as.cuh
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.
ed846e1 to
fffca4e
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Source mode: Auto
- Repository: NVIDIA/cccl
- Branch: main
- File: .coderabbit.yaml
- Commit: 4811a1c
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Enterprise
- Run ID:
e08bc12a-f117-4422-a40b-59b0a8de063d
📒 Files selected for processing: 1
cudax/include/cuda/experimental/coop/__group/mapping/group_as.cuh
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.
This comment has been minimized.
This comment has been minimized.
🥳 CI Workflow Results🟩 Finished in 1h 31m: Pass: 100%/73 | Total: 1d 02h | Max: 1h 14m | Hits: 34%/136590See results here. |
This PR reworks the
group_asmapping to take a viewable range instead of a contiguous piece of memory. This make it much more flexible and easier to use.