Skip to content

Commit 2e61ff3

Browse files
authored
ci: add cuda builds to release (#1702)
Signed-off-by: Sertac Ozercan <[email protected]>
1 parent 02f6e18 commit 2e61ff3

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

.github/workflows/release.yaml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ jobs:
2020
defines: '-DLLAMA_AVX2=OFF'
2121
- build: 'avx512'
2222
defines: '-DLLAMA_AVX512=ON'
23+
- build: 'cuda12'
24+
defines: ''
25+
- build: 'cuda11'
26+
defines: ''
2327
runs-on: ubuntu-latest
2428
steps:
2529
- name: Clone
@@ -33,7 +37,18 @@ jobs:
3337
run: |
3438
sudo apt-get update
3539
sudo apt-get install build-essential ffmpeg
36-
40+
- name: Install CUDA Dependencies
41+
if: ${{ matrix.build == 'cuda12' || matrix.build == 'cuda11' }}
42+
run: |
43+
if [ "${{ matrix.build }}" == "cuda12" ]; then
44+
export CUDA_VERSION=12-3
45+
else
46+
export CUDA_VERSION=11-7
47+
fi
48+
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
49+
sudo dpkg -i cuda-keyring_1.1-1_all.deb
50+
sudo apt-get update
51+
sudo apt-get install -y cuda-nvcc-${CUDA_VERSION} libcublas-dev-${CUDA_VERSION}
3752
- name: Cache grpc
3853
id: cache-grpc
3954
uses: actions/cache@v3
@@ -50,14 +65,19 @@ jobs:
5065
- name: Install gRPC
5166
run: |
5267
cd grpc && cd cmake/build && sudo make -j12 install
53-
5468
- name: Build
5569
id: build
5670
env:
5771
CMAKE_ARGS: "${{ matrix.defines }}"
5872
BUILD_ID: "${{ matrix.build }}"
5973
run: |
60-
STATIC=true make dist
74+
if [ "${{ matrix.build }}" == "cuda12" ] || [ "${{ matrix.build }}" == "cuda11" ]; then
75+
export BUILD_TYPE=cublas
76+
export PATH=/usr/local/cuda/bin:$PATH
77+
make dist
78+
else
79+
STATIC=true make dist
80+
fi
6181
- uses: actions/upload-artifact@v3
6282
with:
6383
name: ${{ matrix.build }}
@@ -109,4 +129,4 @@ jobs:
109129
if: startsWith(github.ref, 'refs/tags/')
110130
with:
111131
files: |
112-
release/*
132+
release/*

0 commit comments

Comments
 (0)