Skip to content

Support multidimensional Rust Load and Store blocks - #12102

Draft
tpn wants to merge 47 commits into
NVIDIA:mainfrom
tpn:codex/cuda-coop-rust-block-shapes
Draft

tpn wants to merge 47 commits into
NVIDIA:mainfrom
tpn:codex/cuda-coop-rust-block-shapes

Conversation

@tpn

@tpn tpn commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Rust Load/Store currently accepts only one-dimensional blocks. Preserve the full compiled block shape so Direct and Transpose also work with two- and three-dimensional blocks, including shapes such as (11, 3, 1) and (8, 4, 4).

The native provider passes all axes to CUB and uses its linear thread rank for payload validity and Transpose mask permutation. Launch preparation rejects a different shape even when it has the same total thread count. Existing one-dimensional constructors remain supported.

Review after #12101. This cumulative draft adds block-shape handling and focused tests/docs; it uses the same pinned Oxide toolchain from NVIDIA/cuda-rust#1574.

Validated with host/MSRV tests, strict Clippy/docs checks, 264 typed and 24 raw native specializations, 1,093 Direct and 1,305 Transpose GPU cases, all three CUDA sanitizers for both algorithms, and expected invalid-operation traps. Final CUBIN metadata matches all three block axes. Other algorithms, warp groups and public storage controls remain separate work.

tpn added 30 commits October 19, 2026 21:39
Create a host-only Cargo workspace that specializes selected CUB forms
through NVRTC and reports exact scratch layouts with their LTO output.
Bind specialization identities to source, headers and toolkit bytes.
Include a runnable provider example, Rust guide and CPU checks.

Signed-off-by: Trent Nelson <trent@trent.me>
Install the pinned toolchain without updating rustup itself.

Signed-off-by: Trent Nelson <trent@trent.me>
Serve native specialization batches through the versioned Oxide boundary
and exercise Load and Store through a standalone Cargo consumer with a
generic helper dependency.

Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Reuse the same helper sites with 64- and 128-thread kernels and retain

one device static across their emitted bodies. Check each launch plan

and preserve fixed external-symbol diagnostics.

Signed-off-by: Trent Nelson <trent@trent.me>
Select fixture output locations from raw CUDA coordinates and exercise
payload initialization, access and copying at both item counts. Annotate
compile-fail examples and clarify hierarchy ordering in the guide.

Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>

# Conflicts:
#	rust/Cargo.lock
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
tpn added 17 commits October 20, 2026 10:49
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
…da-coop-rust-storage-publication

Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
…da-coop-rust-direct-review

Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
…da-coop-rust-transpose-public

Signed-off-by: Trent Nelson <trent@trent.me>

# Conflicts:
#	rust/cuda-coop-codegen/tests/oxide-fixture/README.md
#	rust/cuda-coop-codegen/tests/oxide-fixture/api/Cargo.toml
#	rust/cuda-coop-codegen/tests/run_oxide_fixture.py
…da-coop-rust-transpose-public

Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
…da-coop-rust-transpose-final-pin

Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
Signed-off-by: Trent Nelson <trent@trent.me>
@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 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.

@github-project-automation github-project-automation Bot moved this to Todo in CCCL Oct 20, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Progress in CCCL Oct 20, 2026

This branch has not been deployed

No deployments
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