Repository navigation
[cudax][cuco] Add fixed_capacity_set core APIs - #11869
Conversation
Add owning and non-owning sets with constructors, insert, contains, clear, capacity accessors, and scalar/cooperative device operations for NVIDIA#11126. Request padded, atomically aligned set storage through an optional internal allocation alignment argument while preserving map allocation defaults. Add focused C2H coverage, compile-failure checks, and NVBench benchmarks.
Derive slot alignment from the storage type in a shared constexpr and use it for every allocation path while retaining natural map alignment. Accept CUDA-trivially-copyable keys and exercise a half2 wrapper. Simplify allocation tests and adapt upstream cross-stream, atomic-storage, and large-input regressions, with broader heterogeneous probing coverage.
|
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. |
Use double hashing with cooperative group size four and xxHash32 for fixed_capacity_set, preserving the cuCollections static_set defaults. Document the default policy and cover its propagation to the device ref and prime-based capacity rounding.
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Open-addressing storage and insertion scan cudax/include/cuda/experimental/__cuco/detail/open_addressing/*, cudax/test/cuco/fixed_capacity_map/test_capacity.cu |
Open-addressing allocations now request alignment based on the stored type. The bucket scan uses cuda::static_for to find an insertion slot. Map tests check allocation alignment and insertion around rehash. |
Non-owning set reference cudax/include/cuda/experimental/__cuco/fixed_capacity_set_ref.cuh, cudax/test/cuco/fixed_capacity_set/test_ref.cu |
fixed_capacity_set_ref adds accessors and single-thread and cooperative-group insert and lookup operations. Tests cover external storage, key types, extents, and thread scopes. |
Owning set API and validation cudax/include/cuda/experimental/__cuco/fixed_capacity_set.cuh, cudax/test/cuco/fixed_capacity_set/*, cudax/test/cuco/CMakeLists.txt |
fixed_capacity_set adds constructors, clear, insert, contains, capacity, accessors, and reference creation. Tests cover capacity, policies, alignment, insertion, lookup, and clearing. |
Set benchmarks cudax/benchmarks/bench/cuco/CMakeLists.txt, cudax/benchmarks/bench/cuco/fixed_capacity_set/* |
Adds insertion and containment benchmarks with input-count, occupancy, matching-rate, and key-multiplicity sweeps. |
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
Add fixed-capacity set constructors and insert, contains, capacity, and clear APIs, with corresponding tests and benchmarks [#11126] |
✅ |
Possibly related issues
- [[FEA]: Migrate materialized bucket loads to cudax cuco #11334]: The PR adds explicit allocation alignment in the shared open-addressing implementation. The provided changes do not add owning bucket reads or vectorized bucket loads.
Priority:
Merge Risk: 
Minimal · up to 09c3b
-
The fixed-capacity set test and benchmark directories are wired consistently, and the reviewed storage alignment behavior has no remaining merge-blocking risk.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: NVIDIA/cccl/.coderabbit.yaml
- Review profile: CHILL
- Plan: Enterprise
- Run ID:
f267d7d3-f1b9-4f40-a2f0-3fcb9f874d73
📒 Files selected for processing: 16
cudax/benchmarks/bench/cuco/CMakeLists.txtcudax/benchmarks/bench/cuco/fixed_capacity_set/CMakeLists.txtcudax/benchmarks/bench/cuco/fixed_capacity_set/contains.cucudax/benchmarks/bench/cuco/fixed_capacity_set/insert.cucudax/include/cuda/experimental/__cuco/detail/open_addressing/open_addressing_impl.cuhcudax/include/cuda/experimental/__cuco/detail/open_addressing/open_addressing_ref_impl.cuhcudax/include/cuda/experimental/__cuco/fixed_capacity_set.cuhcudax/include/cuda/experimental/__cuco/fixed_capacity_set_ref.cuhcudax/test/cuco/CMakeLists.txtcudax/test/cuco/fixed_capacity_set/CMakeLists.txtcudax/test/cuco/fixed_capacity_set/test_capacity.cucudax/test/cuco/fixed_capacity_set/test_capacity_fail.cucudax/test/cuco/fixed_capacity_set/test_common.cuhcudax/test/cuco/fixed_capacity_set/test_insert_and_contains.cucudax/test/cuco/fixed_capacity_set/test_key_size_fail.cucudax/test/cuco/fixed_capacity_set/test_ref.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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…-set-11126 # Conflicts: # cudax/benchmarks/bench/cuco/CMakeLists.txt
🥳 CI Workflow Results🟩 Finished in 1h 26m: Pass: 100%/73 | Total: 17h 42m | Max: 1h 11m | Hits: 74%/62608See results here. |
Description
Closes #11126.
This PR migrates the core cuCollections
static_setAPIs to CCCL asfixed_capacity_setandfixed_capacity_set_ref, reusing the shared open-addressing implementation.Includes static, dynamic, and load-factor construction; synchronous/asynchronous insert, contains, and clear; scalar and cooperative-group device operations; and corresponding tests and benchmarks.
Storage alignment is derived at compile time to provide aligned, padded allocations for subword atomics while preserving existing map allocation behavior.
Checklist