diff --git a/cuda-oxide/crates/cargo-oxide/README.md b/cuda-oxide/crates/cargo-oxide/README.md index ce725327f..24fcf30d9 100644 --- a/cuda-oxide/crates/cargo-oxide/README.md +++ b/cuda-oxide/crates/cargo-oxide/README.md @@ -418,13 +418,13 @@ When `cargo oxide` needs the `librustc_codegen_cuda.so` backend, it searches in Outside the repository the backend follows the project's `Cargo.lock`: ```text -Cargo.lock cuda-device = git+https://github.com/NVlabs/cuda-oxide.git#a1b4f118... +Cargo.lock cuda-device = git+https://github.com/NVIDIA/cuda-rust.git# │ ▼ -~/.cargo/git/checkouts/cuda-oxide-*/a1b4f11/ Cargo's checkout of that commit - │ crates/rustc-codegen-cuda → cargo build +~/.cargo/git/checkouts/cuda-rust-*// Cargo's checkout of that commit + │ cuda-oxide/crates/rustc-codegen-cuda → cargo build ▼ -~/.cargo/cuda-oxide/librustc_codegen_cuda.so + source-rev.txt = a1b4f118... +~/.cargo/cuda-oxide/librustc_codegen_cuda.so + source-rev.txt = ``` The kernels compile against the crates at that commit and the backend that diff --git a/cuda-oxide/crates/cargo-oxide/src/backend.rs b/cuda-oxide/crates/cargo-oxide/src/backend.rs index 321e0b5aa..923cafdf1 100644 --- a/cuda-oxide/crates/cargo-oxide/src/backend.rs +++ b/cuda-oxide/crates/cargo-oxide/src/backend.rs @@ -1247,7 +1247,7 @@ fn auto_fetch_and_build() -> PathBuf { "clone", "--depth", "1", - "https://github.com/NVlabs/cuda-oxide.git", + "https://github.com/NVIDIA/cuda-rust.git", src_dir.to_str().unwrap(), ]) .status() diff --git a/cuda-oxide/crates/cargo-oxide/src/backend_source.rs b/cuda-oxide/crates/cargo-oxide/src/backend_source.rs index b3a928695..ce5888cf7 100644 --- a/cuda-oxide/crates/cargo-oxide/src/backend_source.rs +++ b/cuda-oxide/crates/cargo-oxide/src/backend_source.rs @@ -17,14 +17,14 @@ //! dependency instead of from a separately cloned `main`: //! //! ```text -//! Cargo.lock cuda-device = git+https://github.com/NVlabs/cuda-oxide.git# +//! Cargo.lock cuda-device = git+https://github.com/NVIDIA/cuda-rust.git# //! │ cargo metadata: package.manifest_path //! ▼ -//! ~/.cargo/git/checkouts/cuda-oxide-//crates/cuda-device/Cargo.toml -//! │ walk up to the repository root +//! ~/.cargo/git/checkouts/cuda-rust-//cuda-oxide/crates/cuda-device/Cargo.toml +//! │ walk up to the checkout root that holds the backend crate //! ▼ -//! ~/.cargo/git/checkouts/cuda-oxide-//crates/rustc-codegen-cuda built -//! ~/.cargo/git/checkouts/cuda-oxide-//rust-toolchain.toml nightly it needs +//! ~/.cargo/git/checkouts/cuda-rust-//cuda-oxide/crates/rustc-codegen-cuda built +//! ~/.cargo/git/checkouts/cuda-rust-//cuda-oxide/rust-toolchain.toml nightly it needs //! ``` //! //! The checkout's `rust-toolchain.toml` matters as much as the code: the @@ -316,7 +316,7 @@ mod tests { use serde_json::json; use std::time::SystemTime; - const REPO: &str = "https://github.com/NVlabs/cuda-oxide.git"; + const REPO: &str = "https://github.com/NVIDIA/cuda-rust.git"; const SHA: &str = "a1b4f11882592fae9d022c86a9d8d1a4c9426980"; /// Lays out what Cargo's checkout of the repository looks like: the crate diff --git a/cuda-oxide/crates/cargo-oxide/src/commands/scaffold.rs b/cuda-oxide/crates/cargo-oxide/src/commands/scaffold.rs index 599dd8634..b6318bc43 100644 --- a/cuda-oxide/crates/cargo-oxide/src/commands/scaffold.rs +++ b/cuda-oxide/crates/cargo-oxide/src/commands/scaffold.rs @@ -11,7 +11,7 @@ use super::*; // cargo oxide new -- standalone project scaffolding // ========================================================================= -const GIT_REPO: &str = "https://github.com/NVlabs/cuda-oxide.git"; +const GIT_REPO: &str = "https://github.com/NVIDIA/cuda-rust.git"; /// crates.io release of the host-side runtime (`cuda-core`, `cuda-async`). /// In-tree examples and `cuda-host` path-depend on the git-root copies; diff --git a/cuda-oxide/crates/cargo-oxide/src/commands/tests.rs b/cuda-oxide/crates/cargo-oxide/src/commands/tests.rs index 1af0d7163..c7feab42b 100644 --- a/cuda-oxide/crates/cargo-oxide/src/commands/tests.rs +++ b/cuda-oxide/crates/cargo-oxide/src/commands/tests.rs @@ -4878,6 +4878,21 @@ fn scaffold_gitignore_covers_every_clean_artifact_suffix() { } } +#[test] +fn scaffold_names_the_canonical_repository() { + // Both templates must name the repository the crates live in now; the + // pre-move URL resolves only through GitHub's redirect. + for async_mode in [false, true] { + let files = scaffold_files("demo_kernel", async_mode); + assert!( + files + .cargo_toml + .contains("git = \"https://github.com/NVIDIA/cuda-rust.git\"") + ); + assert!(!files.cargo_toml.contains("NVlabs")); + } +} + #[test] fn device_debug_env_value_matches_the_backend_parser() { // The exported strings must round-trip through the shared