Skip to content

cuda.coop: execute all Block Load and Store algorithms - #11200

Draft
tpn wants to merge 4 commits into
codex/cuda-coop-numba-block-load-storefrom
codex/cuda-coop-numba-block-load-store-algorithms
Draft

cuda.coop: execute all Block Load and Store algorithms#11200
tpn wants to merge 4 commits into
codex/cuda-coop-numba-block-load-storefrom
codex/cuda-coop-numba-block-load-store-algorithms

Conversation

@tpn

@tpn tpn commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Why this is needed

PR #11182 establishes portable group planning and the Numba-CUDA-MLIR provider
infrastructure, but deliberately limits Block Load and Store to DIRECT. This
stacked PR completes the CUB Block Load/Store algorithm matrix while keeping
activation, dispatch, caching, phase orchestration, and shared-storage
machinery family-independent.

Reviewer-visible behavior

All six lowercase selectors execute through the portable and qualified APIs:

Selector Provider storage ABI Reuse synchronization
direct, striped, vectorize none none
transpose, warp_transpose, warp_transpose_timesliced leading pointer block
  • Transpose Store preserves the caller payload even though CUB uses it as
    exchange scratch space.
  • Partial transpose Load without oob_default preserves each invalid payload
    slot through a family-owned CUB wrapper.
  • Caller-owned and dynamic storage retain the capacity, alignment, ownership,
    and reuse validation supplied by Add Numba-CUDA-MLIR Block Load and Store to cuda.coop #11182.
  • The shared planner also recognizes the keyword form
    cuda.local.array(shape=...).
  • Provider selection, implementation provenance, storage ABI, and
    synchronization remain declarative family metadata.

Validation

The exact final-stack head 9b299e894f, which includes this layer, passed:

  • 1,440 source-tree tests with the GPU hidden.
  • 607 installed-wheel contract, packaging, public-surface, and activation
    tests outside the source tree.
  • 50 installed-wheel real NVRTC LTO/nvJitLink compile tests.
  • 366 installed-wheel runtime tests on an RTX PRO 6000.

Stack and scope

This draft is stacked on #11182. It does not add Warp groups, Reduce, Scan,
Exchange, Shuffle, CUDAX dispatch, callbacks, or Python operator compilation.
It inherits the guarded Numba-CUDA-MLIR compatibility shim debt from the
foundation PR.

@copy-pr-bot

copy-pr-bot Bot commented Sep 4, 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.

@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Progress in CCCL Sep 4, 2026
@tpn
tpn force-pushed the codex/cuda-coop-numba-block-load-store-algorithms branch from 8ecfb54 to 39755f7 Compare September 4, 2026 16:52
tpn added 4 commits September 4, 2026 10:53
Route all six selectors through declarative provider metadata.

Use separate factories for storage-free and storage-bearing forms.

Preserve Store payloads for exchange-based algorithms.

Keep invalid partial Load values through a family-owned wrapper.

Recover keyword-form local array extents in the generic planner.

Signed-off-by: Trent Nelson <trent@trent.me>
Cover all layouts with independent host oracles.

Exercise portable and qualified core and backend routes.

Check provider identity and real NVRTC compilation.

Check whole-function storage rewriting and RTX runtime behavior.

Signed-off-by: Trent Nelson <trent@trent.me>
Describe every algorithm layout and storage contract.

Call out Store payload preservation and temporary storage reuse.

Signed-off-by: Trent Nelson <trent@trent.me>
Keep portable and qualified algorithm selection on one normalized
lowercase string contract. Reject enum-like objects and integers before
provider materialization, including the former ordinal value zero.

Cover planner and provider paths and document the runtime contract.

Signed-off-by: Trent Nelson <trent@trent.me>
@tpn
tpn force-pushed the codex/cuda-coop-numba-block-load-store-algorithms branch from 39755f7 to a4d8965 Compare September 4, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant