Skip to content

Rename cuda.coop backend to cuda.coop.numba_cuda#8788

Open
tpn wants to merge 4 commits intoNVIDIA:mainfrom
tpn:8787-rename-cuda-coop
Open

Rename cuda.coop backend to cuda.coop.numba_cuda#8788
tpn wants to merge 4 commits intoNVIDIA:mainfrom
tpn:8787-rename-cuda-coop

Conversation

@tpn
Copy link
Copy Markdown
Contributor

@tpn tpn commented May 2, 2026

Summary

Fixes #8787.

This PR renames the existing Numba CUDA-based cooperative primitives from cuda.coop to cuda.coop.numba_cuda, making the canonical import:

import cuda.coop.numba_cuda as coop

It also removes the tracked cuda.cccl.cooperative.experimental compatibility package, moves the coop tests and benchmarks under tests/coop/numba_cuda/ and benchmarks/coop/numba_cuda/, and updates docs, examples, release metadata, and CI paths for the new namespace.

Validation

  • python -m compileall -q python/cuda_cccl/cuda/coop python/cuda_cccl/tests/coop/numba_cuda python/cuda_cccl/benchmarks/coop/numba_cuda
  • import smoke for import cuda.coop.numba_cuda as coop, including negative checks for old cuda.coop.block, cuda.coop.warp, and cuda.cccl.cooperative.experimental
  • python -m pytest -n 4 -v python/cuda_cccl/tests/coop/numba_cuda (1889 passed, 24 skipped)
  • python -m pytest -v python/cuda_cccl/tests/test_examples.py (68 passed)
  • pre-commit run --files ...

Co-Authored By: Codex GPT-5.5 xhigh

tpn added 3 commits May 2, 2026 09:57
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Copilot AI review requested due to automatic review settings May 2, 2026 17:04
@tpn tpn requested review from a team as code owners May 2, 2026 17:04
@github-project-automation github-project-automation Bot moved this to Todo in CCCL May 2, 2026
@tpn tpn requested review from gonidelis and jrhemstad May 2, 2026 17:04
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL May 2, 2026
Comment thread python/cuda_cccl/cuda/coop/numba_cuda/__init__.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Renames the Numba CUDA cooperative primitives backend from cuda.coop to cuda.coop.numba_cuda, updating the test/example/benchmark layout and documentation so the new namespace is the supported import surface.

Changes:

  • Move/retarget coop tests, examples, and benchmarks to tests/coop/numba_cuda/ and benchmarks/coop/numba_cuda/, updating imports to import cuda.coop.numba_cuda as coop.
  • Update coop module/docstrings and Sphinx docs to reference cuda.coop.numba_cuda and new literalinclude paths.
  • Remove the legacy cuda.cccl.cooperative.experimental compatibility package and update CI/metadata paths accordingly.

Reviewed changes

Copilot reviewed 57 out of 69 changed files in this pull request and generated no comments.

Show a summary per file
File Description
python/cuda_cccl/tests/test_examples.py Adjust example discovery paths and display names for the new coop namespace.
python/cuda_cccl/tests/coop/numba_cuda/test_warp_scan_api.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_warp_scan.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_warp_reduce_api.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_warp_reduce.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_warp_merge_sort_api.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_warp_merge_sort.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_scan_op.py Retarget _scan_op import and docstring to the new module path.
python/cuda_cccl/tests/coop/numba_cuda/test_common.py Retarget _common import to the new module path.
python/cuda_cccl/tests/coop/numba_cuda/test_block_store.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_scan_api.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_scan.py Update docstring/imports for new coop namespace.
python/cuda_cccl/tests/coop/numba_cuda/test_block_reduce_api.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_reduce.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_radix_sort_api.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_radix_sort.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_merge_sort_api.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_merge_sort.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_load_store_api.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_load.py Update coop import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/test_block_exchange.py Update docstring/import for new coop namespace.
python/cuda_cccl/tests/coop/numba_cuda/helpers.py New shared helper utilities/types for coop numba-cuda tests.
python/cuda_cccl/tests/coop/numba_cuda/examples/warp/reduce.py Update example import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/examples/warp/init.py New package marker for warp examples.
python/cuda_cccl/tests/coop/numba_cuda/examples/block/scan.py Update example import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/examples/block/reduce.py Update example import to cuda.coop.numba_cuda.
python/cuda_cccl/tests/coop/numba_cuda/examples/block/init.py New package marker for block examples.
python/cuda_cccl/pyproject.toml Add cuda.coop.numba_cuda to isort first-party list.
python/cuda_cccl/cuda/coop/numba_cuda/warp/_warp_scan.py Update doc literalinclude paths to moved tests.
python/cuda_cccl/cuda/coop/numba_cuda/warp/_warp_reduce.py Update doc literalinclude paths to moved tests.
python/cuda_cccl/cuda/coop/numba_cuda/warp/_warp_merge_sort.py Update doc literalinclude paths to moved tests.
python/cuda_cccl/cuda/coop/numba_cuda/warp/init.py New public warp namespace exports for the numba-cuda backend.
python/cuda_cccl/cuda/coop/numba_cuda/block/_block_scan.py Update module doc header and doc literalinclude paths.
python/cuda_cccl/cuda/coop/numba_cuda/block/_block_reduce.py Update doc literalinclude paths to moved tests.
python/cuda_cccl/cuda/coop/numba_cuda/block/_block_radix_sort.py Update doc literalinclude paths to moved tests.
python/cuda_cccl/cuda/coop/numba_cuda/block/_block_merge_sort.py Update doc literalinclude paths to moved tests.
python/cuda_cccl/cuda/coop/numba_cuda/block/_block_load_store.py Update doc literalinclude paths to moved tests.
python/cuda_cccl/cuda/coop/numba_cuda/block/_block_exchange.py Update module doc header and type references to new namespace.
python/cuda_cccl/cuda/coop/numba_cuda/block/init.py New public block namespace exports for the numba-cuda backend.
python/cuda_cccl/cuda/coop/numba_cuda/_typing.py New typing aliases for the numba-cuda coop backend.
python/cuda_cccl/cuda/coop/numba_cuda/_types.py New core implementation/types for specialization/linking/invocation.
python/cuda_cccl/cuda/coop/numba_cuda/_scan_op.py Update module doc header to new namespace.
python/cuda_cccl/cuda/coop/numba_cuda/_nvrtc.py New NVRTC wrapper with caching hook for numba-cuda coop backend.
python/cuda_cccl/cuda/coop/numba_cuda/_common.py New shared utilities/constants for numba-cuda coop backend.
python/cuda_cccl/cuda/coop/numba_cuda/_caching.py New on-disk cache helper for compile artifacts.
python/cuda_cccl/cuda/coop/numba_cuda/init.py New top-level numba-cuda coop backend package exports.
python/cuda_cccl/cuda/coop/init.py Make cuda.coop a backend container (no longer exports primitives directly).
python/cuda_cccl/cuda/cccl/cooperative/experimental/init.py Remove deprecated compatibility alias package.
python/cuda_cccl/cuda/cccl/cooperative/init.py Remove deprecated compatibility package root.
python/cuda_cccl/benchmarks/coop/numba_cuda/device_side_benchmark.py Update benchmark import to cuda.coop.numba_cuda.
python/cuda_cccl/benchmarks/coop/numba_cuda/bench_warp_reduce.py New benchmark targeting warp reduce under new namespace.
python/cuda_cccl/benchmarks/coop/numba_cuda/README.md New benchmark documentation for coop/numba_cuda benchmarks.
python/cuda_cccl/README.md Update top-level docs and example links to new coop namespace/paths.
docs/python/resources.rst Update examples link to coop/numba_cuda/examples.
docs/python/index.rst Update coop doc entry name to cuda.coop.numba_cuda.
docs/python/coop_api.rst Retarget API reference to cuda.coop.numba_cuda.{warp,block} and new ref label.
docs/python/coop.rst Update narrative, includes, links, and ref label for new namespace.
cub/cub/block/block_radix_sort.cuh Update embedded Python snippet to import/call the new coop API.
ci/windows/test_cuda_coop_python.ps1 Update CI test path to coop/numba_cuda/.
ci/windows/build_cuda_cccl_python.ps1 Update description to reference cuda.coop.numba_cuda.
ci/test_cuda_coop_python.sh Update CI test path to coop/numba_cuda/.
ci/matrix.yaml Rename CI job display name to cuda.coop.numba_cuda.
ci/bench/README.md Update benchmark filter example path for new coop benchmark directory.
ci/bench.yaml Update commented benchmark selection examples to new path.
ci/bench.template.yaml Update commented benchmark selection examples to new path.
AGENTS.md Update module list and usage examples to canonical cuda.coop.numba_cuda import.
.github/release.yml Update release changelog section title to cuda.coop.numba_cuda.
.github/ISSUE_TEMPLATE/2-feature_request.yml Update issue template option label to cuda.coop.numba_cuda (Python).
.github/ISSUE_TEMPLATE/1-bug_report.yml Update issue template option label to cuda.coop.numba_cuda (Python).

@github-actions

This comment has been minimized.

Signed-off-by: Trent Nelson <trent@trent.me>
@tpn tpn self-assigned this May 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

🥳 CI Workflow Results

🟩 Finished in 4h 23m: Pass: 100%/493 | Total: 3d 06h | Max: 46m 52s | Hits: 99%/610288

See results here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Rename cuda.coop to cuda.coop.numba_cuda

2 participants