From b8f9a706f553bba5170bae8417f94b463f430cce Mon Sep 17 00:00:00 2001 From: worthant Date: Wed, 22 Jul 2026 02:11:44 +0300 Subject: [PATCH 1/2] ci: add linux-x64-cuda-13.3 build to dev and release pipelines Linux until now shipped only the Vulkan backend; NVIDIA users got the dequant path and no access to native CUDA kernels (incl. FP4 on Blackwell). Add a CUDA 13.3 build mirroring the Windows cuda-13.3 variant: GGML_BACKEND_DL keeps it a dlopen'd libggml-cuda.so next to the CPU variants, cudart/cublas are bundled like the Windows DLLs, archs cover A100/RTX30/RTX40/H100/RTX50 (80;86;89;90;120). --- .github/workflows/dev-build.yml | 83 ++++++++++++++++++++++- .github/workflows/release-turboquant.yml | 84 +++++++++++++++++++++++- 2 files changed, 165 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 2c5e40a6ebfa..db4a7b143c86 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -119,6 +119,87 @@ jobs: llama-turboquant-linux-x64-vulkan.tar.gz retention-days: 14 + linux-x64-cuda-13.3: + runs-on: ubuntu-22.04 + + steps: + - name: Clone + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: ccache + uses: ggml-org/ccache-action@v1.2.21 + with: + key: turboquant-linux-x64-cuda-13.3 + evict-old-files: 1d + + - name: Install CUDA Toolkit + run: | + wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + sudo dpkg -i cuda-keyring_1.1-1_all.deb + sudo apt-get update -y + sudo apt-get install -y build-essential \ + cuda-nvcc-13-3 cuda-cccl-13-3 cuda-cudart-dev-13-3 libcublas-dev-13-3 + echo "/usr/local/cuda/bin" >> "$GITHUB_PATH" + + - name: Build + # Arch set: A100 (80), RTX 30 (86), RTX 40 (89), H100/H200 (90), + # RTX 50 / Blackwell (120). Runner has no GPU -- build only, the + # backend is a dlopen'd libggml-cuda.so thanks to GGML_BACKEND_DL. + run: | + cmake -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_RPATH='$ORIGIN' \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ + -DGGML_BACKEND_DL=ON \ + -DGGML_NATIVE=OFF \ + -DGGML_CPU_ALL_VARIANTS=ON \ + -DGGML_CUDA=ON \ + -DGGML_CUDA_CUB_3DOT2=ON \ + -DCMAKE_CUDA_ARCHITECTURES="80;86;89;90;120" \ + -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \ + -DLLAMA_CURL=OFF \ + -DLLAMA_OPENSSL=OFF \ + -DLLAMA_BUILD_SERVER=ON \ + -DLLAMA_BUILD_TOOLS=ON \ + -DLLAMA_BUILD_TESTS=OFF \ + -DLLAMA_BUILD_EXAMPLES=OFF + cmake --build build --config Release -j $(nproc) + + - name: Verify build + run: | + ./build/bin/llama-server --version 2>&1 || true + ls -l build/bin/libggml-cuda.so + + - name: Prepare archive + run: | + mkdir -p release/build/bin + cp build/bin/llama-server release/build/bin/ + cp build/bin/llama-cli release/build/bin/ 2>/dev/null || true + cp build/bin/llama-bench release/build/bin/ 2>/dev/null || true + cp build/bin/llama-perplexity release/build/bin/ 2>/dev/null || true + cp build/bin/llama-quantize release/build/bin/ 2>/dev/null || true + find build/bin -name "*.so*" -exec cp -P {} release/build/bin/ \; 2>/dev/null || true + # CUDA runtime is not a given on user systems -- bundle it like the + # Windows job bundles cudart/cublas DLLs. + cp -P /usr/local/cuda/lib64/libcudart.so* release/build/bin/ + cp -P /usr/local/cuda/lib64/libcublas.so* release/build/bin/ + cp -P /usr/local/cuda/lib64/libcublasLt.so* release/build/bin/ + cp LICENSE release/build/bin/ 2>/dev/null || true + cd release + zip -r ../llama-turboquant-linux-x64-cuda-13.3.zip . + tar -czf ../llama-turboquant-linux-x64-cuda-13.3.tar.gz . + + - name: Upload archive + uses: actions/upload-artifact@v4 + with: + name: archive-linux-x64-cuda-13.3 + path: | + llama-turboquant-linux-x64-cuda-13.3.zip + llama-turboquant-linux-x64-cuda-13.3.tar.gz + retention-days: 14 + windows-x64: runs-on: windows-2022 @@ -337,7 +418,7 @@ jobs: # broken backend never blocks the others from shipping to testers — the # release notes call out what is missing. publish-dev-latest: - needs: [linux-x64-vulkan, windows-x64, macos-arm64] + needs: [linux-x64-vulkan, linux-x64-cuda-13.3, windows-x64, macos-arm64] if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/dev' }} runs-on: ubuntu-22.04 permissions: diff --git a/.github/workflows/release-turboquant.yml b/.github/workflows/release-turboquant.yml index 5b1765bacdd1..1f7f9d9af8ca 100644 --- a/.github/workflows/release-turboquant.yml +++ b/.github/workflows/release-turboquant.yml @@ -122,6 +122,88 @@ jobs: llama-turboquant-linux-x64-vulkan.tar.gz retention-days: 30 + linux-x64-cuda-13.3: + needs: verify-version + runs-on: ubuntu-22.04 + + steps: + - name: Clone + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: ccache + uses: ggml-org/ccache-action@v1.2.21 + with: + key: turboquant-linux-x64-cuda-13.3 + evict-old-files: 1d + + - name: Install CUDA Toolkit + run: | + wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + sudo dpkg -i cuda-keyring_1.1-1_all.deb + sudo apt-get update -y + sudo apt-get install -y build-essential \ + cuda-nvcc-13-3 cuda-cccl-13-3 cuda-cudart-dev-13-3 libcublas-dev-13-3 + echo "/usr/local/cuda/bin" >> "$GITHUB_PATH" + + - name: Build + # Arch set: A100 (80), RTX 30 (86), RTX 40 (89), H100/H200 (90), + # RTX 50 / Blackwell (120). Runner has no GPU -- build only, the + # backend is a dlopen'd libggml-cuda.so thanks to GGML_BACKEND_DL. + run: | + cmake -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_RPATH='$ORIGIN' \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ + -DGGML_BACKEND_DL=ON \ + -DGGML_NATIVE=OFF \ + -DGGML_CPU_ALL_VARIANTS=ON \ + -DGGML_CUDA=ON \ + -DGGML_CUDA_CUB_3DOT2=ON \ + -DCMAKE_CUDA_ARCHITECTURES="80;86;89;90;120" \ + -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \ + -DLLAMA_CURL=OFF \ + -DLLAMA_OPENSSL=OFF \ + -DLLAMA_BUILD_SERVER=ON \ + -DLLAMA_BUILD_TOOLS=ON \ + -DLLAMA_BUILD_TESTS=OFF \ + -DLLAMA_BUILD_EXAMPLES=OFF + cmake --build build --config Release -j $(nproc) + + - name: Verify build + run: | + ./build/bin/llama-server --version 2>&1 || true + ls -l build/bin/libggml-cuda.so + + - name: Prepare archive + run: | + mkdir -p release/build/bin + cp build/bin/llama-server release/build/bin/ + cp build/bin/llama-cli release/build/bin/ 2>/dev/null || true + cp build/bin/llama-bench release/build/bin/ 2>/dev/null || true + cp build/bin/llama-perplexity release/build/bin/ 2>/dev/null || true + cp build/bin/llama-quantize release/build/bin/ 2>/dev/null || true + find build/bin -name "*.so*" -exec cp -P {} release/build/bin/ \; 2>/dev/null || true + # CUDA runtime is not a given on user systems -- bundle it like the + # Windows job bundles cudart/cublas DLLs. + cp -P /usr/local/cuda/lib64/libcudart.so* release/build/bin/ + cp -P /usr/local/cuda/lib64/libcublas.so* release/build/bin/ + cp -P /usr/local/cuda/lib64/libcublasLt.so* release/build/bin/ + cp LICENSE release/build/bin/ 2>/dev/null || true + cd release + zip -r ../llama-turboquant-linux-x64-cuda-13.3.zip . + tar -czf ../llama-turboquant-linux-x64-cuda-13.3.tar.gz . + + - name: Upload archive + uses: actions/upload-artifact@v4 + with: + name: archive-linux-x64-cuda-13.3 + path: | + llama-turboquant-linux-x64-cuda-13.3.zip + llama-turboquant-linux-x64-cuda-13.3.tar.gz + retention-days: 14 + windows-x64: needs: verify-version runs-on: windows-2022 @@ -353,7 +435,7 @@ jobs: # A stable release must be COMPLETE: this job has hard `needs` on every # build job — if anything failed, no release is published at all. publish-release: - needs: [verify-version, linux-x64-vulkan, windows-x64, macos-arm64] + needs: [verify-version, linux-x64-vulkan, linux-x64-cuda-13.3, windows-x64, macos-arm64] runs-on: ubuntu-22.04 permissions: contents: write From 9f4605dc26156a1eaa7c6660d5ebf06297dda2b6 Mon Sep 17 00:00:00 2001 From: worthant Date: Wed, 22 Jul 2026 02:23:08 +0300 Subject: [PATCH 2/2] ci: job IDs cannot contain dots -- rename to linux-x64-cuda-13-3, keep dotted display name --- .github/workflows/dev-build.yml | 5 +++-- .github/workflows/release-turboquant.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index db4a7b143c86..1bf8015606c1 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -119,7 +119,8 @@ jobs: llama-turboquant-linux-x64-vulkan.tar.gz retention-days: 14 - linux-x64-cuda-13.3: + linux-x64-cuda-13-3: + name: linux-x64-cuda-13.3 runs-on: ubuntu-22.04 steps: @@ -418,7 +419,7 @@ jobs: # broken backend never blocks the others from shipping to testers — the # release notes call out what is missing. publish-dev-latest: - needs: [linux-x64-vulkan, linux-x64-cuda-13.3, windows-x64, macos-arm64] + needs: [linux-x64-vulkan, linux-x64-cuda-13-3, windows-x64, macos-arm64] if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/dev' }} runs-on: ubuntu-22.04 permissions: diff --git a/.github/workflows/release-turboquant.yml b/.github/workflows/release-turboquant.yml index 1f7f9d9af8ca..d1d1728b257a 100644 --- a/.github/workflows/release-turboquant.yml +++ b/.github/workflows/release-turboquant.yml @@ -122,7 +122,8 @@ jobs: llama-turboquant-linux-x64-vulkan.tar.gz retention-days: 30 - linux-x64-cuda-13.3: + linux-x64-cuda-13-3: + name: linux-x64-cuda-13.3 needs: verify-version runs-on: ubuntu-22.04 @@ -435,7 +436,7 @@ jobs: # A stable release must be COMPLETE: this job has hard `needs` on every # build job — if anything failed, no release is published at all. publish-release: - needs: [verify-version, linux-x64-vulkan, linux-x64-cuda-13.3, windows-x64, macos-arm64] + needs: [verify-version, linux-x64-vulkan, linux-x64-cuda-13-3, windows-x64, macos-arm64] runs-on: ubuntu-22.04 permissions: contents: write