Skip to content

Commit 8837a98

Browse files
committed
Merge PR #16773: misc upstream
2 parents 052f465 + 6fdbba1 commit 8837a98

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,80 @@ jobs:
434434
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz
435435
name: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz
436436

437+
ubuntu-22-cuda:
438+
runs-on: ubuntu-22.04
439+
strategy:
440+
matrix:
441+
cuda: ['12.4']
442+
steps:
443+
- name: Clone
444+
id: checkout
445+
uses: actions/checkout@v4
446+
with:
447+
fetch-depth: 0
448+
449+
- name: ccache
450+
uses: ggml-org/ccache-action@v1.2.16
451+
with:
452+
key: ubuntu-22-cmake-cuda-${{ matrix.cuda }}
453+
evict-old-files: 1d
454+
455+
- name: Dependencies
456+
id: depends
457+
run: |
458+
wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
459+
sudo dpkg -i cuda-keyring_1.0-1_all.deb
460+
sudo apt-get update -y
461+
sudo apt-get install -y cuda-toolkit-${{ matrix.cuda }} build-essential libcurl4-openssl-dev
462+
463+
- name: Build
464+
id: cmake_build
465+
run: |
466+
export PATH=/usr/local/cuda-${{ matrix.cuda }}/bin:$PATH
467+
export LD_LIBRARY_PATH=/usr/local/cuda-${{ matrix.cuda }}/lib64:$LD_LIBRARY_PATH
468+
cmake -B build \
469+
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
470+
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
471+
-DGGML_BACKEND_DL=ON \
472+
-DGGML_NATIVE=OFF \
473+
-DGGML_CPU_ALL_VARIANTS=ON \
474+
-DGGML_CUDA=ON \
475+
-DCMAKE_CUDA_ARCHITECTURES="60;61;70;75;80;86;89;90" \
476+
${{ env.CMAKE_ARGS }}
477+
cmake --build build --config Release -j $(nproc)
478+
479+
- name: Determine tag name
480+
id: tag
481+
uses: ./.github/actions/get-tag-name
482+
483+
- name: Pack artifacts
484+
id: pack_artifacts
485+
run: |
486+
cp LICENSE ./build/bin/
487+
zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip ./build/bin/*
488+
489+
- name: Upload artifacts
490+
uses: actions/upload-artifact@v4
491+
with:
492+
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
493+
name: llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
494+
495+
- name: Copy and pack Cuda runtime
496+
run: |
497+
cp /usr/local/cuda-${{ matrix.cuda }}/lib64/libcublas.so.12 ./build/bin/
498+
cp /usr/local/cuda-${{ matrix.cuda }}/lib64/libcublasLt.so.12 ./build/bin/
499+
cp /usr/local/cuda-${{ matrix.cuda }}/lib64/libcudart.so.12 ./build/bin/
500+
zip -r cudart-llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip ./build/bin/*
501+
rm ./build/bin/libcublas.so.12
502+
rm ./build/bin/libcublasLt.so.12
503+
rm ./build/bin/libcudart.so.12
504+
505+
- name: Upload Cuda runtime
506+
uses: actions/upload-artifact@v4
507+
with:
508+
path: cudart-llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
509+
name: cudart-llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
510+
437511
windows-cpu:
438512
needs:
439513
- webui-build

0 commit comments

Comments
 (0)