Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cuda-oxide/crates/cargo-oxide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Replaces the previous `xtask` pattern with a proper cargo subcommand that works
Install with the project's pinned nightly toolchain:

```bash
cargo +nightly-2026-10-11 install --git https://github.com/NVlabs/cuda-oxide.git cargo-oxide
cargo +nightly-2026-10-11 install --git https://github.com/NVIDIA/cuda-rust.git cargo-oxide
```

On first run, `cargo-oxide` will automatically fetch and build the codegen backend if it's not already available.
Expand Down
2 changes: 1 addition & 1 deletion cuda-oxide/crates/ptx-parse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ re-parsing.

## License

Apache-2.0. See [LICENSE](https://github.com/NVlabs/cuda-oxide/blob/main/LICENSE).
Apache-2.0. See [LICENSE](https://github.com/NVIDIA/cuda-rust/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cuda-oxide/crates/ptx-schedule/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ ptx-schedule kernel.ptx --seed 7 --intensity 0.5 -o perturbed.ptx \

## License

Apache-2.0. See [LICENSE](https://github.com/NVlabs/cuda-oxide/blob/main/LICENSE).
Apache-2.0. See [LICENSE](https://github.com/NVIDIA/cuda-rust/blob/main/LICENSE).
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ ways:
2. It compares a serialized pageable upload -> kernel -> download loop with a
three-stream pipeline using rotating pinned host stagers and persistent device buffers.

Run it from the repository root:
From the cuda-oxide repository root:

```bash
cargo oxide run pinned_overlap
```

See the [book chapter](https://github.com/NVlabs/cuda-oxide/blob/main/cuda-oxide/cuda-oxide-book/async-programming/overlapping-transfers-and-compute.md) for the API and pipeline explanation.
See the [book chapter](https://github.com/NVIDIA/cuda-rust/blob/main/cuda-oxide/cuda-oxide-book/async-programming/overlapping-transfers-and-compute.md) for the API and pipeline explanation.

The program verifies every transformed element before printing its `SUCCESS`
marker. It reports median CUDA-event bandwidth and wall-clock pipeline time so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ for tiles, `ManagedBarrier` for synchronization, and the MMA APIs for
compute.

The [`gemm_sol`
example](https://github.com/NVlabs/cuda-oxide/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/gemm_sol)
example](https://github.com/NVIDIA/cuda-rust/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/gemm_sol)
is the worked-out reference. Its 4-stage `cta_group::2` pipeline reaches
**868 TFLOPS at 4096³ — 57.8 % of `cublasLtMatmul` SoL — on B200 (148 SMs)**.
Absolute throughput scales with SM count on smaller Blackwell datacenter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Generic policy expressions require `#![feature(generic_const_exprs)]`.
currently remain literal.

See the
[`policy_config`](https://github.com/NVlabs/cuda-oxide/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/policy_config)
[`policy_config`](https://github.com/NVIDIA/cuda-rust/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/policy_config)
example for two concrete policies that generate independent PTX
specializations and policy-specific prepared launches.

Expand Down
28 changes: 19 additions & 9 deletions cuda-oxide/cuda-oxide-book/appendix/building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ from a fresh checkout. If you just want to run an example, the
## Clone the repository

```bash
git clone https://github.com/NVlabs/cuda-oxide.git
cd cuda-oxide
git clone https://github.com/NVIDIA/cuda-rust.git
cd cuda-rust
```

## Install the Rust toolchain
Expand Down Expand Up @@ -134,12 +134,16 @@ sudo apt install clang-21 # or libclang-common-21-dev

## Build the workspace

The main workspace contains the user-facing crates (`cuda-device`, `cuda-host`,
`cuda-macros`, etc.) and the build tooling (`cargo-oxide`). The host runtime
(`cuda-bindings`, `cuda-core`, `cuda-async`) is shared with cutile-rs and comes
from crates.io:
The SIMT workspace lives under `cuda-oxide/`. It contains the user-facing
crates (`cuda-device`, `cuda-host`, `cuda-macros`, etc.) and the build tooling
(`cargo-oxide`). The host runtime (`cuda-bindings`, `cuda-core`, `cuda-async`)
is shared with cutile-rs and lives at the repository root; the SIMT workspace
depends on those crates by path. This section, "Verify the installation", and
"Common commands" run from `cuda-oxide/`, where the nightly pin and the
`cargo oxide` workspace alias apply:

```bash
cd cuda-oxide
cargo build
```

Expand All @@ -155,14 +159,16 @@ build process. `cargo-oxide` handles building it transparently.
pipeline. Inside the repo, it works via a workspace alias. For standalone use, install it with the pinned nightly toolchain:

```bash
cargo +nightly-2026-10-11 install --git https://github.com/NVlabs/cuda-oxide.git cargo-oxide
cargo +nightly-2026-10-11 install --git https://github.com/NVIDIA/cuda-rust.git cargo-oxide
```

On first run, `cargo-oxide` automatically fetches and builds the codegen backend
dylib.

## Verify the installation

From `cuda-oxide/`:

```bash
# Check all prerequisites
cargo oxide doctor
Expand All @@ -179,6 +185,8 @@ and prints a success message.

## Common commands

From `cuda-oxide/`:

```bash
# Build and run an example
cargo oxide run <example>
Expand Down Expand Up @@ -208,6 +216,7 @@ The documentation lives in `cuda-oxide-book/` and uses Sphinx with MyST
Markdown. To build and serve locally:

```bash
# From the repository root:
cd cuda-oxide/cuda-oxide-book
make setup # creates venv, installs dependencies
source .venv/bin/activate
Expand All @@ -219,14 +228,15 @@ make livehtml # starts dev server on http://localhost:8000
Standard `cargo doc` works for the workspace crates:

```bash
# From the repository root:
cd cuda-oxide
cargo doc --no-deps --open
```

This generates rustdoc for `cuda-device`, `cuda-host`, `cuda-macros`, and all
other workspace members. The codegen backend is excluded since it is not a
workspace member, and the shared host runtime (`cuda-core`, `cuda-async`) is
documented from cutile-rs.
workspace member. The shared host runtime (`cuda-core`, `cuda-async`) lives in
the workspace at the repository root; run `cargo doc` there to document it.

## Workspace structure

Expand Down
2 changes: 1 addition & 1 deletion cuda-oxide/cuda-oxide-book/appendix/ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ If you're building a Rust + GPU project — or evaluating which of the above
fits your needs — we're happy to compare notes. Join the community on
[Discord](https://discord.gg/ZUEr4AhH5C) for questions, design discussions,
and announcements, or reach the team via
[GitHub Discussions](https://github.com/NVlabs/cuda-oxide/discussions)
[GitHub Discussions](https://github.com/NVIDIA/cuda-rust/discussions)
or by opening an issue on the repository.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ completions[slot] = Some(streams[slot].record_event(None)?);
```

The complete setup, slot-reuse wait, and final drain are in the
[`run_overlapped` implementation](https://github.com/NVlabs/cuda-oxide/blob/main/cuda-oxide/crates/rustc-codegen-cuda/examples/pinned_overlap/src/main.rs).
[`run_overlapped` implementation](https://github.com/NVIDIA/cuda-rust/blob/main/cuda-oxide/crates/rustc-codegen-cuda/examples/pinned_overlap/src/main.rs).

## Measured impact

Expand All @@ -92,7 +92,7 @@ On the reference RTX 4090 (`sm_89`) run:
| Overlapped pinned | 99.332 ms |
| Speedup | 1.76x |

The full transfer table is in the [example README](https://github.com/NVlabs/cuda-oxide/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/pinned_overlap).
The full transfer table is in the [example README](https://github.com/NVIDIA/cuda-rust/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/pinned_overlap).
Results vary with the GPU, PCIe topology, driver, and system load.

## Practical tradeoffs
Expand All @@ -103,4 +103,4 @@ before increasing the number of streams.

For the lower-level stream model, see
[Scheduling and Streams](scheduling-and-streams.md). For the complete runnable
implementation, see the [`pinned_overlap` example](https://github.com/NVlabs/cuda-oxide/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/pinned_overlap).
implementation, see the [`pinned_overlap` example](https://github.com/NVIDIA/cuda-rust/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/pinned_overlap).
2 changes: 1 addition & 1 deletion cuda-oxide/cuda-oxide-book/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/NVlabs/cuda-oxide",
"url": "https://github.com/NVIDIA/cuda-rust",
"icon": "fa-brands fa-github",
"type": "fontawesome",
},
Expand Down
2 changes: 1 addition & 1 deletion cuda-oxide/cuda-oxide-book/getting-started/hello-gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This section walks through installing cuda-oxide, creating a project, writing a
If you haven't already, install the build tool with the pinned nightly toolchain:

```bash
cargo +nightly-2026-10-11 install --git https://github.com/NVlabs/cuda-oxide.git cargo-oxide
cargo +nightly-2026-10-11 install --git https://github.com/NVIDIA/cuda-rust.git cargo-oxide
```

Verify that your environment is set up correctly:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ The other three are not needed to build: `rust-analyzer` powers IDE support, `cl
**For use outside the repo** (your own projects), install it with the pinned nightly toolchain:

```bash
cargo +nightly-2026-10-11 install --git https://github.com/NVlabs/cuda-oxide.git cargo-oxide
cargo +nightly-2026-10-11 install --git https://github.com/NVIDIA/cuda-rust.git cargo-oxide
```

On first run, `cargo-oxide` will automatically fetch and build the codegen backend. Subsequent runs reuse the cached build.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -992,10 +992,10 @@ compiled shape is incompatible with the matrix dimensions.

See:

* [`gemm_sol_final`](https://github.com/NVlabs/cuda-oxide/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/gemm_sol_final)
* [`KernelFamily` integration tests](https://github.com/NVlabs/cuda-oxide/blob/main/cuda-oxide/crates/cuda-host/tests/kernel_family.rs)
* [`cuda-host` kernel-family implementation](https://github.com/NVlabs/cuda-oxide/blob/main/cuda-oxide/crates/cuda-host/src/kernel_family.rs)
* [`cuda-host` README](https://github.com/NVlabs/cuda-oxide/blob/main/cuda-oxide/crates/cuda-host/README.md)
* [`gemm_sol_final`](https://github.com/NVIDIA/cuda-rust/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/gemm_sol_final)
* [`KernelFamily` integration tests](https://github.com/NVIDIA/cuda-rust/blob/main/cuda-oxide/crates/cuda-host/tests/kernel_family.rs)
* [`cuda-host` kernel-family implementation](https://github.com/NVIDIA/cuda-rust/blob/main/cuda-oxide/crates/cuda-host/src/kernel_family.rs)
* [`cuda-host` README](https://github.com/NVIDIA/cuda-rust/blob/main/cuda-oxide/crates/cuda-host/README.md)

## Design guidelines

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ generated beside the kernel function.
### Complete example

The
[`policy_config`](https://github.com/NVlabs/cuda-oxide/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/policy_config)
[`policy_config`](https://github.com/NVIDIA/cuda-rust/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/policy_config)
example defines two policies for one generic kernel and verifies that they
produce:

Expand Down
4 changes: 2 additions & 2 deletions cuda-oxide/cuda-oxide-book/gpu-safety/bounds-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ load a, load b, fma, advance, compare, branch
```

-- exactly the shape of a hand-written raw-pointer loop. The
[`gemm_views`](https://github.com/NVlabs/cuda-oxide/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/gemm_views)
[`gemm_views`](https://github.com/NVIDIA/cuda-rust/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/gemm_views)
example proves this literally: it compiles each safe kernel next to an
`unsafe` raw-pointer twin and verifies that the PTX has the same branch
counts, the same memory instructions, no traps in the loop, and
Expand Down Expand Up @@ -262,7 +262,7 @@ Scope, precisely:
helper function keeps its own checks.
- Turn it on only after the checked build passes, ideally under
`compute-sanitizer`. The
[`unchecked_indexing`](https://github.com/NVlabs/cuda-oxide/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/unchecked_indexing)
[`unchecked_indexing`](https://github.com/NVIDIA/cuda-rust/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/unchecked_indexing)
example shows the PTX with and without the flag.

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ in elements and must match the buffer's layout. The buffer length does not
have to be a multiple of the row width; only complete tiles are returned.

See the runnable
[`proof_carrying_views`](https://github.com/NVlabs/cuda-oxide/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/proof_carrying_views)
[`proof_carrying_views`](https://github.com/NVIDIA/cuda-rust/tree/main/cuda-oxide/crates/rustc-codegen-cuda/examples/proof_carrying_views)
example for 1-D and 2-D versions.

### How `index_2d` is type-safe
Expand Down
Loading