Skip to content

Add Rust Transpose Load and Store with managed shared storage - #12101

Draft
tpn wants to merge 45 commits into
NVIDIA:mainfrom
tpn:codex/cuda-coop-rust-transpose
Draft

tpn wants to merge 45 commits into
NVIDIA:mainfrom
tpn:codex/cuda-coop-rust-transpose

Conversation

@tpn

@tpn tpn commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Add CUB Transpose Load/Store so Rust callers can use coalesced block memory access with compiler-managed shared storage:

coop::load(block, input, &mut values,
    coop::LoadOptions::default().algorithm(coop::Transpose));
coop::store(block, output, &mut values,
    coop::StoreOptions::default().valid_items(count).algorithm(coop::Transpose));

Transpose Store requires a mutable payload and permutes both values and validity bits, including slots outside a partial write. Direct remains the default. The standalone example runs both algorithms, and the guide explains scratch reuse and completion.

Review after #12099; this cumulative draft adds typed Transpose recipes and their public API/tests. Requires the matching Oxide toolchain from NVIDIA/cuda-rust#1574. This slice supports complete one-dimensional blocks; other algorithms, warp groups and public storage controls follow separately.

Validated with host tests/doctests, strict lint/docs checks, 20 compiler contrasts, 1,137 Transpose GPU cases and all three CUDA sanitizers on CUDA 13.3/sm_120. The standalone matching-toolchain example validates 3,812 values. Final artifacts retain required barriers and representative kernels have no local spills; measured overhead against numeric CUB remains under investigation.

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 <[email protected]>
Install the pinned toolchain without updating rustup itself.

Signed-off-by: Trent Nelson <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Signed-off-by: Trent Nelson <[email protected]>

# Conflicts:
#	rust/Cargo.lock
tpn added 14 commits October 20, 2026 10:49
…da-coop-rust-storage-publication

Signed-off-by: Trent Nelson <[email protected]>
…da-coop-rust-direct-review

Signed-off-by: Trent Nelson <[email protected]>
…da-coop-rust-transpose-public

Signed-off-by: Trent Nelson <[email protected]>

# 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 <[email protected]>
…da-coop-rust-transpose-final-pin

Signed-off-by: Trent Nelson <[email protected]>
@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