Repository navigation
213 lines (205 loc) · 9.22 KB
/
Copy pathbuild.yml
File metadata and controls
213 lines (205 loc) · 9.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# Fast build + unit gate on GitHub-hosted runners. The heavier cross-platform
# LIBERO regression sweep lives in vla-ci.yml (self-hosted).
name: build
on:
push:
branches: [main, dev]
pull_request:
branches: [main]
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
py-tooling:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.11'
- name: converter remap
run: python tests/py/test_converters.py
- name: binding struct parity
run: python tests/py/test_bindings.py
build-gate:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- name: deps
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends \
build-essential cmake git ca-certificates pkg-config \
libzmq3-dev cppzmq-dev libprotobuf-dev protobuf-compiler
# Read the pin rather than repeat it: two copies drift and the stale one
# silently reuses the wrong _deps.
- name: read llama.cpp pin
id: pin
run: echo "tag=$(bash scripts/llama_tag.sh)" >> "$GITHUB_OUTPUT"
# The cached _deps holds compiled ggml-cpu objects, and hosted runners do not
# all have the same CPU. Jobs that run ctest build with GGML_NATIVE=OFF so a
# tree compiled on one runner does not hit SIGILL on another (AVX-512).
- uses: actions/cache@v6
with:
path: build/_deps
key: llama-${{ steps.pin.outputs.tag }}-${{ runner.os }}-asan-generic
# Everything, not a target list: ctest registers tests this job must build,
# and a named list goes stale the next time one is added.
- name: build + ctest (CPU, ASan+UBSan, -Werror)
run: |
san="-fsanitize=address,undefined -fno-sanitize-recover=undefined -fno-omit-frame-pointer"
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGGML_CUDA=OFF -DGGML_NATIVE=OFF -DVLA_BUILD_TESTS=ON \
-DVLA_WERROR=ON -DCMAKE_C_FLAGS="$san" -DCMAKE_CXX_FLAGS="$san"
cmake --build build -j"$(nproc)"
ctest --test-dir build --output-on-failure
# Neither patch script runs on a CPU build, and build-cuda patches only on a
# cache miss, so their anchors would otherwise rot unnoticed until someone
# configures a fresh CUDA or OpenVINO tree. Patch a copy: the real one is
# cached.
- name: patch anchors still apply
run: |
cp -r build/_deps/llama-src /tmp/llama-patchtest
python3 scripts/patch_ggml_cuda_ext_hook.py /tmp/llama-patchtest
python3 scripts/patch_ggml_sycl_ext_hook.py /tmp/llama-patchtest
python3 scripts/patch_ggml_sycl_ext_hook.py /tmp/llama-patchtest # idempotent
python3 scripts/patch_ggml_openvino.py /tmp/llama-patchtest
python3 scripts/patch_ggml_openvino.py /tmp/llama-patchtest # idempotent
build-cuda:
runs-on: ubuntu-24.04
container: nvidia/cuda:12.9.1-devel-ubuntu24.04
steps:
- name: deps
run: |
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
build-essential cmake git ca-certificates pkg-config python3 \
libzmq3-dev cppzmq-dev libprotobuf-dev protobuf-compiler
- uses: actions/checkout@v7
- name: read llama.cpp pin
id: pin
run: echo "tag=$(bash scripts/llama_tag.sh)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v6
with:
path: build/_deps
key: llama-${{ steps.pin.outputs.tag }}-${{ runner.os }}-cuda-${{ hashFiles('scripts/patch_ggml_cuda_ext_hook.py') }}
- name: build (compile only, the runner has no GPU)
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=89-real \
-DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined -DVLA_BUILD_TESTS=ON -DVLA_WERROR=ON
cmake --build build -j"$(nproc)"
# Intel GPUs through oneAPI SYCL. The runner has no GPU, so ggml-sycl itself
# cannot start; ctest still runs everything, and test_foldquant_sycl_op drives
# the FoldQuant kernels straight through the extension hook on the OpenCL CPU
# device that the DPC++ compiler package ships, against the CPU reference.
build-sycl:
runs-on: ubuntu-24.04
steps:
- name: free disk (oneAPI + a SYCL build need ~15 GB)
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
- uses: actions/checkout@v7
- name: deps
run: |
wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| sudo gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
| sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends \
build-essential cmake git ca-certificates pkg-config python3 \
libzmq3-dev cppzmq-dev libprotobuf-dev protobuf-compiler \
intel-oneapi-compiler-dpcpp-cpp-2026.1 intel-oneapi-mkl-devel-2026.1 intel-oneapi-dnnl-devel-2026.0
- name: read llama.cpp pin
id: pin
run: echo "tag=$(bash scripts/llama_tag.sh)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v6
with:
path: build/_deps
key: llama-${{ steps.pin.outputs.tag }}-${{ runner.os }}-sycl-generic-${{ hashFiles('scripts/patch_ggml_sycl_ext_hook.py') }}
- name: build + ctest (OpenCL CPU device)
shell: bash
env:
ONEAPI_DEVICE_SELECTOR: opencl:cpu
VLA_FQ_TEST_REQUIRE_DEVICE: 1
run: |
source /opt/intel/oneapi/setvars.sh
sycl-ls
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_SYCL=ON -DGGML_NATIVE=OFF \
-DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DVLA_BUILD_TESTS=ON -DVLA_WERROR=ON
cmake --build build -j"$(nproc)"
ctest --test-dir build --output-on-failure
# Intel CPUs, GPUs and NPUs through OpenVINO. The CPU plugin runs on the
# runner, so test_foldquant_ov_op executes the translated FoldQuant graph and
# checks it against the CPU reference.
build-openvino:
runs-on: ubuntu-24.04
env:
OV_ARCHIVE: openvino_toolkit_ubuntu24_2026.4.0.22959.99c81491cc3_x86_64
steps:
- uses: actions/checkout@v7
- name: deps
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends \
build-essential cmake git ca-certificates pkg-config python3 \
libzmq3-dev cppzmq-dev libprotobuf-dev protobuf-compiler \
opencl-clhpp-headers ocl-icd-opencl-dev opencl-headers
- uses: actions/cache@v6
id: ov
with:
path: /opt/openvino
key: ${{ env.OV_ARCHIVE }}
- name: OpenVINO runtime
if: steps.ov.outputs.cache-hit != 'true'
run: |
curl -fsSL "https://storage.openvinotoolkit.org/repositories/openvino/packages/2026.4/linux/${OV_ARCHIVE}.tgz" \
| tar xz -C /tmp
sudo mv "/tmp/${OV_ARCHIVE}" /opt/openvino
- name: read llama.cpp pin
id: pin
run: echo "tag=$(bash scripts/llama_tag.sh)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v6
with:
path: build/_deps
key: llama-${{ steps.pin.outputs.tag }}-${{ runner.os }}-openvino-generic-${{ hashFiles('scripts/patch_ggml_openvino.py') }}
- name: build + ctest (CPU plugin)
shell: bash
run: |
source /opt/openvino/setupvars.sh
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_OPENVINO=ON -DGGML_NATIVE=OFF -DVLA_BUILD_TESTS=ON -DVLA_WERROR=ON
cmake --build build -j"$(nproc)"
ctest --test-dir build --output-on-failure
build-backends:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { name: opencl, os: ubuntu-24.04, cmake: -DGGML_OPENCL=ON -DVLA_WERROR=ON }
- { name: metal, os: macos-15, cmake: -DGGML_METAL=ON, test: true }
steps:
- uses: actions/checkout@v7
- name: deps
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends \
build-essential cmake git ca-certificates pkg-config \
libzmq3-dev cppzmq-dev libprotobuf-dev protobuf-compiler \
ocl-icd-opencl-dev opencl-headers
- name: deps
if: runner.os == 'macOS'
run: brew install cmake zeromq cppzmq protobuf
- name: read llama.cpp pin
id: pin
run: echo "tag=$(bash scripts/llama_tag.sh)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v6
with:
path: build/_deps
key: llama-${{ steps.pin.outputs.tag }}-${{ runner.os }}-${{ matrix.name }}
- name: build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake }} -DVLA_BUILD_TESTS=ON
cmake --build build -j"$(getconf _NPROCESSORS_ONLN)"
- name: ctest
if: matrix.test
run: ctest --test-dir build --output-on-failure