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: 3 additions & 1 deletion .github/workflows/container_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- ".github/workflows/container_images.yml"
- "container/**"
push:
branches:
- main
paths:
- ".github/workflows/container_images.yml"
- "container/**"
Expand Down Expand Up @@ -162,4 +164,4 @@ jobs:
$(printf '${{ env.REGISTRY }}/${{ matrix.variance.image }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ matrix.variance.image }}:${{ steps.meta.outputs.version }}
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ matrix.variance.image }}:${{ steps.meta.outputs.version }}
1 change: 0 additions & 1 deletion .github/workflows/deploy_guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ concurrency:
jobs:
deploy:
# Only run on the main repository, not on forks
if: github.repository == 'rust-gpu/Rust-CUDA'
runs-on: ubuntu-latest
environment:
name: github-pages
Expand Down
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 <rdambrosio016@gmail.com>"]
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 <rdambrosio016@gmail.com>", "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 <brookheisler@gmail.com>", "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 <rdambrosio016@gmail.com>"]
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 <anderslanglands@gmail.com>", "Riccardo D'Ambrosio <rdambrosio016@gmail.com>"]

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: 2 additions & 0 deletions crates/ptx_compiler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ impl CompilerFailure {
.to_result()?;
let size = size.assume_init();
let mut vec = Vec::with_capacity(size);
#[allow(clippy::unnecessary_cast)]
nvptx_compiler_sys::nvPTXCompilerGetErrorLog(
self.handle,
vec.as_mut_ptr() as *mut c_char,
Expand Down Expand Up @@ -138,6 +139,7 @@ impl CompiledProgram {
.to_result()?;
let size = size.assume_init();
let mut vec = Vec::with_capacity(size);
#[allow(clippy::unnecessary_cast)]
nvptx_compiler_sys::nvPTXCompilerGetInfoLog(
self.handle,
vec.as_mut_ptr() as *mut c_char,
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
Loading
Loading