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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The current line-up of libraries is the following:
- `cuda_std` for GPU-side functions and utilities, such as thread index queries, memory allocation, warp intrinsics, etc.
- _Not_ a low level library, provides many utility functions to make it easier to write cleaner and more reliable GPU kernels.
- Closely tied to `rustc_codegen_nvvm` which exposes GPU features through it internally.
- [`cudnn`](https://github.com/Rust-GPU/Rust-CUDA/tree/master/crates/cudnn) for a collection of GPU-accelerated primitives for deep neural networks.
- [`cudnn`](https://github.com/Rust-GPU/rust-cuda/tree/master/crates/cudnn) for a collection of GPU-accelerated primitives for deep neural networks.
- `cust` for CPU-side CUDA features such as launching GPU kernels, GPU memory allocation, device queries, etc.
- High level with features such as RAII and Rust Results that make it easier and cleaner to manage the interface to the GPU.
- A high level wrapper for the CUDA Driver API, the lower level version of the more common CUDA Runtime API used from C++.
Expand Down Expand Up @@ -92,7 +92,7 @@ Other projects related to using Rust on the GPU:
cargo build
```

## Use Rust-CUDA in Container Environments
## Use Rust CUDA in Container Environments

The distribution related Dockerfile are located in `container` folder.
Taking ubuntu 24.04 as an example, run the following command in repository root:
Expand Down
4 changes: 2 additions & 2 deletions container/rockylinux9-cuda12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ RUN curl -sSf -L https://sh.rustup.rs | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Setup the workspace
WORKDIR /data/Rust-CUDA
RUN --mount=type=bind,source=rust-toolchain.toml,target=/data/Rust-CUDA/rust-toolchain.toml \
WORKDIR /data/rust-cuda
RUN --mount=type=bind,source=rust-toolchain.toml,target=/data/rust-cuda/rust-toolchain.toml \
rustup show

# Add nvvm to LD_LIBRARY_PATH.
Expand Down
4 changes: 2 additions & 2 deletions container/ubuntu22-cuda11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ RUN curl -sSf -L https://sh.rustup.rs | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Setup the workspace
WORKDIR /data/Rust-CUDA
RUN --mount=type=bind,source=rust-toolchain.toml,target=/data/Rust-CUDA/rust-toolchain.toml \
WORKDIR /data/rust-cuda
RUN --mount=type=bind,source=rust-toolchain.toml,target=/data/rust-cuda/rust-toolchain.toml \
rustup show

# Add nvvm to LD_LIBRARY_PATH.
Expand Down
4 changes: 2 additions & 2 deletions container/ubuntu22-cuda12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ RUN curl -sSf -L https://sh.rustup.rs | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Setup the workspace
WORKDIR /data/Rust-CUDA
RUN --mount=type=bind,source=rust-toolchain.toml,target=/data/Rust-CUDA/rust-toolchain.toml \
WORKDIR /data/rust-cuda
RUN --mount=type=bind,source=rust-toolchain.toml,target=/data/rust-cuda/rust-toolchain.toml \
rustup show

# Add nvvm to LD_LIBRARY_PATH.
Expand Down
4 changes: 2 additions & 2 deletions container/ubuntu24-cuda12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ RUN curl -sSf -L https://sh.rustup.rs | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Setup the workspace
WORKDIR /data/Rust-CUDA
RUN --mount=type=bind,source=rust-toolchain.toml,target=/data/Rust-CUDA/rust-toolchain.toml \
WORKDIR /data/rust-cuda
RUN --mount=type=bind,source=rust-toolchain.toml,target=/data/rust-cuda/rust-toolchain.toml \
rustup show

# Add nvvm to LD_LIBRARY_PATH.
Expand Down
2 changes: 1 addition & 1 deletion crates/blastoff/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "blastoff"
version = "0.1.0"
edition = "2021"
authors = ["Riccardo D'Ambrosio <[email protected]>"]
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"

[dependencies]
bitflags = "2.8"
Expand Down
2 changes: 1 addition & 1 deletion crates/cuda_builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
authors = ["Riccardo D'Ambrosio <[email protected]>", "The rust-gpu Authors"]
license = "MIT OR Apache-2.0"
description = "Builder for easily building rustc_codegen_nvvm crates"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/cuda_std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.2.2"
edition = "2018"
license = "MIT OR Apache-2.0"
description = "Standard library for CUDA with rustc_codegen_nvvm"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/cuda_std_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.2.0"
edition = "2018"
license = "MIT OR Apache-2.0"
description = "Macros for cuda_std"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion crates/cudnn-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "cudnn-sys"
version = "0.1.0"
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"
links = "cudnn"
build = "build/main.rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/cust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ it much easier to write multigpu code. The CUDA API is fully thread-safe except
- Added `MemoryAdvise::advise_read_mostly`.
- Added `MemoryAdvise::preferred_location` and `MemoryAdvise::unset_preferred_location`.
Note that advising APIs are only present on high end GPUs such as V100s.
- `StreamFlags::NON_BLOCKING` has been temporarily disabled because of [soundness concerns](https://github.com/Rust-GPU/Rust-CUDA/issues/15).
- `StreamFlags::NON_BLOCKING` has been temporarily disabled because of [soundness concerns](https://github.com/Rust-GPU/rust-cuda/issues/15).

## 0.2.0 - 11/26/21

Expand Down
2 changes: 1 addition & 1 deletion crates/cust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
edition = "2021"
license = "MIT OR Apache-2.0"
description = "High level bindings to the CUDA Driver API"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions crates/cust/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bitflags::bitflags! {

/// This stream does not synchronize with the NULL stream.
///
/// **Note: this flag has been temporarily disabled because of [soundness concerns](https://github.com/Rust-GPU/Rust-CUDA/issues/15)**
/// **Note: this flag has been temporarily disabled because of [soundness concerns](https://github.com/Rust-GPU/rust-cuda/issues/15)**
///
/// Note that the name is chosen to correspond to CUDA documentation, but is nevertheless
/// misleading. All work within a single stream is ordered and asynchronous regardless
Expand Down Expand Up @@ -93,7 +93,7 @@ impl Stream {
/// # }
/// ```
pub fn new(mut flags: StreamFlags, priority: Option<i32>) -> CudaResult<Self> {
// NOTE(RDambrosio016): See https://github.com/Rust-GPU/Rust-CUDA/issues/15
// NOTE(RDambrosio016): See https://github.com/Rust-GPU/rust-cuda/issues/15
flags.remove(StreamFlags::NON_BLOCKING);
unsafe {
let mut stream = Stream {
Expand Down
2 changes: 1 addition & 1 deletion crates/cust_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.1"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Core library for cust that can be shared across CPU and GPU"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/cust_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Brook Heisler <[email protected]>", "Riccardo D'Ambrosio <rdamb
edition = "2018"
license = "MIT OR Apache-2.0"
description = "Macros for cust"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion crates/cust_raw/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.11.3"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Low level bindings to the CUDA Driver API"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"
links = "cuda"
build = "build/main.rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/gpu_rand/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["The Rand Project Developers", "The Rust CUDA Project Developers"]
license = "MIT OR Apache-2.0"
edition = "2021"
description = "GPU-friendly random number generators for the Rust CUDA Project"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/nvvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Riccardo D'Ambrosio <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
description = "High level bindings to libnvvm"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/optix-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "optix-sys"
version = "0.1.0"
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"
links = "optix"
build = "build/main.rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/optix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "optix"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"
authors = ["Anders Langlands <[email protected]>", "Riccardo D'Ambrosio <[email protected]>"]

Expand Down
2 changes: 1 addition & 1 deletion crates/optix_device_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2018"
license = "MIT OR Apache-2.0"
description = "Macros for optix_device"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion crates/ptx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2018"
license = "MIT OR Apache-2.0"
description = "PTX parser and analyzer"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/ptx_compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.1"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "High level bindings to CUDA's ptx compilation APIs"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/rustc_codegen_nvvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [
edition = "2024"
license = "MIT OR Apache-2.0"
description = "A codegen backend for Rustc which targets the libnvvm CUDA library"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions crates/rustc_codegen_nvvm/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ macro_rules! math_builder_methods {
_ => {
self.cx.fatal(format!(
"Unimplemented 128-bit integer operation '{}' with {} arguments. \
This operation is not yet supported in Rust-CUDA. \
This operation is not yet supported in Rust CUDA. \
Consider using 64-bit integers or filing an issue at \
https://github.com/Rust-GPU/Rust-CUDA/issues",
https://github.com/Rust-GPU/rust-cuda/issues",
stringify!($name),
args_vec.len()
));
Expand Down
2 changes: 1 addition & 1 deletion crates/rustc_codegen_nvvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ use std::ffi::CString;
#[unsafe(no_mangle)]
pub fn __rustc_codegen_backend() -> Box<dyn CodegenBackend> {
rustc_driver::install_ice_hook(
"https://github.com/Rust-GPU/Rust-CUDA/issues/new",
"https://github.com/Rust-GPU/rust-cuda/issues/new",
|handler| {
handler.handle().note(concat!(
"`rust-cuda` version `",
Expand Down
2 changes: 1 addition & 1 deletion crates/rustc_codegen_nvvm_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Macros for rustc_codegen_nvvm"
repository = "https://github.com/Rust-GPU/Rust-CUDA"
repository = "https://github.com/Rust-GPU/rust-cuda"
readme = "../../README.md"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/cuda/gemm/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Example demonstrating GEMM (General Matrix Multiply) on CUDA using Rust-CUDA.
//! Example demonstrating GEMM (General Matrix Multiply) on CUDA using Rust CUDA.
//!
//! This example benchmarks naive and tiled GEMM kernels as well as cuBLAS for various matrix sizes.
//! It uses the `cust` crate for CUDA management and `ndarray` for host-side matrix operations.
Expand Down
4 changes: 2 additions & 2 deletions guide/src/guide/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Before you can use the project to write GPU crates, you will need a couple of pr
- [The CUDA SDK](https://developer.nvidia.com/cuda-downloads), version `11.2-11.8` (and the appropriate driver - [see cuda release notes](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html)).

- We recently [added experimental support for the `12.x`
SDK](https://github.com/Rust-GPU/Rust-CUDA/issues/100), please file any issues you
SDK](https://github.com/Rust-GPU/rust-cuda/issues/100), please file any issues you
see

This is only for building GPU crates, to execute built PTX you only need CUDA `9+`.
Expand Down Expand Up @@ -234,7 +234,7 @@ components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

There is also a [Dockerfile](Dockerfile) prepared as a quickstart with all the necessary libraries for base cuda development.

You can use it as follows (assuming your clone of Rust-CUDA is at the absolute path `RUST_CUDA`):
You can use it as follows (assuming your clone of Rust CUDA is at the absolute path `RUST_CUDA`):

- Ensure you have Docker setup to [use gpus](https://docs.docker.com/config/containers/resource_constraints/#gpu)
- Build `docker build -t rust-cuda $RUST_CUDA`
Expand Down
4 changes: 2 additions & 2 deletions tests/compiletests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compiletests for Rust-CUDA
# Compiletests for Rust CUDA

This directory contains compile tests for the Rust-CUDA project using the `compiletest` framework.
This directory contains compile tests for the Rust CUDA project using the `compiletest` framework.

The code in these tests is not executed. Tests check that the compiler compiles
correctly. Tests in `dis/` verify correct PTX output.
Expand Down
2 changes: 1 addition & 1 deletion tests/compiletests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn main() {

// HACK(eddyb) force `compiletest` to pass `ui/...` relative paths to `rustc`,
// which should always end up being the same regardless of the path that the
// Rust-CUDA repo is checked out at (among other things, this avoids hardcoded
// Rust CUDA repo is checked out at (among other things, this avoids hardcoded
// `compiletest` limits being hit by e.g. users with slightly longer paths).
std::env::set_current_dir(tests_dir).unwrap();
let tests_dir = PathBuf::from("");
Expand Down
Loading