diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 2f92fed6..dd3a610b 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -28,12 +28,6 @@ jobs: fail-fast: false matrix: variance: - - name: Ubuntu-22.04 / CUDA-12.8.1 / x86_64 - image: "ghcr.io/rust-gpu/rust-cuda-ubuntu22-cuda12:latest" - runner: ubuntu-latest - - name: Ubuntu-22.04 / CUDA-12.8.1 / ARM64 - image: "ghcr.io/rust-gpu/rust-cuda-ubuntu22-cuda12:latest" - runner: ubuntu-22.04-arm - name: Ubuntu-24.04 / CUDA-12.8.1 / x86_64 image: "ghcr.io/rust-gpu/rust-cuda-ubuntu24-cuda12:latest" runner: ubuntu-latest @@ -158,24 +152,24 @@ jobs: cargo clippy ' - # Very limited testing because we can only run tests that don't rely on having a CUDA GPU. + # Exclude crates with tests that require an NVIDIA GPU: blastoff, cudnn, cust. - name: Test run: | docker exec "$CONTAINER_NAME" bash -lc 'set -euo pipefail export RUSTFLAGS=-Dwarnings - cargo test \ - -p cuda_std \ - -p gpu_rand \ - -p nvvm \ - -p rustc_codegen_nvvm + cargo test --workspace \ + --exclude blastoff \ + --exclude cudnn \ + --exclude cust ' + # Exclude cust_raw because it triggers hundreds of warnings. - name: Check documentation run: | docker exec "$CONTAINER_NAME" bash -lc 'set -euo pipefail export RUSTDOCFLAGS=-Dwarnings cargo doc --workspace --all-features --document-private-items --no-deps \ - --exclude "cust_raw" + --exclude cust_raw ' - name: Normalize build artifacts ownership @@ -229,12 +223,6 @@ jobs: matrix: variance: # Must match the build job's matrix definition - - name: Ubuntu-22.04 / CUDA-12.8.1 / x86_64 - image: "ghcr.io/rust-gpu/rust-cuda-ubuntu22-cuda12:latest" - runner: ubuntu-latest - - name: Ubuntu-22.04 / CUDA-12.8.1 / ARM64 - image: "ghcr.io/rust-gpu/rust-cuda-ubuntu22-cuda12:latest" - runner: ubuntu-22.04-arm - name: Ubuntu-24.04 / CUDA-12.8.1 / x86_64 image: "ghcr.io/rust-gpu/rust-cuda-ubuntu24-cuda12:latest" runner: ubuntu-latest diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index cf0894fa..c29267c1 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -88,22 +88,29 @@ jobs: - name: Build all bindings run: cargo build --all-features -p cust_raw + # Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys. + # Exclude vecadd because of a link error involving nanorand and `SystemFunction036` (a.k.a. + # `RtlGenRandom`). - name: Build workspace - run: cargo build --workspace --exclude "cudnn*" --exclude "gemm*" --exclude "i128*" --exclude "sha2*" --exclude "vecadd*" + run: cargo build --workspace --exclude cudnn --exclude cudnn-sys --exclude "vecadd*" + # Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys. - name: Clippy env: RUSTFLAGS: -Dwarnings - run: cargo clippy --workspace --exclude "cudnn*" --exclude "gemm*" --exclude "i128*" --exclude "sha2*" --exclude "vecadd*" + run: cargo clippy --workspace --exclude cudnn --exclude cudnn-sys - # Very limited testing because we can only run tests that don't rely on having a CUDA GPU. + # Exclude crates with tests that require an NVIDIA GPU: blastoff, cudnn, cust. + # Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys. - name: Test - run: cargo test -p cuda_std -p gpu_rand -p nvvm -p rustc_codegen_nvvm + run: cargo test --workspace --exclude blastoff --exclude cudnn --exclude cudnn-sys --exclude cust + # Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys. + # Exclude cust_raw because it triggers hundreds of warnings. - name: Check documentation env: RUSTDOCFLAGS: -Dwarnings - run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "cudnn*" --exclude "cust_raw" --exclude "gemm*" --exclude "i128*" --exclude "sha2*" --exclude "vecadd*" + run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude cudnn --exclude cudnn-sys --exclude cust_raw # Disabled due to dll issues, someone with Windows knowledge needed # - name: Compiletest diff --git a/.github/workflows/container_images.yml b/.github/workflows/container_images.yml index e3fcd8af..7485812e 100644 --- a/.github/workflows/container_images.yml +++ b/.github/workflows/container_images.yml @@ -30,9 +30,6 @@ jobs: - runner: ubuntu-24.04-arm arch: arm64 variance: - - name: Ubuntu-22.04/CUDA-12.8.1 - image: "rust-gpu/rust-cuda-ubuntu22-cuda12" - dockerfile: ./container/ubuntu22-cuda12/Dockerfile - name: Ubuntu-24.04/CUDA-12.8.1 image: "rust-gpu/rust-cuda-ubuntu24-cuda12" dockerfile: ./container/ubuntu24-cuda12/Dockerfile @@ -154,8 +151,6 @@ jobs: fail-fast: false matrix: variance: - - name: Ubuntu-22.04/CUDA-12.8.1 - image: "rust-gpu/rust-cuda-ubuntu22-cuda12" - name: Ubuntu-24.04/CUDA-12.8.1 image: "rust-gpu/rust-cuda-ubuntu24-cuda12" - name: RockyLinux-9/CUDA-12.8.1 diff --git a/container/ubuntu22-cuda12/Dockerfile b/container/ubuntu22-cuda12/Dockerfile deleted file mode 100644 index d24bbebb..00000000 --- a/container/ubuntu22-cuda12/Dockerfile +++ /dev/null @@ -1,89 +0,0 @@ -FROM nvcr.io/nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04 AS llvm-builder - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ - build-essential \ - clang \ - curl \ - libffi-dev \ - libedit-dev \ - libncurses5-dev \ - libssl-dev \ - libtinfo-dev \ - libxml2-dev \ - cmake \ - ninja-build \ - pkg-config \ - python3 \ - xz-utils \ - zlib1g-dev && \ - rm -rf /var/lib/apt/lists/* - -WORKDIR /data/llvm7 - -# Download and build LLVM 7.1.0 for all architectures. -RUN curl -sSf -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/llvm-7.1.0.src.tar.xz && \ - tar -xf llvm-7.1.0.src.tar.xz && \ - cd llvm-7.1.0.src && \ - mkdir build && cd build && \ - ARCH=$(dpkg --print-architecture) && \ - if [ "$ARCH" = "amd64" ]; then \ - TARGETS="X86;NVPTX"; \ - else \ - TARGETS="AArch64;NVPTX"; \ - fi && \ - cmake -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_TARGETS_TO_BUILD="$TARGETS" \ - -DLLVM_BUILD_LLVM_DYLIB=ON \ - -DLLVM_LINK_LLVM_DYLIB=ON \ - -DLLVM_ENABLE_ASSERTIONS=OFF \ - -DLLVM_ENABLE_BINDINGS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_ENABLE_ZLIB=ON \ - -DLLVM_ENABLE_TERMINFO=ON \ - -DCMAKE_INSTALL_PREFIX=/opt/llvm-7 \ - .. && \ - ninja -j$(nproc) && \ - ninja install && \ - cd ../.. && \ - rm -rf llvm-7.1.0.src* - -FROM nvcr.io/nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04 - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ - build-essential \ - clang \ - curl \ - libssl-dev \ - libtinfo-dev \ - pkg-config \ - xz-utils \ - zlib1g-dev \ - cmake \ - libfontconfig-dev \ - libx11-xcb-dev \ - libxcursor-dev \ - libxi-dev \ - libxinerama-dev \ - libxrandr-dev && \ - rm -rf /var/lib/apt/lists/* - -COPY --from=llvm-builder /opt/llvm-7 /opt/llvm-7 -RUN ln -s /opt/llvm-7/bin/llvm-config /usr/bin/llvm-config && \ - ln -s /opt/llvm-7/bin/llvm-config /usr/bin/llvm-config-7 - -# Get Rust (install rustup; toolchain installed from rust-toolchain.toml below) -RUN curl -sSf -L https://sh.rustup.rs | bash -s -- -y --profile minimal --default-toolchain none -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 \ - rustup show - -# Add nvvm to LD_LIBRARY_PATH. -ENV LD_LIBRARY_PATH="/usr/local/cuda/nvvm/lib64:${LD_LIBRARY_PATH}" -ENV LLVM_LINK_STATIC=1 -ENV RUST_LOG=info