Package linux cuda releases for various caps
This commit is contained in:
parent
a813badbbd
commit
90a478bd4d
2 changed files with 84 additions and 2 deletions
85
.github/workflows/build.yml
vendored
85
.github/workflows/build.yml
vendored
|
@ -809,7 +809,52 @@ jobs:
|
||||||
|
|
||||||
ubuntu-latest-cmake-cuda:
|
ubuntu-latest-cmake-cuda:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: nvidia/cuda:12.6.2-devel-ubuntu24.04
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
cuda:
|
||||||
|
# Colab and lightning.ai currently use CUDA 12.2 (test w/ `nvidia-smi | grep "CUDA Version: "`)
|
||||||
|
# Capabilities of GPUs are listed on https://developer.nvidia.com/cuda-gpus, can test w/ `nvidia-smi --query-gpu=compute_cap --format=csv`
|
||||||
|
# See available containers at https://hub.docker.com/r/nvidia/cuda/tags
|
||||||
|
- version: 12.2
|
||||||
|
container: nvidia/cuda:12.2.2-devel-ubuntu24.04
|
||||||
|
cap: 7.5
|
||||||
|
arch: 75-real
|
||||||
|
example: 'T4'
|
||||||
|
package: true
|
||||||
|
- version: 12.2
|
||||||
|
container: nvidia/cuda:12.2.2-devel-ubuntu24.04
|
||||||
|
cap: 8.0
|
||||||
|
arch: 80-real
|
||||||
|
example: 'A100'
|
||||||
|
package: true
|
||||||
|
- version: 12.2
|
||||||
|
container: nvidia/cuda:12.2.2-devel-ubuntu24.04
|
||||||
|
cap: 8.6
|
||||||
|
arch: 86-real
|
||||||
|
example: 'A10'
|
||||||
|
package: true
|
||||||
|
- version: 12.2
|
||||||
|
container: nvidia/cuda:12.2.2-devel-ubuntu24.04
|
||||||
|
cap: 8.9
|
||||||
|
arch: 89-real
|
||||||
|
example: 'L4, L40S'
|
||||||
|
- version: 12.2
|
||||||
|
container: nvidia/cuda:12.2.2-devel-ubuntu24.04
|
||||||
|
cap: 9.0
|
||||||
|
arch: 90-real
|
||||||
|
example: 'H100'
|
||||||
|
package: true
|
||||||
|
# Build only, don't package.
|
||||||
|
- version: 12.6
|
||||||
|
container: nvidia/cuda:12.6.2-devel-ubuntu24.04
|
||||||
|
cap: 8.9
|
||||||
|
arch: 89-real
|
||||||
|
package: false
|
||||||
|
|
||||||
|
container: nvidia/cuda:${{ matrix.cuda.version }}-devel-ubuntu24.04
|
||||||
|
|
||||||
|
name: Linux CUDA ${{ matrix.cuda.version }} Cap ${{ matrix.cuda.cap }} (e.g. ${{ matrix.cuda_cap.example_gpu }})
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
|
@ -825,9 +870,45 @@ jobs:
|
||||||
|
|
||||||
- name: Build with CMake
|
- name: Build with CMake
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=89-real -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined -DLLAMA_FATAL_WARNINGS=ON
|
cmake -S . -B build -G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DGGML_NATIVE=OFF \
|
||||||
|
-DGGML_CUDA=ON \
|
||||||
|
-DCMAKE_CUDA_ARCHITECTURES=${{ matrix.cuda.arch }} \
|
||||||
|
-DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined \
|
||||||
|
-DLLAMA_CURL=ON \
|
||||||
|
-DLLAMA_FATAL_WARNINGS=ON
|
||||||
cmake --build build
|
cmake --build build
|
||||||
|
|
||||||
|
- name: Determine tag name
|
||||||
|
if: ${{ matrix.cuda.package }}
|
||||||
|
id: tag
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
BUILD_NUMBER="$(git rev-list --count HEAD)"
|
||||||
|
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
||||||
|
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
||||||
|
echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
||||||
|
echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
echo "cuda_name=cuda-${{ matrix.cuda.short_version }}-cap-${{ matrix.cuda.cap }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Pack artifacts
|
||||||
|
id: pack_artifacts
|
||||||
|
if: ${{ matrix.cuda.package && (( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true') }}
|
||||||
|
run: |
|
||||||
|
cp LICENSE ./build/bin/
|
||||||
|
zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64-${{ steps.tag.outputs.cuda_name }}.zip ./build/bin/*
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
if: ${{ matrix.cuda.package && (( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true') }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64-${{ steps.tag.outputs.cuda_name }}.zip
|
||||||
|
name: llama-bin-ubuntu-x64.zip
|
||||||
|
|
||||||
windows-2019-cmake-cuda:
|
windows-2019-cmake-cuda:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
|
|
||||||
|
|
1
ggml/src/kompute
Submodule
1
ggml/src/kompute
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 4565194ed7c32d1d2efa32ceab4d3c6cae006306
|
Loading…
Add table
Add a link
Reference in a new issue