Skip to content

Commit 79101ce

Browse files
[IntelNav] ci: add windows-x64-vulkan release cell
Closes the M0_AUDIT task ggml-org#21 gap around Windows GPU coverage. Vulkan covers AMD / Intel / NVIDIA / iGPUs without pulling in proprietary SDKs at CI time, so it is the natural first Windows backend. The pack action now handles both single-config (Makefile, Ninja) and multi-config (Visual Studio, Ninja Multi-Config) build trees: it prefers build/bin/Release/ when present, falls back to build/bin/. Linux and macOS layouts are unchanged. Smoke-tested both layouts with synthetic .so / .dll fixtures before this commit; Linux ROCm artifact set still packs identically to before. The new windows-x64-vulkan job mirrors ggml-org's release.yml matrix entry for vulkan/x64 — same LunarG SDK installer, same cmake args (`-DGGML_VULKAN=ON -DGGML_BACKEND_DL=ON`). It builds the `llama` cmake target so libllama.dll plus the ggml-{base,cpu, vulkan}.dll set all land in the artifact. Header note refreshed; the still-deferred backends are now SYCL (needs Intel oneAPI base toolkit) and Windows CPU/CUDA (Windows CUDA toolkit installer not wired up here).
1 parent aa1182b commit 79101ce

2 files changed

Lines changed: 72 additions & 14 deletions

File tree

.github/actions/intelnav-pack.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ set -euo pipefail
1313

1414
BACKEND="${1:?usage: intelnav-pack.sh <backend-tag>}"
1515

16-
if [[ ! -d build/bin ]]; then
17-
echo "intelnav-pack: build/bin missing — did cmake --build run?" >&2
16+
# Single-config generators (Makefile, Ninja) write to build/bin/.
17+
# Multi-config generators (Visual Studio, Ninja Multi-Config) write
18+
# to build/bin/<Config>/. Prefer the multi-config layout if present.
19+
if [[ -d build/bin/Release ]]; then
20+
BIN_SRC="build/bin/Release"
21+
elif [[ -d build/bin ]]; then
22+
BIN_SRC="build/bin"
23+
else
24+
echo "intelnav-pack: neither build/bin/Release/ nor build/bin/ exists — did cmake --build run?" >&2
1825
exit 1
1926
fi
2027

@@ -28,11 +35,11 @@ rm -rf "${DIST}"
2835
mkdir -p "${PKG_ROOT}/bin" "${PKG_ROOT}/include"
2936

3037
# --- shared libraries ----------------------------------------------------
31-
# Copy every .so / .dylib / .dll in build/bin. ggml ships multiple libs
32-
# per build (base, cpu, backend-specific) and their exact set varies
33-
# across cmake configurations, so we glob rather than name them.
38+
# Copy every .so / .dylib / .dll in the build dir. ggml ships multiple
39+
# libs per build (base, cpu, backend-specific) and their exact set
40+
# varies across cmake configurations, so we glob rather than name them.
3441
shopt -s nullglob
35-
for f in build/bin/*.so build/bin/*.so.* build/bin/*.dylib build/bin/*.dll; do
42+
for f in "${BIN_SRC}"/*.so "${BIN_SRC}"/*.so.* "${BIN_SRC}"/*.dylib "${BIN_SRC}"/*.dll; do
3643
cp -a "$f" "${PKG_ROOT}/bin/"
3744
done
3845
shopt -u nullglob

.github/workflows/intelnav-release.yml

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@
2222
# On tag push, all artifacts are uploaded to the matching GitHub Release.
2323
# On workflow_dispatch, they stay as job artifacts for inspection.
2424
#
25-
# Scope today: Linux x86_64 (CPU + Vulkan + ROCm + CUDA) and macOS
26-
# arm64 (Metal). All five jobs run on free GitHub-hosted runners — no
27-
# proprietary SDKs beyond what `apt` (Ubuntu), the Radeon / NVIDIA apt
28-
# repos, and Apple's bundled toolchain provide.
25+
# Scope today: Linux x86_64 (CPU + Vulkan + ROCm + CUDA), macOS
26+
# arm64 (Metal), and Windows x86_64 (Vulkan). All six jobs run on
27+
# free GitHub-hosted runners — no proprietary SDKs beyond what `apt`
28+
# (Ubuntu), the Radeon / NVIDIA apt repos, LunarG's Vulkan SDK
29+
# installer, and Apple's bundled toolchain provide.
2930
#
3031
# Still-deferred follow-ups: Linux SYCL (needs the Intel oneAPI base
31-
# toolkit, multi-GB install) and Windows CPU/CUDA/Vulkan (needs MSVC
32-
# layout work — Ninja Multi-Config writes to build/bin/Release/, the
33-
# pack script today only globs build/bin/).
32+
# toolkit, multi-GB install) and Windows CPU/CUDA (CUDA needs the
33+
# Windows CUDA Toolkit installer; CPU is a copy-paste of windows-x64-
34+
# vulkan once we want it). The pack script handles both single-config
35+
# (Linux/macOS) and multi-config (Visual Studio: build/bin/Release/)
36+
# build layouts.
3437

3538
name: IntelNav release
3639

@@ -340,12 +343,60 @@ jobs:
340343
name: libllama-macos-arm64-metal
341344
path: dist/*.tar.gz
342345

346+
# ---------------------------------------------------------------------
347+
# windows-x64 Vulkan — broad GPU coverage for Windows users without
348+
# pulling proprietary SDKs. Vulkan covers AMD, Intel, NVIDIA, iGPUs;
349+
# NVIDIA-only users will pick a CUDA artifact when that lands.
350+
#
351+
# Visual Studio is a multi-config generator: artifacts land at
352+
# build/bin/Release/, which intelnav-pack.sh picks up. Recipe mirrors
353+
# ggml-org/llama.cpp's release.yml `windows-latest-cmake` matrix
354+
# entry for `vulkan/x64` — same VulkanSDK installer, same cmake args.
355+
# ---------------------------------------------------------------------
356+
windows-x64-vulkan:
357+
runs-on: windows-2022
358+
env:
359+
# Pinned to match upstream's release.yml — bump together when
360+
# LunarG ships a new SDK we want.
361+
VULKAN_VERSION: 1.4.313.2
362+
steps:
363+
- uses: actions/checkout@v6
364+
with: { fetch-depth: 0 }
365+
366+
- uses: ggml-org/ccache-action@v1.2.21
367+
with:
368+
key: intelnav-windows-x64-vulkan-${{ env.CCACHE_GEN }}
369+
variant: ccache
370+
evict-old-files: 1d
371+
372+
- name: Install Vulkan SDK
373+
run: |
374+
curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/vulkansdk-windows-X64-${env:VULKAN_VERSION}.exe"
375+
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
376+
Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
377+
Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
378+
379+
- name: Configure
380+
run: cmake -B build ${{ env.CMAKE_COMMON }} -DGGML_NATIVE=OFF -DGGML_VULKAN=ON -DGGML_BACKEND_DL=ON
381+
382+
- name: Build
383+
run: cmake --build build --config Release -j --target llama
384+
385+
- name: Package
386+
run: .github/actions/intelnav-pack.sh windows-x64-vulkan
387+
shell: bash
388+
389+
- uses: actions/upload-artifact@v6
390+
with:
391+
name: libllama-windows-x64-vulkan
392+
path: dist/*.tar.gz
393+
343394
# ---------------------------------------------------------------------
344395
# Upload to Release. Only runs on tag push or when
345396
# workflow_dispatch.inputs.make_release is true.
346397
# ---------------------------------------------------------------------
347398
publish-release:
348-
needs: [linux-x64-cpu, linux-x64-vulkan, linux-x64-rocm, linux-x64-cuda, macos-arm64-metal]
399+
needs: [linux-x64-cpu, linux-x64-vulkan, linux-x64-rocm, linux-x64-cuda, macos-arm64-metal, windows-x64-vulkan]
349400
if: startsWith(github.ref, 'refs/tags/intelnav-v') || inputs.make_release
350401
runs-on: ubuntu-22.04
351402
# `attestations: write` is required for GitHub's built-in

0 commit comments

Comments
 (0)