Skip to content

docs(cuda-oxide): link the book and crate READMEs to NVIDIA/cuda-rust - #1491

Merged
nihalpasham merged 2 commits into
NVIDIA:mainfrom
alejandro-soto-franco:docs/oxide-links-cuda-rust
Oct 15, 2026
Merged

nihalpasham merged 2 commits into
NVIDIA:mainfrom
alejandro-soto-franco:docs/oxide-links-cuda-rust

Conversation

@alejandro-soto-franco

@alejandro-soto-franco alejandro-soto-franco commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

The SIMT book, its conf.py and the cargo-oxide, ptx-parse, ptx-schedule and pinned_overlap READMEs still named NVlabs/cuda-oxide in 23 current-repository references and reached the repository only through GitHub's redirect. This moves every one of them to NVIDIA/cuda-rust: four cargo install --git lines, the clone step, 16 tree and blob links to 13 targets, the Discussions link and the book's GitHub icon. Issue and pull-request permalinks keep their historical form, as AGENTS.md asks.

Before: git clone https://github.com/NVlabs/cuda-oxide.git   # redirect; creates cuda-oxide/ holding the monorepo
        cd cuda-oxide
After:  git clone https://github.com/NVIDIA/cuda-rust.git
        cd cuda-rust
        cd cuda-oxide                                        # build, doctor and run live here
cargo +nightly-2026-10-11 install --git https://github.com/NVIDIA/cuda-rust.git cargo-oxide

What we fixed

  • conf.py: the GitHub icon links https://github.com/NVIDIA/cuda-rust.
  • Four cargo install --git lines (cargo-oxide README, Building from Source, Writing Your First Kernel, Installation) and the clone step in Building from Source.
  • 16 tree and blob links to 13 targets across seven book pages and the ptx-parse, ptx-schedule and pinned_overlap READMEs.
  • The Discussions link in the ecosystem appendix.
  • Building from Source: the build, verify and common-commands sections run from cuda-oxide/, where the nightly pin and the cargo oxide alias apply, and the book and rustdoc sections start from the repository root. The shared host runtime is described as a path dependency on the repository-root crates, documented from the root workspace.
  • pinned_overlap README: the run line names the cuda-oxide root, like the other example READMEs.
Implementation

Verification

Checked at e678f228:

  • ✅ All 13 distinct link targets exist on origin/main (git ls-tree), tree links to directories and blob links to files.
  • ✅ NVIDIA/cuda-rust has Discussions enabled; NVlabs/cuda-oxide still redirects there.
  • ✅ sphinx-build -W --keep-going -b html (Sphinx 9.1.0, 41 pages) builds with no warnings; the rendered HTML has no non-permalink NVlabs/cuda-oxide URL left (24 in the book and READMEs on main before, 1 after, owned by fix(cargo-oxide): scaffold and clone from NVIDIA/cuda-rust #1489).
  • ✅ All 18 scripts/check-*.sh guards pass, including check-source-references.sh, check-book-api-names.sh and check-host-api-paths.sh.
  • ✅ cargo test for cargo-oxide, ptx-parse and ptx-schedule (243, 35 and 27 tests), clippy with -D warnings, rustdoc, cargo oxide fmt --check and sync-example-locks.sh --check pass.
  • ✅ cargo oxide run pinned_overlap on an RTX 5090 (sm_120a) prints its success marker; compute-sanitizer memcheck reports 0 errors.
  • ✅ A dry-run cargo install --git against a snapshot of this tree discovers cargo-oxide in the nested workspace.
  • ✅ From the monorepo root, cargo oxide doctor reports the stable 1.98.0 toolchain and cargo oxide build vecadd fails on nightly-only flags; from cuda-oxide/ both succeed. The directory anchors were re-checked with the same book build and guards.

Caveats

Clone and install lines, tree and blob links, the Discussions link and the
book's GitHub icon still named NVlabs/cuda-oxide. They work only through
GitHub's redirect, and cloning the old URL creates a directory named
cuda-oxide, which the building-from-source steps then entered as if it were
the repository root. Issue and pull-request permalinks keep their historical
form, as AGENTS.md asks.

Signed-off-by: Alejandro Soto Franco <sotofranco.eng@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nihalpasham nihalpasham added the cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book label Oct 15, 2026
The appendix clones the monorepo, then runs `cargo build` and the
`cargo oxide` commands from the repository root, where the stable host
workspace applies and the `oxide` alias does not exist. Add the
`cd cuda-oxide` step, anchor the verify and common-commands sections to
`cuda-oxide/`, start the book and rustdoc blocks from the repository
root, and describe the shared host crates as path dependencies of the
root workspace. The pinned_overlap README uses the sibling READMEs'
"From the cuda-oxide repository root:" line.

Signed-off-by: nihalpasham <nihalp@nvidia.com>
@nihalpasham

Copy link
Copy Markdown
Collaborator

/ok to test 8f403a2

@nihalpasham nihalpasham added the documentation Improvements or additions to documentation label Oct 15, 2026
nihalpasham pushed a commit that referenced this pull request Oct 15, 2026
…NVIDIA/cuda-rust (#1490)

## What this adds

The SIMT tree still named the pre-rename repository in its Cargo
metadata, its license inventory and the device-codegen ICE message,
while the four host crates already pointed at `NVIDIA/cuda-rust`
(#1395). This change moves the SIMT tree to the same home: one inherited
`[workspace.package] repository` line for the 26 workspace members,
explicit fields on the two first-party crates outside that workspace, 29
inventory rows and the ICE text. The only compiled change is the string
in that diagnostic.

```text
cargo metadata `repository`, 28 SIMT crates   before: https://github.com/NVlabs/cuda-oxide.git   after: https://github.com/NVIDIA/cuda-rust (one value)
first-party inventory rows at the old URL      before: 29 of 33                                   after: 0 of 33
ICE text                                       before: ...Please file at https://github.com/NVlabs/cuda-oxide/issues
                                               after:  ...Please file at https://github.com/NVIDIA/cuda-rust/issues
```

```rust
// The only compiled change: the diagnostic printed when device codegen panics.
tcx.dcx().fatal(format!(
    "[rustc_codegen_cuda] Internal compiler error in device codegen: {msg}. \
     This is a bug in cuda-oxide. Please file at https://github.com/NVIDIA/cuda-rust/issues"
));
```

## What we fixed

- `cuda-oxide/Cargo.toml` `[workspace.package] repository`, inherited by
every `repository.workspace = true` member (26 crates).
- `rustc-codegen-cuda/Cargo.toml` and
`examples/mathdx_ffi_test/libmathdx-sys/Cargo.toml`, the two first-party
manifests that cannot inherit the workspace field.
- 29 of the 33 first-party rows of `cuda-oxide/dependency-licenses.csv`;
the four git-root host rows already carried the new URL.
- The fatal internal-compiler-error message in `rustc_codegen_cuda` now
names `https://github.com/NVIDIA/cuda-rust/issues`.

<details><summary>Implementation</summary>

- The URL form matches the host crates
(`https://github.com/NVIDIA/cuda-rust`, no `.git` suffix).
- `repository` is not part of `Cargo.lock` and nothing in the tree reads
it, so no lockfile, symbol or PTX changes.
- The inventory guard compares crate names only; the rows are
hand-maintained, so the URL column was edited directly.
- The remaining old-URL sites under `cuda-oxide/` are the cargo-oxide
clone and scaffold constants (#1489), the book and crate README links
(#1491), and issue and pull permalinks that keep their historical form.

</details>

## Verification

Checked at `dad294fd` (merged with `main` at `bc46b1ff`):

- ✅ `git grep NVlabs/cuda-oxide` over the three manifests, the inventory
and `lib.rs`: 1, 1, 1, 1, 29 hits on `main`, 0 after the change.
- ✅ `cargo metadata --locked --offline --no-deps` in the SIMT workspace
(26 members), the backend crate workspace and the `mathdx_ffi_test`
workspace: one `repository` value,
`https://github.com/NVIDIA/cuda-rust`; `git status` clean afterwards.
- ✅ `strings` on the rebuilt `librustc_codegen_cuda.so`: `Please file at
https://github.com/NVIDIA/cuda-rust/issues` once, the old URL zero
times; `main`'s backend still shows the old URL.
- ✅ `cargo oxide run vecadd` and `cargo oxide run mathdx_ffi_test
--emit-nvvm-ir --arch=sm_120` on an RTX 5090 through the rebuilt
backend: `SUCCESS` and `Passed: 9 / Failed: 0`; compute-sanitizer
memcheck 0 errors on both; `vecadd` PTX identical to `main` modulo
symbol hashes.
- ✅ All 18 `scripts/check-*.sh` guards, `sync-example-locks.sh --check`,
`cargo deny check` for cargo-oxide, rustc-codegen-cuda, the device-only
fixture and the root workspace, `cargo oxide fmt --check`, clippy with
`-D warnings`, and the unit, doc and rustdoc suites (5479 tests passed,
0 failed).
- ✅ No file in this PR appears in #1489 or #1491.

## Caveats

- The `oxide-artifacts` inventory row now names the current home; the
published 0.2.1 crate still declares the old URL until the next publish
from `crates/oxide-artifacts`.
- No test reaches the ICE message; the string change is confirmed by
compilation and the dylib strings only.
- Clone and scaffold URLs in cargo-oxide and the book and README links
are left to #1489 and #1491.

Signed-off-by: Alejandro Soto Franco <sotofranco.eng@gmail.com>
@nihalpasham

Copy link
Copy Markdown
Collaborator

Checked at 8f403a2a:

  • Every new tree and blob link resolves on main; issue and PR permalinks stay in their historical form.
  • I added one commit on top: the building-from-source page ran cargo build and cargo oxide from the repository root, where the oxide alias does not exist. It now says cd cuda-oxide first and describes the host crates as path dependencies. One README line follows the sibling examples.
  • The book builds with warnings as errors, and the five book and reference guards pass. CI is green on this head.

@nihalpasham
nihalpasham merged commit e86d859 into NVIDIA:main Oct 15, 2026
62 checks passed
nihalpasham added a commit that referenced this pull request Oct 15, 2026
## What this adds

`cargo oxide new` writes the repository address of `cuda-device` and
`cuda-host` into every new project's manifest, and the backend fallback
clone fetches the same address when no cuda-oxide dependency pins a
commit. Both still named the pre-move `NVlabs/cuda-oxide` repository,
which resolves only through GitHub's redirect and leaves every new
lockfile recording the old source. Both now name `NVIDIA/cuda-rust`.

```text
cargo oxide new demo

Before  cuda-device = { git = "https://github.com/NVlabs/cuda-oxide.git" }
        source = "git+https://github.com/NVlabs/cuda-oxide.git#bc46b1ff..."   (via redirect)
        checkout ~/.cargo/git/checkouts/cuda-oxide-<hash>/bc46b1f/

After   cuda-device = { git = "https://github.com/NVIDIA/cuda-rust.git" }
        source = "git+https://github.com/NVIDIA/cuda-rust.git#bc46b1ff..."    (direct)
        checkout ~/.cargo/git/checkouts/cuda-rust-<hash>/bc46b1f/
```

```bash
cargo oxide new demo && cd demo
cargo oxide build   # builds the backend from the checkout Cargo made for cuda-device
```

## What we fixed

- `GIT_REPO` in `scaffold.rs`, interpolated into both scaffold
templates, now reads `https://github.com/NVIDIA/cuda-rust.git`.
- The fallback `git clone --depth 1` in `backend.rs`, used only for
projects with no cuda-oxide dependency, clones the same address.
- The `backend_source.rs` module diagram, its test constant and the
matching README diagram follow: the checkout is `cuda-rust-<hash>`, and
the backend crate and the toolchain pin sit under `cuda-oxide/` in it.
- A scaffold test asserts the emitted `git =
"https://github.com/NVIDIA/cuda-rust.git"` lines in both templates and
rejects the old address.

<details><summary>Implementation</summary>

- Backend discovery never reads the URL:
`dependency_source_from_metadata` keys on the package name and
`manifest_path`, `git_source_rev` keeps only the `#<sha>` fragment, and
`checkout_root` walks up to the first directory holding `Cargo.toml`
plus the codegen crate, bounded by `.git` or `.cargo-ok`.
- `codegen_crate_in_checkout` prefers
`cuda-oxide/crates/rustc-codegen-cuda` and falls back to the historical
flat `crates/rustc-codegen-cuda`; `pinned_channel` walks from the
codegen crate upward, so the component nightly wins over the stable pin
at the git root. The same two functions serve the fallback clone.
- The backend cache is keyed by commit (`source-rev.txt`), not by URL,
so cached backends and existing projects are unaffected.
- The historical issue permalink to `/issues/96` in the
README stays, per the repository guide.

</details>

## Verification

Checked at `746d60eb`:

- ✅ `cargo test -p cargo-oxide --all-targets`: 243 passed; 244 with the
new URL test.
- ✅ `cargo clippy -p cargo-oxide --all-targets -- -D warnings`, `cargo
fmt --check`, rustdoc with `-D warnings`, and all 18
`scripts/check-*.sh` guards pass.
- ✅ `grep -rn NVlabs crates/cargo-oxide/src` returns nothing; the
remaining hits are the README install line (#1491) and the #96
permalink.
- ✅ In an isolated `CARGO_HOME`: `cargo oxide new` writes the new
address in both templates; `cargo generate-lockfile` records
`git+https://github.com/NVIDIA/cuda-rust.git#bc46b1ff` for
`cuda-device`, `cuda-host` and `cuda-macros` in a `cuda-rust-*`
checkout; `cargo oxide build` builds the backend from that checkout's
`cuda-oxide/crates/rustc-codegen-cuda` under nightly-2026-10-11 and
caches it with `source-rev.txt = bc46b1f`.
- ✅ The old-address baseline binary scaffolds `NVlabs/cuda-oxide.git`
and resolves the same commit through the redirect; `git ls-remote` on
both URLs returns the same HEAD.
- ✅ A shallow clone of `NVIDIA/cuda-rust` builds the backend offline
from its nested codegen crate under the component nightly, which is the
fallback route.
- ✅ Auto-merges with #1488, #1490 and #1491 in either order.

## Caveats

- A scaffolded project still fails to compile at this head with two
`cuda-core` crates in its graph; that is #1488's fix and is independent
of the address.
- A graph that mixes the old and new address for the same crate resolves
two checkouts and `cargo oxide` refuses it;
`[patch."https://github.com/NVlabs/cuda-oxide.git"]` pointing the crate
at the new address collapses the graph to one source.
- Machines that already hold the old-address git database fetch the
repository once more under the new name; the backend cache is reused
because it is keyed by commit.
- The remaining old-address mentions are the install lines (#1491) and
the manifest `repository` fields and license CSV (#1490).

---------

Signed-off-by: Alejandro Soto Franco <sotofranco.eng@gmail.com>
Signed-off-by: nihalpasham <nihalp@nvidia.com>
Co-authored-by: nihalpasham <nihalp@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants