From 021b3913c1aa6ffb2b72d7407d7e9f42755fdcd9 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Tue, 13 Jun 2023 20:53:06 +0100 Subject: [PATCH] add cuda build to ubuntu build matrix --- .github/workflows/build-commit.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 4bcc782..a7d63c7 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -83,10 +83,11 @@ jobs: defines: '-DGGML_AVX2=OFF' - build: 'avx512' defines: '-DGGML_AVX512=ON' - - build: 'openblas' + - build: 'avx2-openblas' defines: '-DGGML_OPENBLAS=ON' - - + - build: 'avx2-cuda' + defines: '-DGGML_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc' + steps: - uses: actions/checkout@v3 @@ -97,9 +98,16 @@ jobs: run: sudo apt-get update && sudo apt-get install -yq libboost-dev - name: Install OpenBlas - if: ${{ matrix.build == 'openblas' }} + if: ${{ matrix.build == 'avx2-openblas' }} run: sudo apt-get install libopenblas-dev + - name: Install CUDA + if: ${{ matrix.build == 'avx2-cuda' }} + run: | + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb + sudo dpkg -i cuda-keyring_1.0-1_all.deb + sudo apt-get update && sudo apt-get install -yq libboost-dev cuda-nvcc-11-7 libcublas-dev-11-7 + - name: Build # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type