Skip to content

[cudax][cuco] Migrate rebind APIs for fixed_capacity_map_ref - #10695

Merged
PointKernel merged 8 commits into
NVIDIA:mainfrom
PointKernel:cuco-fixed-capacity-map-rebind
Aug 11, 2026
Merged

[cudax][cuco] Migrate rebind APIs for fixed_capacity_map_ref#10695
PointKernel merged 8 commits into
NVIDIA:mainfrom
PointKernel:cuco-fixed-capacity-map-rebind

Conversation

@PointKernel

Copy link
Copy Markdown
Member

Description

closes #10646

This PR migrates the rebind APIs from cuco::static_map_ref to cudax::cuco::fixed_capacity_map_ref and adds corresponding tests.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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.

@PointKernel

Copy link
Copy Markdown
Member Author

/ok to test

@PointKernel PointKernel added the cuco cuCollections label Aug 6, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@PointKernel

Copy link
Copy Markdown
Member Author

/ok to test ec054ac

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@PointKernel
PointKernel marked this pull request as ready for review August 7, 2026 18:25
@PointKernel
PointKernel requested review from a team as code owners August 7, 2026 18:25
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9183484b-66bd-4183-86c6-b1949c190dbc

📥 Commits

Reviewing files that changed from the base of the PR and between b95cc7e and 5af1891.

📒 Files selected for processing (3)
  • cudax/include/cuda/experimental/__cuco/fixed_capacity_map_ref.cuh
  • cudax/test/CMakeLists.txt
  • cudax/test/cuco/fixed_capacity_map/test_rebind.cu
🚧 Files skipped from review as they are similar to previous changes (3)
  • cudax/test/CMakeLists.txt
  • cudax/include/cuda/experimental/__cuco/fixed_capacity_map_ref.cuh
  • cudax/test/cuco/fixed_capacity_map/test_rebind.cu

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for creating map references with replacement key-comparison functions.
    • Added support for creating map references with replacement hash functions.
    • Rebound references preserve capacity, storage, sentinel values, and probing configuration.
    • Continued lookups work with updated comparison or hashing behavior.
  • Tests

    • Added coverage for rebinding, metadata preservation, shared storage, and lookups across supported probing strategies.

Walkthrough

Added rebind_key_eq and rebind_hash_function to fixed_capacity_map_ref. Added CUDA tests for probing modes, cooperative-group lookups, metadata preservation, sentinels, capacity, and shared storage.

Changes

fixed_capacity_map rebinding

Layer / File(s) Summary
Rebinding API implementation
cudax/include/cuda/experimental/__cuco/fixed_capacity_map_ref.cuh
Added rebind_key_eq and rebind_hash_function. Both preserve map state while applying replacement comparison or hashing behavior.
Rebinding test support
cudax/test/cuco/fixed_capacity_map/test_rebind.cu
Added offset-aware helpers, rebound-reference construction, and a CUDA kernel for scalar and cooperative-group lookups.
Rebinding validation and test wiring
cudax/test/CMakeLists.txt, cudax/test/cuco/fixed_capacity_map/test_rebind.cu
Registered the new test target. Parameterized and static-capacity tests validate metadata, sentinels, capacity, storage sharing, probing configuration, and lookups.

Assessment against linked issues

Objective Addressed Explanation
Migrate rebind_key_eq and rebind_hash_function to fixed_capacity_map_ref [#10646]
Add corresponding tests [#10646]

Possibly related PRs

  • NVIDIA/cccl#10621: Modifies fixed_capacity_map hashing configuration and relates to replacement hash-function types.

Suggested reviewers: caugonnet, srinivasyadav18


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4693319a-ae3b-4d9a-a5d7-ab6c247fe7d1

📥 Commits

Reviewing files that changed from the base of the PR and between c0c1942 and ec054ac.

📒 Files selected for processing (3)
  • cudax/include/cuda/experimental/__cuco/fixed_capacity_map_ref.cuh
  • cudax/test/CMakeLists.txt
  • cudax/test/cuco/fixed_capacity_map/test_rebind.cu

Comment thread cudax/include/cuda/experimental/__cuco/fixed_capacity_map_ref.cuh Outdated
Comment thread cudax/test/cuco/fixed_capacity_map/test_rebind.cu Outdated
Comment thread cudax/test/cuco/fixed_capacity_map/test_rebind.cu Outdated
Comment thread cudax/test/CMakeLists.txt
Comment on lines +131 to +133
cudax_add_catch2_test(test_target cuco.fixed_capacity_map.rebind ${cudax_target}
cuco/fixed_capacity_map/test_rebind.cu
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit (for a follow up PR): I noticed there are a few of these tests reach into/several/subdirectories to get the tests. Consider doing add_subdirectory() instead at each level. It makes no meaningful difference, but it just feels more organized.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@PointKernel
PointKernel enabled auto-merge (squash) August 11, 2026 17:22
@github-actions

Copy link
Copy Markdown
Contributor

⏱️ CCCL compile-time benchmark comparison: Public headers compile-time bench

Result: 0 regression row(s), 2 improvement row(s) above threshold.

Run Value
Config public-headers-gcc13
Baseline origin/main
Preset all-dev
Targets cub.headers.base, thrust.cpp.cuda.headers.base, libcudacxx.test.public_headers
GPU / launch args rtx2080 / --cuda 13.3 --host gcc13

Artifacts: reports and traces

Direct file processing

-f file-processing exclusive --sort total

🟢 Direct file processing — Improvements
Rank Improvement impact Selected Δ Baseline Current Event Matched traces
1 0.548243 -0.548243 4.731730 4.183487 Processing Header File: libcudacxx/include/cuda/std/__cccl/prologue.h 551
2 0.206001 -0.206001 1.641536 1.435535 Processing Header File: libcudacxx/include/cuda/std/__cccl/epilogue.h 551

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 33m: Pass: 100%/63 | Total: 1d 19h | Max: 1h 07m | Hits: 13%/348732

See results here.

AI failure analysis

1. First downstream failure unavailable for cudf matrix · 1 job

Explanation: The RAPIDS matrix containing kvikio, rapidsmpf, cudf, and cudf_kafka failed in step 6, but no job log was collected. The workflow exits on the first failed library, so neither the failing library nor its diagnostic can be determined from the manifest alone.

Root cause: Unknown because `job-93862028342.log` is missing. The available evidence cannot distinguish a CCCL compatibility regression from a downstream dependency, container, network, or compiler failure. Sources: .github/workflows/build-rapids.yml:66, .github/workflows/build-rapids.yml:157.

Suggested next steps: Retrieve the missing job log or reproduce with `RAPIDS_LIBS='rmm ucxx kvikio rapidsmpf cudf cudf_kafka' .devcontainer/launch.sh -d -c 13.3 -H rapids-conda -- ./ci/rapids/rapids-entrypoint.sh /bin/bash -li -c 'uninstall-all -j -qqq && clean-all -j && build-all -j0 -v'`. Diagnose the first configure or compiler error rather than the final exit status.

Copy this prompt into a coding agent
Repository: https://github.com/NVIDIA/cccl
Workflow run: https://github.com/NVIDIA/cccl/actions/runs/31516189784
Failure group: First downstream failure unavailable for cudf matrix
Affected jobs:
- Build RAPIDS (optional) / rmm ucxx kvikio rapidsmpf cudf cudf_kafka: https://github.com/NVIDIA/cccl/actions/runs/31516189784/job/93862028342

Reproduce the RAPIDS build for `rmm ucxx kvikio rapidsmpf cudf cudf_kafka` under the CUDA 13.3 `rapids-conda` devcontainer. Capture the first failing `configure-<lib>-cpp` or `build-<lib>-cpp` diagnostic, verify whether the new `fixed_capacity_map_ref` rebind APIs or their added includes trigger it, implement the smallest compatible fix, and run focused validation for the failing library plus the fixed-capacity-map rebind test.

Jobs:

2. First downstream failure unavailable for cuml matrix · 1 job

Explanation: The RAPIDS matrix containing raft, cuvs, nvforest, and cuml failed in step 6, but its job log is absent. Because the script stops at the first failed library, the manifest does not identify which package or command failed.

Root cause: Unknown because `job-93862028572.log` is missing. There is insufficient evidence to group this with either other RAPIDS failure despite their shared rmm and ucxx prefixes. Sources: .github/workflows/build-rapids.yml:67, .github/workflows/build-rapids.yml:157.

Suggested next steps: Retrieve the missing job log or reproduce with `RAPIDS_LIBS='rmm ucxx raft cuvs nvforest cuml' .devcontainer/launch.sh -d -c 13.3 -H rapids-conda -- ./ci/rapids/rapids-entrypoint.sh /bin/bash -li -c 'uninstall-all -j -qqq && clean-all -j && build-all -j0 -v'`. Use the first package-specific diagnostic to determine whether this shares a fix with another matrix.

Copy this prompt into a coding agent
Repository: https://github.com/NVIDIA/cccl
Workflow run: https://github.com/NVIDIA/cccl/actions/runs/31516189784
Failure group: First downstream failure unavailable for cuml matrix
Affected jobs:
- Build RAPIDS (optional) / rmm ucxx raft cuvs nvforest cuml: https://github.com/NVIDIA/cccl/actions/runs/31516189784/job/93862028572

Reproduce the RAPIDS build for `rmm ucxx raft cuvs nvforest cuml` under the CUDA 13.3 `rapids-conda` devcontainer. Record the earliest failing package and full configure or compiler diagnostic, check whether it is caused by the changed `fixed_capacity_map_ref` header, implement the narrowest root-cause fix, and validate the failing package and relevant cudax fixed-capacity-map tests.

Jobs:

3. First downstream failure unavailable for cugraph matrix · 1 job

Explanation: The RAPIDS matrix containing raft, cuvs, cugraph, and wholegraph failed in step 6 without an available job log. The workflow's fail-fast package loop leaves no reliable failure signature in `jobs.json`.

Root cause: Unknown because `job-93862028555.log` is missing. Similar timing, step number, and shared dependencies are not sufficient to establish the same causal mechanism as the other matrices. Sources: .github/workflows/build-rapids.yml:68, .github/workflows/build-rapids.yml:157.

Suggested next steps: Retrieve the missing job log or reproduce with `RAPIDS_LIBS='rmm ucxx raft cuvs cugraph wholegraph' .devcontainer/launch.sh -d -c 13.3 -H rapids-conda -- ./ci/rapids/rapids-entrypoint.sh /bin/bash -li -c 'uninstall-all -j -qqq && clean-all -j && build-all -j0 -v'`. Compare the earliest diagnostic with the cuml matrix before combining remediation.

Copy this prompt into a coding agent
Repository: https://github.com/NVIDIA/cccl
Workflow run: https://github.com/NVIDIA/cccl/actions/runs/31516189784
Failure group: First downstream failure unavailable for cugraph matrix
Affected jobs:
- Build RAPIDS (optional) / rmm ucxx raft cuvs cugraph wholegraph: https://github.com/NVIDIA/cccl/actions/runs/31516189784/job/93862028555

Reproduce the RAPIDS build for `rmm ucxx raft cuvs cugraph wholegraph` under the CUDA 13.3 `rapids-conda` devcontainer. Capture the first actionable configure or compiler failure, test whether the pull request's `fixed_capacity_map_ref` rebind implementation or added headers cause it, apply the smallest fix, and run focused validation for the failing RAPIDS package and the new rebind coverage.

Jobs:

@PointKernel
PointKernel merged commit e9c51f5 into NVIDIA:main Aug 11, 2026
85 of 88 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuco cuCollections

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[CUCO][FEA]: Migrate rebind APIs for fixed_capacity_map_ref

3 participants