Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Add CI for cuda builds #360

Merged
merged 4 commits into from
Jul 9, 2023
Merged
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
69 changes: 36 additions & 33 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,39 +60,42 @@ jobs:
- name: Build
run: cargo build --verbose --features metal

# cuda:
# name: Build with cuda support
# strategy:
# # Don't stop building if it fails on an OS
# fail-fast: false
# matrix:
# os: [windows-latest, ubuntu-latest]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - uses: Jimver/[email protected]
# if: matrix.os == 'ubuntu-latest'
# id: cuda-toolkit-linux
# with:
# cuda: '12.1.0'
# method: 'network'
# #See e.g. https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/
# sub-packages: '["nvcc","compiler","libraries","libraries-dev","cudart","cudart-dev","libcublas","libcublas-dev"]'
# - uses: Jimver/[email protected]
# if: matrix.os == 'windows-latest'
# id: cuda-toolkit-windows
# with:
# cuda: '12.1.0'
# method: 'network'
# #See https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#install-the-cuda-software
# sub-packages: '["nvcc","cudart","visual_studio_integration","cublas_dev","cublas"]'
# - uses: dtolnay/rust-toolchain@stable
# - name: Check
# run: cargo check --verbose
# - name: Build
# run: cargo build --verbose --features cublas
cuda:
name: Build with cuda support
strategy:
# Don't stop building if it fails on an OS
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: Jimver/[email protected]
name: Install CUDA toolkit on Linux
if: matrix.os == 'ubuntu-latest'
id: cuda-toolkit-linux
with:
cuda: '12.2.0'
method: 'network'
#See e.g. https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/
non-cuda-sub-packages: '["libcublas","libcublas-dev"]'
sub-packages: '["nvcc","compiler","libraries","libraries-dev","cudart","cudart-dev"]'

- uses: Jimver/[email protected]
name: Install CUDA toolkit on Windows
if: matrix.os == 'windows-latest'
id: cuda-toolkit-windows
with:
cuda: '12.2.0'
#See https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#install-the-cuda-software
method: 'local'
- uses: dtolnay/rust-toolchain@stable
- name: Check
run: cargo check --verbose
- name: Build
run: cargo build --verbose --features cublas

opencl:
name: Build with opencl support
Expand Down