Skip to content

Add public Rust Direct Load and Store operations - #12099

Closed
tpn wants to merge 40 commits into
NVIDIA:mainfrom
tpn:codex/cuda-coop-rust-direct
Closed

tpn wants to merge 40 commits into
NVIDIA:mainfrom
tpn:codex/cuda-coop-rust-direct

Conversation

@tpn

@tpn tpn commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #12088, which now owns this implementation within its complete feature family. The original commits, branch and validation evidence remain available. This draft is closed unmerged.


Historical scope and validation below refer to the original source heads.

Rust kernels can load and store block tiles through the public cuda.coop API, with inferred element types and item counts:

let mut items = coop::ThreadData::<_, ITEMS_PER_THREAD>::new();
coop::load(coop::this_block(), input, &mut items, Default::default());
coop::store(coop::this_block(), &mut output, &items, Default::default());

Direct operations support ten numeric types on complete one-dimensional blocks. Options supply counts, offsets and typed defaults. Load tracks initialized slots; Store accepts a shared payload and preserves its values and validity. Scalar Store supplies one item per thread.

This update aligns the compiler pins and lockfiles with Rust 1.99.1 and corrects three expected diagnostic strings. The API, provider and compiler-case programs are unchanged.

Owning validation passes: host tests, strict lints/docs and provider MSRV 1.85; native tests covering 16 and 100 requests; the 1,906-value example, 925 public cases and seven offset cases; four sanitizer commands and seven expected traps. All 13 compiler controls pass (four accepts, nine rejects). Executable-source checks transfer across the final diagnostic-only change; the controls ran on the corrected commit. Host CI and all upstream checks pass on this commit.

Builds on #12091 and #12092. The PR diff against main is cumulative. Immutable comparisons above R02 and above R03 each also include the other prerequisite.

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>
…da-coop-rust-direct-review

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
tpn added 9 commits October 23, 2026 08:33
Keep the owning implementation and tests unchanged while applying
its scoped compiler, lock and documentation compatibility updates.

Signed-off-by: Trent Nelson <trent@trent.me>
Keep the owning implementation and tests unchanged while applying
its scoped compiler, lock and documentation compatibility updates.

Signed-off-by: Trent Nelson <trent@trent.me>
Keep the owning implementation and tests unchanged while applying
its scoped compiler, lock and documentation compatibility updates.

Signed-off-by: Trent Nelson <trent@trent.me>
Keep the owning implementation and tests unchanged while applying
its scoped compiler, lock and documentation compatibility updates.

Signed-off-by: Trent Nelson <trent@trent.me>
Keep the owning implementation and tests unchanged while applying
its scoped compiler, lock and documentation compatibility updates.

Signed-off-by: Trent Nelson <trent@trent.me>
Resolve artifact metadata from the pinned compiler source.
Keep the owning implementation and dependency versions unchanged.

Signed-off-by: Trent Nelson <trent@trent.me>
Merge the corrected prerequisite while preserving this owner.

Signed-off-by: Trent Nelson <trent@trent.me>
Record the existing provider build dependency in the query lock.
Keep implementation and third-party dependency records unchanged.

Signed-off-by: Trent Nelson <trent@trent.me>
Use the existing compiler diagnostic for three original cases.
Keep their program bodies and all other expectations unchanged.

Signed-off-by: Trent Nelson <trent@trent.me>
@tpn tpn closed this Oct 25, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in CCCL Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant