From 90a478bd4d97683cd18643cee35e0521fd42dc28 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Wed, 8 Jan 2025 17:50:26 +0000 Subject: [PATCH 01/20] Package linux cuda releases for various caps --- .github/workflows/build.yml | 85 ++++++++++++++++++++++++++++++++++++- ggml/src/kompute | 1 + 2 files changed, 84 insertions(+), 2 deletions(-) create mode 160000 ggml/src/kompute diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a377eff38..df9abf304 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -809,7 +809,52 @@ jobs: ubuntu-latest-cmake-cuda: 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: - name: Clone @@ -825,9 +870,45 @@ jobs: - name: Build with CMake 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 + - 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: runs-on: windows-2019 diff --git a/ggml/src/kompute b/ggml/src/kompute new file mode 160000 index 000000000..4565194ed --- /dev/null +++ b/ggml/src/kompute @@ -0,0 +1 @@ +Subproject commit 4565194ed7c32d1d2efa32ceab4d3c6cae006306 From 41b4b11340882f7d2ff8ce75f01012b059a4c80c Mon Sep 17 00:00:00 2001 From: ochafik Date: Tue, 14 Jan 2025 02:19:41 +0000 Subject: [PATCH 02/20] Fix container tags + rename --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b26c476d7..02056fcc4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -815,44 +815,44 @@ jobs: # 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 + container: nvidia/cuda:12.2.2-devel-ubuntu22.04 cap: 7.5 arch: 75-real example: 'T4' package: true - version: 12.2 - container: nvidia/cuda:12.2.2-devel-ubuntu24.04 + container: nvidia/cuda:12.2.2-devel-ubuntu22.04 cap: 8.0 arch: 80-real example: 'A100' package: true - version: 12.2 - container: nvidia/cuda:12.2.2-devel-ubuntu24.04 + container: nvidia/cuda:12.2.2-devel-ubuntu22.04 cap: 8.6 arch: 86-real example: 'A10' package: true - version: 12.2 - container: nvidia/cuda:12.2.2-devel-ubuntu24.04 + container: nvidia/cuda:12.2.2-devel-ubuntu22.04 cap: 8.9 arch: 89-real example: 'L4, L40S' - version: 12.2 - container: nvidia/cuda:12.2.2-devel-ubuntu24.04 + container: nvidia/cuda:12.2.2-devel-ubuntu22.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 + container: nvidia/cuda:12.6.2-devel-ubuntu22.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 }}) + name: ubuntu-22-cuda (${{ matrix.cuda.version }} cap ${{ matrix.cuda.cap }}, e.g. ${{ matrix.cuda.example }}) steps: - name: Clone From 66ec17eb533ce6c4ad52846f4617bb763fdff812 Mon Sep 17 00:00:00 2001 From: ochafik Date: Tue, 14 Jan 2025 02:20:50 +0000 Subject: [PATCH 03/20] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02056fcc4..e6db8b130 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -850,7 +850,7 @@ jobs: arch: 89-real package: false - container: nvidia/cuda:${{ matrix.cuda.version }}-devel-ubuntu24.04 + container: ${{ matrix.cuda.container }} name: ubuntu-22-cuda (${{ matrix.cuda.version }} cap ${{ matrix.cuda.cap }}, e.g. ${{ matrix.cuda.example }}) From 60151daef8c3cd24cc7200ee35d334420f4fc5fa Mon Sep 17 00:00:00 2001 From: ochafik Date: Sun, 19 Jan 2025 02:07:58 +0000 Subject: [PATCH 04/20] Use ccache in Docker CUDA build --- .devops/cuda.Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.devops/cuda.Dockerfile b/.devops/cuda.Dockerfile index 974dd78a8..b1c14c17a 100644 --- a/.devops/cuda.Dockerfile +++ b/.devops/cuda.Dockerfile @@ -12,13 +12,14 @@ FROM ${BASE_CUDA_DEV_CONTAINER} AS build ARG CUDA_DOCKER_ARCH=default RUN apt-get update && \ - apt-get install -y build-essential cmake python3 python3-pip git libcurl4-openssl-dev libgomp1 + apt-get install -y build-essential cmake python3 python3-pip git libcurl4-openssl-dev libgomp1 ccache WORKDIR /app COPY . . -RUN if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \ +RUN --mount=type=cache,target=/root/.ccache \ + if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \ export CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CUDA_DOCKER_ARCH}"; \ fi && \ cmake -B build -DGGML_NATIVE=OFF -DGGML_CUDA=ON -DLLAMA_CURL=ON ${CMAKE_ARGS} -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined . && \ From a4aed1d3025c7540c924fafc41997fe563978fc6 Mon Sep 17 00:00:00 2001 From: ochafik Date: Sun, 19 Jan 2025 12:33:56 +0000 Subject: [PATCH 05/20] Update cuda.Dockerfile --- .devops/cuda.Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.devops/cuda.Dockerfile b/.devops/cuda.Dockerfile index b1c14c17a..3c5cb0251 100644 --- a/.devops/cuda.Dockerfile +++ b/.devops/cuda.Dockerfile @@ -19,6 +19,8 @@ WORKDIR /app COPY . . RUN --mount=type=cache,target=/root/.ccache \ + --mount=type=cache,target=/var/lib/apt/lists \ + --mount=type=cache,target=/var/cache/apt \ if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \ export CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CUDA_DOCKER_ARCH}"; \ fi && \ From 5eb87e9aa361b6a7d915f5f928901dd3252a7d9a Mon Sep 17 00:00:00 2001 From: ochafik Date: Mon, 20 Jan 2025 10:51:26 +0000 Subject: [PATCH 06/20] cuda builds: add libcurl --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a064a8a3..1f11c70b6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -868,7 +868,7 @@ jobs: DEBIAN_FRONTEND: noninteractive run: | apt update - apt install -y cmake build-essential ninja-build libgomp1 git + apt install -y cmake build-essential ninja-build libgomp1 git libcurl4-openssl-dev - name: Build with CMake run: | From 2984d3cade59dbbaf886eafb81f6bf288bd0bfd4 Mon Sep 17 00:00:00 2001 From: ochafik Date: Mon, 20 Jan 2025 11:11:23 +0000 Subject: [PATCH 07/20] Align artefact names on existing ones --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f11c70b6..c49210eaa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -868,7 +868,7 @@ jobs: DEBIAN_FRONTEND: noninteractive run: | apt update - apt install -y cmake build-essential ninja-build libgomp1 git libcurl4-openssl-dev + apt install -y cmake build-essential ninja-build libgomp1 git - name: Build with CMake run: | @@ -895,21 +895,21 @@ jobs: 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 + echo "cuda_name=cu${{ 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/* + zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ steps.tag.outputs.cuda_name }}-x64.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 + path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ steps.tag.outputs.cuda_name }}-x64.zip + name: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ steps.tag.outputs.cuda_name }}-x64.zip windows-2019-cmake-cuda: runs-on: windows-2019 From abd27fc7a2ac5e7cf9be8735940d50336dedf585 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Mon, 20 Jan 2025 12:41:04 +0000 Subject: [PATCH 08/20] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c49210eaa..526173641 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -174,7 +174,7 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential libcurl4-openssl-dev + sudo apt-get install build-essential curl libcurl4-openssl-dev - name: Build id: cmake_build From b71c43c294c5b6a7a85ab02954b37f49fc551da4 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Mon, 20 Jan 2025 14:52:40 +0000 Subject: [PATCH 09/20] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 526173641..f9de72abd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -174,7 +174,7 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential curl libcurl4-openssl-dev + sudo apt-get install build-essential libcurl4-openssl-dev - name: Build id: cmake_build @@ -868,7 +868,7 @@ jobs: DEBIAN_FRONTEND: noninteractive run: | apt update - apt install -y cmake build-essential ninja-build libgomp1 git + apt install -y cmake build-essential ninja-build libcurl4-openssl-dev libgomp1 git - name: Build with CMake run: | From ac045e378e7b6ed584d1ca6d512d3774101f03e7 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Mon, 20 Jan 2025 15:46:43 +0000 Subject: [PATCH 10/20] Update build.yml --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9de72abd..d1330b6c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -862,6 +862,8 @@ jobs: - name: Clone id: checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Install dependencies env: From 22ed6028afeadf8bc1d3bfe6f275c2450a181141 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Mon, 20 Jan 2025 15:59:29 +0000 Subject: [PATCH 11/20] Temporarily upload artefacts in normal CI run to test artefacts --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1330b6c9..b98147320 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -901,17 +901,17 @@ jobs: - 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') }} + # 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-cuda-${{ steps.tag.outputs.cuda_name }}-x64.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') }} + # 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-cuda-${{ steps.tag.outputs.cuda_name }}-x64.zip - name: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ steps.tag.outputs.cuda_name }}-x64.zip + name: llama-bin-ubuntu-cuda-${{ steps.tag.outputs.cuda_name }}-x64.zip windows-2019-cmake-cuda: runs-on: windows-2019 From 4165293c38d869703b0e82fa4b069639d28a142a Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Mon, 20 Jan 2025 18:03:30 +0000 Subject: [PATCH 12/20] Attempt to fix weird git error by installing deps before clone --- .github/workflows/build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b98147320..39ea90d32 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -859,19 +859,20 @@ jobs: name: ubuntu-22-cuda (${{ matrix.cuda.version }} cap ${{ matrix.cuda.cap }}, e.g. ${{ matrix.cuda.example }}) steps: + - name: Dependencies + id: depends + env: + DEBIAN_FRONTEND: noninteractive + run: | + apt-get update + apt install -y cmake build-essential ninja-build libcurl4-openssl-dev libgomp1 git + - name: Clone id: checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install dependencies - env: - DEBIAN_FRONTEND: noninteractive - run: | - apt update - apt install -y cmake build-essential ninja-build libcurl4-openssl-dev libgomp1 git - - name: Build with CMake run: | cmake -S . -B build -G Ninja \ From c92ae476376609885b7337f38c0ed420b1172d00 Mon Sep 17 00:00:00 2001 From: ochafik Date: Tue, 21 Jan 2025 01:59:41 +0000 Subject: [PATCH 13/20] ci: attempt to fix safe directory issue --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 39ea90d32..133157933 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -872,6 +872,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + set-safe-directory: . - name: Build with CMake run: | From b7b264cac0241cf26ede2c8ebc6086e1b2231ef0 Mon Sep 17 00:00:00 2001 From: ochafik Date: Tue, 21 Jan 2025 01:59:47 +0000 Subject: [PATCH 14/20] ci: setup ccache --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 133157933..95e3d8a2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -859,6 +859,11 @@ jobs: name: ubuntu-22-cuda (${{ matrix.cuda.version }} cap ${{ matrix.cuda.cap }}, e.g. ${{ matrix.cuda.example }}) steps: + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.11 + with: + key: ubuntu-22-cuda-${{ matrix.cuda.version }}-${{ matrix.cuda.cap }} + - name: Dependencies id: depends env: From 7a5b18e195821133e4d7dd15b13f2d2b85568acb Mon Sep 17 00:00:00 2001 From: ochafik Date: Tue, 21 Jan 2025 02:31:05 +0000 Subject: [PATCH 15/20] ditch ccache action + require cuda in release --- .github/workflows/build.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95e3d8a2f..02381a284 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -859,11 +859,6 @@ jobs: name: ubuntu-22-cuda (${{ matrix.cuda.version }} cap ${{ matrix.cuda.cap }}, e.g. ${{ matrix.cuda.example }}) steps: - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.11 - with: - key: ubuntu-22-cuda-${{ matrix.cuda.version }}-${{ matrix.cuda.cap }} - - name: Dependencies id: depends env: @@ -1292,6 +1287,7 @@ jobs: needs: - ubuntu-latest-cmake + - ubuntu-latest-cmake-cuda - macOS-latest-cmake - windows-latest-cmake - windows-2019-cmake-cuda From f60e148bffcfd3b9bdc28966af7433b637742fb2 Mon Sep 17 00:00:00 2001 From: ochafik Date: Tue, 21 Jan 2025 03:28:56 +0000 Subject: [PATCH 16/20] shuffle actions back to original order --- .github/workflows/build.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02381a284..0125fd5b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -859,6 +859,12 @@ jobs: name: ubuntu-22-cuda (${{ matrix.cuda.version }} cap ${{ matrix.cuda.cap }}, e.g. ${{ matrix.cuda.example }}) steps: + - name: Clone + id: checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Dependencies id: depends env: @@ -867,13 +873,6 @@ jobs: apt-get update apt install -y cmake build-essential ninja-build libcurl4-openssl-dev libgomp1 git - - name: Clone - id: checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - set-safe-directory: . - - name: Build with CMake run: | cmake -S . -B build -G Ninja \ From 1b8f9caa0512368fe8db7e96a382576fa4f79958 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Fri, 31 Jan 2025 15:48:07 +0000 Subject: [PATCH 17/20] minimize diff --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cbabcb37..d5265f4b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -895,7 +895,7 @@ jobs: path: llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip name: llama-bin-win-${{ matrix.build }}.zip - ubuntu-cpu-cmake-cuda: + ubuntu-latest-cmake-cuda: runs-on: ubuntu-latest strategy: @@ -956,8 +956,8 @@ jobs: env: DEBIAN_FRONTEND: noninteractive run: | - apt-get update - apt install -y cmake build-essential ninja-build libcurl4-openssl-dev libgomp1 git + apt-get update + apt install -y cmake build-essential ninja-build libcurl4-openssl-dev libgomp1 git - name: ccache uses: hendrikmuhs/ccache-action@v1.2.16 From 89da8df649a09a1b5be48e7e94babc2c5d3fba81 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Fri, 31 Jan 2025 16:05:29 +0000 Subject: [PATCH 18/20] fix typo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d5265f4b3..c55f2ecba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1412,7 +1412,7 @@ jobs: needs: - ubuntu-cpu-cmake - - ubuntu-cpu-cmake-cuda + - ubuntu-latest-cmake-cuda - windows-latest-cmake - windows-2019-cmake-cuda - windows-latest-cmake-hip-release From ae175fe7001ed5be3410af471ecb4f01aaf7e40b Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Fri, 31 Jan 2025 16:55:58 +0000 Subject: [PATCH 19/20] ci + cuda: checkout w/ history when packaging needed --- .github/workflows/build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c55f2ecba..d85321c69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -945,9 +945,11 @@ jobs: name: ubuntu-22-cuda (${{ matrix.cuda.version }} cap ${{ matrix.cuda.cap }}, e.g. ${{ matrix.cuda.example }}) steps: - - name: Clone - id: checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + if: ${{ matrix.cuda.package }} + + - uses: actions/checkout@v4 + if: ${{ !matrix.cuda.package }} with: fetch-depth: 0 From 167c50071651060de1fc98b5b4e80a43e960cba1 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Fri, 31 Jan 2025 17:34:04 +0000 Subject: [PATCH 20/20] install zip in cuda container --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d85321c69..e19d8032a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -959,7 +959,7 @@ jobs: DEBIAN_FRONTEND: noninteractive run: | apt-get update - apt install -y cmake build-essential ninja-build libcurl4-openssl-dev libgomp1 git + apt install -y cmake build-essential ninja-build libcurl4-openssl-dev libgomp1 git zip - name: ccache uses: hendrikmuhs/ccache-action@v1.2.16