Skip to content

Commit c089caf

Browse files
feat(sycl): make the intel llama.cpp backend self-contained on any host (#10991)
* feat(sycl): make the intel llama.cpp backend self-contained on any host The SYCL backend shipped an incomplete oneAPI runtime AND relied on a host-provided GPU driver, so it only ran inside the build container. On a bare host it died with "libze_loader.so.1 / libdnnl.so.3: cannot open shared object file", and even with the host's Intel driver installed it SIGSEGV'd during SYCL init when the host driver was built against a newer glibc than the backend's bundled loader (rolling-release distros). package_intel_libs now bundles the complete, coherent oneAPI runtime (the missing MKL ILP64 / sycl_blas / tbb_thread + oneDNN + the dlopen'd UR adapters, plus a sweep of the backend binaries' own direct deps) and the Intel GPU userspace driver (libze_intel_gpu + libigdrcl + IGC + gmm) with its OpenCL ICD manifest, mirroring how package_vulkan_libs bundles Mesa. run.sh points the Level Zero and OpenCL loaders at the bundled driver, and install-base-deps.sh installs it in the SYCL build image. Bundling the driver is safe across kernels because it talks to the host i915/xe via the stable DRM UAPI (unlike NVIDIA's kernel-locked userspace). Validated on Arch (glibc 2.43, i915): the backend loads and runs on an Iris Xe with no host Intel packages installed. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> * fix(sycl): install a driver that exists, and let the user choose their own The driver install added earlier in this branch asked apt for intel-level-zero-gpu, which is not a package in Ubuntu 24.04. apt fails outright on an unknown name, so neither driver was installed, nothing was there to copy, and the images carried no driver at all. It now comes from Intel's own repository, which has 25.18 for this Ubuntu release, against 23.43 from late 2023 in the Ubuntu archive. The archive driver does not know any card released since, so a machine with a recent Intel GPU would end up carrying a driver that cannot drive it. Anything that goes wrong during that install fails the build on purpose: an unreachable repository is a passing problem that a retry fixes, while quietly carrying a different driver, or none, is a difference nobody would notice until a user reports an idle GPU. run.sh used to overwrite whatever driver the user had chosen. Level Zero uses only the driver it is given, so on a machine with a card too new for the carried driver, the GPU would go unused with no way back. Both that setting and the OpenCL one are now left alone when already set, and the docs say how to point a backend at the machine's own driver. The OpenCL setting also used to be applied whenever the backend held a driver list, even when the driver it named had not been copied, which leaves OpenCL with nothing instead of falling back to the machine's own driver. It now requires the copied driver to be present, and the packaging leaves out the list entry of any driver it did not copy. The oneAPI images list a processor-only OpenCL library, which was being carried with nothing behind it. Two more corrections in the packaging. The scan for libraries a program is linked against only looked at files named llama-cpp-*, so turboquant and bonsai, which are also built for Intel GPUs, were left with the incomplete set of libraries this branch set out to fix; it now looks at every program in the directory. And a build that should carry a driver but ends up without one now says so, which is what a stale prebuilt base image looks like: such a backend still runs on a machine that has its own driver, so nothing fails and the only other symptom is a user reporting an idle GPU. Backends now also ask the driver to report how much graphics memory is free, without which llama.cpp reads zero on an integrated GPU, since such a chip shares the system memory instead of having its own. turboquant and bonsai get the same run.sh handling as llama.cpp. The driver is only carried by the builds that start through run.sh, because run.sh is what points Level Zero and OpenCL at it. The Python backends for Intel GPUs start differently and would never load it, so they keep using the machine's own driver rather than carrying several hundred megabytes they cannot use. Checked in a container on Ubuntu 24.04: the install brings driver 25.18 with the files where the packaging expects them, an unreachable repository fails the build, and the copied set resolves on its own once the machine's Intel packages are moved away. Assisted-by: Claude:claude-opus-5 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> * fix(ci): rebuild every Linux backend when the GPU packaging script changes scripts/build/package-gpu-libs.sh decides which GPU libraries end up inside an image. The filter that builds the backend matrix listed it as an input of the Python images only, so changing it rebuilt no Go and no C++ backend, even though those run it from their own package.sh. A packaging fix aimed at the Intel llama.cpp backend could merge and reach no image, which is the same failure this rule was written to prevent. Assisted-by: Claude:claude-opus-5 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> * fix(sycl): carry only the driver Level Zero uses, not the OpenCL one llama.cpp reaches an Intel GPU through Level Zero, which hands the driver programs that are already compiled and so needs only the back end of the graphics compiler. The OpenCL driver can be handed source code instead, so it needs the compiler's front end as well, and that arrives with its own copy of clang. Carrying it cost about 139 MB in every backend built for Intel GPUs, and took the carried set from 123 MB to 261 MB. Nothing here takes that path. No LocalAI code selects an OpenCL device, each backend image holds one backend, and the documentation never described OpenCL as a way to run models: the only mentions are a stale clblas row in the BUILD_TYPE table, for a llama.cpp backend that no longer exists and that no build matrix entry uses, and the sycl-ls troubleshooting hint. Before this branch the packaging carried the OpenCL loader and adapter but no driver, so the path could not work in a released image either. There is nobody to keep working. The driver list that OpenCL reads is no longer carried, and run.sh no longer sets OCL_ICD_VENDORS, so OpenCL inside a container keeps using whatever the image provides rather than being pointed at a directory with no driver in it. Checked in a container against the real 25.18 driver: the carried set is 123 MB with nothing unresolved, and Level Zero still reports the GPU with the machine's own Intel packages moved out of the way. Neither the Level Zero driver nor the compiler back end names the front end or clang among the libraries it opens by name, so the leaner set is complete for this path. Assisted-by: Claude:claude-opus-5 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> --------- Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> Co-authored-by: localai-org-maint-bot <bot-opensource@localaisrl.com>
1 parent 9584377 commit c089caf

11 files changed

Lines changed: 578 additions & 22 deletions

File tree

.agents/ci-caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ The per-backend prefix match only sees files under a backend's own directory, so
125125
| `backend/backend.proto` | nothing if the edit is additive-only, otherwise everything (see below) |
126126
| `backend/Dockerfile.<x>` | the Linux entries whose `dockerfile:` names it |
127127
| `backend/python/common/` | Python, Linux + Darwin |
128-
| `scripts/build/package-gpu-libs.sh` | Python, Linux only |
128+
| `scripts/build/package-gpu-libs.sh` | every Linux entry (Python, Go and C++ all run it) |
129129
| `scripts/build/<lang>-darwin.sh` | the Darwin entries that build target routes to |
130130
| `.github/workflows/backend_build[_darwin].yml` | everything on that OS |
131131
| anything else under `scripts/build/` (except `*_test.sh`) | everything — conservative default for unclassified packaging inputs |

.docker/install-base-deps.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,54 @@ if [ "${BUILD_TYPE:-}" = "vulkan" ] && [ "${SKIP_DRIVERS:-false}" = "false" ]; t
113113
rm -rf /var/lib/apt/lists/*
114114
fi
115115

116+
# --- 2b. Intel graphics driver (BUILD_TYPE=sycl*) ---
117+
# The Intel oneAPI base image brings the compilers and the oneAPI libraries, but
118+
# not the driver that talks to the graphics card. The packaging step copies that
119+
# driver into the backend, so that the backend works on a machine which has no
120+
# Intel graphics packages of its own, for the same reason the Vulkan section
121+
# above installs the Mesa drivers. Install it here so there is something to copy.
122+
#
123+
# Only the sycl builds are covered, because those are the ones whose packaging
124+
# copies the driver. See package_intel_libs in scripts/build/package-gpu-libs.sh.
125+
#
126+
# The driver comes from Intel's own package repository, not from the Ubuntu
127+
# archive. The archive has 23.43 from late 2023, which does not know any card
128+
# released since, so a machine with a recent Intel GPU would end up carrying a
129+
# driver that cannot drive it. Intel's repository has 25.18 for the same Ubuntu
130+
# release.
131+
#
132+
# Anything that goes wrong here fails the build, on purpose. An unreachable
133+
# repository is a passing problem that a retry fixes, whereas carrying a
134+
# different driver than intended, or none, is a difference nobody would notice
135+
# until a user reports an idle GPU.
136+
if case "${BUILD_TYPE:-}" in sycl*) true;; *) false;; esac \
137+
&& [ "${SKIP_DRIVERS:-false}" = "false" ]; then
138+
# Ubuntu release name, which is what the repository is indexed by.
139+
ubuntu_codename=$(. /etc/os-release && echo "${VERSION_CODENAME:-}")
140+
if [ -z "$ubuntu_codename" ]; then
141+
echo "ERROR: cannot tell which Ubuntu release this image is, so cannot pick the Intel driver repository" >&2
142+
exit 1
143+
fi
144+
145+
# The key is armored text, which apt reads directly from a .asc file, so
146+
# there is no need for gnupg here. "unified" is the component Intel ships
147+
# its current driver in.
148+
mkdir -p /usr/share/keyrings
149+
curl -fsSL https://repositories.intel.com/gpu/intel-graphics.key \
150+
-o /usr/share/keyrings/intel-graphics.asc
151+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.asc] https://repositories.intel.com/gpu/ubuntu ${ubuntu_codename} unified" \
152+
> /etc/apt/sources.list.d/intel-graphics.list
153+
apt-get update
154+
# The first package holds the driver OpenCL talks to, the second the driver
155+
# Level Zero talks to. Between them they pull in the compiler and the memory
156+
# manager that both need.
157+
apt-get install -y --no-install-recommends \
158+
intel-opencl-icd \
159+
libze-intel-gpu1
160+
apt-get clean
161+
rm -rf /var/lib/apt/lists/*
162+
fi
163+
116164
# --- 3. CUDA toolkit (BUILD_TYPE=cublas|l4t) ---
117165
if { [ "${BUILD_TYPE:-}" = "cublas" ] || [ "${BUILD_TYPE:-}" = "l4t" ]; } && [ "${SKIP_DRIVERS:-false}" = "false" ]; then
118166
apt-get update

backend/cpp/bonsai/run.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,27 @@ else
4040
if [ -d "$CURDIR/lib/hipblaslt/library" ]; then
4141
export HIPBLASLT_TENSILE_LIBPATH="$CURDIR"/lib/hipblaslt/library
4242
fi
43+
# Backends built for Intel GPUs carry a copy of the Intel graphics driver,
44+
# and libze_loader is only there in those builds. Level Zero looks for a
45+
# driver on its own, so point it at the copy that came with this backend: it
46+
# was built against the same C library, while the machine's own driver may
47+
# not have been, and loading that one can crash on start.
48+
#
49+
# Anything the user set is left alone, so a machine with a graphics card
50+
# newer than the driver carried here can still be told to use its own.
51+
# Nothing is said about OpenCL: no OpenCL driver is carried, so anything we
52+
# set there would leave OpenCL worse off than the machine's own setup.
53+
if [ -e "$CURDIR/lib/libze_loader.so.1" ]; then
54+
if [ -e "$CURDIR/lib/libze_intel_gpu.so.1" ] && [ -z "${ZE_ENABLE_ALT_DRIVERS:-}" ]; then
55+
export ZE_ENABLE_ALT_DRIVERS="$CURDIR"/lib/libze_intel_gpu.so.1
56+
fi
57+
# Ask the driver how much graphics memory is free. Without this, the
58+
# backend reads zero on an integrated graphics chip, because such a chip
59+
# shares the system memory instead of having its own.
60+
if [ -z "${ZES_ENABLE_SYSMAN:-}" ]; then
61+
export ZES_ENABLE_SYSMAN=1
62+
fi
63+
fi
4364
fi
4465

4566
# If there is a lib/ld.so, use it

backend/cpp/llama-cpp/run.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,27 @@ else
4242
if [ -d "$CURDIR/lib/hipblaslt/library" ]; then
4343
export HIPBLASLT_TENSILE_LIBPATH="$CURDIR"/lib/hipblaslt/library
4444
fi
45+
# Backends built for Intel GPUs carry a copy of the Intel graphics driver,
46+
# and libze_loader is only there in those builds. Level Zero looks for a
47+
# driver on its own, so point it at the copy that came with this backend: it
48+
# was built against the same C library, while the machine's own driver may
49+
# not have been, and loading that one can crash on start.
50+
#
51+
# Anything the user set is left alone, so a machine with a graphics card
52+
# newer than the driver carried here can still be told to use its own.
53+
# Nothing is said about OpenCL: no OpenCL driver is carried, so anything we
54+
# set there would leave OpenCL worse off than the machine's own setup.
55+
if [ -e "$CURDIR/lib/libze_loader.so.1" ]; then
56+
if [ -e "$CURDIR/lib/libze_intel_gpu.so.1" ] && [ -z "${ZE_ENABLE_ALT_DRIVERS:-}" ]; then
57+
export ZE_ENABLE_ALT_DRIVERS="$CURDIR"/lib/libze_intel_gpu.so.1
58+
fi
59+
# Ask the driver how much graphics memory is free. Without this,
60+
# llama.cpp reads zero on an integrated graphics chip, because such a
61+
# chip shares the system memory instead of having its own.
62+
if [ -z "${ZES_ENABLE_SYSMAN:-}" ]; then
63+
export ZES_ENABLE_SYSMAN=1
64+
fi
65+
fi
4566
fi
4667

4768
# If there is a lib/ld.so, use it

backend/cpp/turboquant/run.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,27 @@ else
4040
if [ -d "$CURDIR/lib/hipblaslt/library" ]; then
4141
export HIPBLASLT_TENSILE_LIBPATH="$CURDIR"/lib/hipblaslt/library
4242
fi
43+
# Backends built for Intel GPUs carry a copy of the Intel graphics driver,
44+
# and libze_loader is only there in those builds. Level Zero looks for a
45+
# driver on its own, so point it at the copy that came with this backend: it
46+
# was built against the same C library, while the machine's own driver may
47+
# not have been, and loading that one can crash on start.
48+
#
49+
# Anything the user set is left alone, so a machine with a graphics card
50+
# newer than the driver carried here can still be told to use its own.
51+
# Nothing is said about OpenCL: no OpenCL driver is carried, so anything we
52+
# set there would leave OpenCL worse off than the machine's own setup.
53+
if [ -e "$CURDIR/lib/libze_loader.so.1" ]; then
54+
if [ -e "$CURDIR/lib/libze_intel_gpu.so.1" ] && [ -z "${ZE_ENABLE_ALT_DRIVERS:-}" ]; then
55+
export ZE_ENABLE_ALT_DRIVERS="$CURDIR"/lib/libze_intel_gpu.so.1
56+
fi
57+
# Ask the driver how much graphics memory is free. Without this, the
58+
# backend reads zero on an integrated graphics chip, because such a chip
59+
# shares the system memory instead of having its own.
60+
if [ -z "${ZES_ENABLE_SYSMAN:-}" ]; then
61+
export ZES_ENABLE_SYSMAN=1
62+
fi
63+
fi
4364
fi
4465

4566
# If there is a lib/ld.so, use it

docs/content/features/GPU-acceleration.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,23 @@ This configuration has been tested on a 'custom' cluster managed by SUSE Rancher
329329

330330
### Requirements
331331

332-
If building from source, you need to install [Intel oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit/download.html) and have the Intel drivers available in the system.
332+
You need a machine with an Intel GPU and a kernel that drives it, which every current Linux kernel does. You do not need to install any Intel graphics packages: the backends carry their own copy of the Intel graphics driver, so they work on a machine that has none installed, and on a machine whose own driver was built against a newer C library than the backend.
333+
334+
If you build from source instead of using the images, you need the [Intel oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit/download.html).
335+
336+
#### Using your own Intel driver instead
337+
338+
The carried driver comes from Intel's own package repository, so it knows the cards released up to the point the image was built. If your GPU is newer than that, or you would rather use the driver your distribution ships, point the backend at it:
339+
340+
```bash
341+
docker run --rm -ti --device /dev/dri -p 8080:8080 \
342+
-e ZE_ENABLE_ALT_DRIVERS=/usr/lib/x86_64-linux-gnu/libze_intel_gpu.so.1 \
343+
-v $PWD/models:/models quay.io/go-skynet/local-ai:{{< version >}}-gpu-intel
344+
```
345+
346+
Set the path to wherever your distribution keeps that file. Whatever you set is used as is, and the carried driver is left alone.
347+
348+
The backends carry only the driver Level Zero uses, which is how llama.cpp reaches an Intel GPU. They do not carry an OpenCL driver, so OpenCL inside a container continues to use whatever the image itself provides.
333349

334350
### Container images
335351

@@ -355,6 +371,8 @@ docker run --rm -ti --device /dev/dri -p 8080:8080 -e DEBUG=true -e MODELS_PATH=
355371

356372
Note also that sycl does have a known issue to hang with `mmap: true`. You have to disable it in the model configuration if explicitly enabled.
357373

374+
On an integrated Intel GPU, the amount of free graphics memory can only be read if the driver is asked to report it. The backends do that for you by setting `ZES_ENABLE_SYSMAN=1`. If you set that variable yourself, your value is kept, and setting it to `0` makes the backend read zero free memory, because an integrated GPU has no memory of its own and shares the system's.
375+
358376
## Vulkan acceleration
359377

360378
### Requirements
@@ -456,7 +474,7 @@ sycl-ls
456474

457475
- **NVIDIA**: Ensure `nvidia-container-toolkit` is installed and the Docker runtime is configured. Test with `docker run --rm --gpus all nvidia/cuda:12.8.0-base-ubuntu24.04 nvidia-smi`.
458476
- **AMD**: Ensure `/dev/dri` and `/dev/kfd` are passed to the container and that `amdgpu-dkms` is installed on the host.
459-
- **Intel**: Ensure `/dev/dri` is passed to the container and Intel GPU drivers are installed on the host.
477+
- **Intel**: Ensure `/dev/dri` is passed to the container. No Intel graphics packages are needed on the host, since the backends bring their own driver. If the GPU is a recent model that the carried driver does not know, point the backend at the host's own driver as shown in [Intel acceleration](#intel-acceleration-sycl).
460478

461479
### Model loads on CPU instead of GPU
462480

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
#!/bin/bash
2+
# Checks how the run.sh of each C++ backend sets up the Intel graphics driver.
3+
#
4+
# A backend built for Intel GPUs carries its own copy of the Intel graphics
5+
# driver. run.sh has to tell Level Zero, which is how llama.cpp reaches the
6+
# card, to use that copy. Three things must hold, and all three have broken in
7+
# the past:
8+
#
9+
# 1. If the user already chose a driver, keep the user's choice. Otherwise a
10+
# machine with a graphics card too new for the carried driver stops
11+
# working, with no way to get back to the driver that did work.
12+
# 2. Say nothing about OpenCL. No OpenCL driver is carried, so pointing
13+
# OpenCL at the backend's own directory would leave it with no driver at
14+
# all, where saying nothing leaves it the machine's own.
15+
# 3. Ask the driver for the amount of free memory. Without this, llama.cpp
16+
# reads zero free memory on an integrated graphics chip, because such a
17+
# chip has no memory of its own and shares the system's.
18+
#
19+
# The test builds a fake backend directory for each run.sh, runs it, and reads
20+
# back the variables it exported.
21+
set -euo pipefail
22+
23+
WORK=$(mktemp -d)
24+
trap 'rm -rf "$WORK"' EXIT
25+
26+
REPO_ROOT=$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")
27+
28+
RUN_SCRIPTS=(
29+
"backend/cpp/llama-cpp/run.sh llama-cpp"
30+
"backend/cpp/turboquant/run.sh turboquant"
31+
"backend/cpp/bonsai/run.sh bonsai"
32+
)
33+
34+
failures=0
35+
36+
fail() {
37+
echo "FAIL: $*"
38+
failures=$((failures + 1))
39+
}
40+
41+
# Builds a fake backend directory: the real run.sh, a stand-in for the backend
42+
# program that prints the variables we care about, and whichever libraries the
43+
# caller asked for.
44+
#
45+
# Usage: make_backend <dir> <program-prefix> [library ...]
46+
make_backend() {
47+
local dir="$1" prefix="$2"
48+
shift 2
49+
50+
mkdir -p "$dir/lib"
51+
cp "$RUN_SH" "$dir/run.sh"
52+
chmod +x "$dir/run.sh"
53+
54+
local lib
55+
for lib in "$@"; do
56+
: > "$dir/lib/$lib"
57+
done
58+
59+
cat > "$dir/${prefix}-fallback" <<'PROGRAM'
60+
#!/bin/bash
61+
echo "level_zero_driver=${ZE_ENABLE_ALT_DRIVERS:-}"
62+
echo "opencl_driver_list=${OCL_ICD_VENDORS:-}"
63+
echo "report_free_memory=${ZES_ENABLE_SYSMAN:-}"
64+
PROGRAM
65+
chmod +x "$dir/${prefix}-fallback"
66+
}
67+
68+
# Runs a fake backend and prints the one variable asked for.
69+
# Usage: read_variable <dir> <name>
70+
read_variable() {
71+
local dir="$1" name="$2"
72+
bash "$dir/run.sh" 2>/dev/null | sed -n "s/^${name}=//p"
73+
}
74+
75+
for entry in "${RUN_SCRIPTS[@]}"; do
76+
read -r script prefix <<< "$entry"
77+
RUN_SH="$REPO_ROOT/$script"
78+
79+
if [ ! -f "$RUN_SH" ]; then
80+
fail "$script does not exist"
81+
continue
82+
fi
83+
84+
# An Intel build with its own graphics driver: point Level Zero and OpenCL
85+
# at the bundled copies and ask for the free memory reading.
86+
bundled="$WORK/$prefix-bundled"
87+
make_backend "$bundled" "$prefix" \
88+
libze_loader.so.1 libze_intel_gpu.so.1 libigdrcl.so
89+
mkdir -p "$bundled/etc/OpenCL/vendors"
90+
echo "libigdrcl.so" > "$bundled/etc/OpenCL/vendors/intel.icd"
91+
92+
got=$(read_variable "$bundled" level_zero_driver)
93+
if [ "$got" != "$bundled/lib/libze_intel_gpu.so.1" ]; then
94+
fail "$script: expected Level Zero to use the bundled driver, got '$got'"
95+
fi
96+
97+
# Even with an OpenCL driver and a driver list sitting in the backend, which
98+
# is what an older packaging left behind, OpenCL must be left alone.
99+
got=$(read_variable "$bundled" opencl_driver_list)
100+
if [ -n "$got" ]; then
101+
fail "$script: OpenCL was pointed at the backend's own directory ('$got')"
102+
fi
103+
104+
got=$(read_variable "$bundled" report_free_memory)
105+
if [ "$got" != "1" ]; then
106+
fail "$script: expected the free memory reading to be turned on, got '$got'"
107+
fi
108+
109+
# The user picked a driver already. Both choices must survive.
110+
got=$(ZE_ENABLE_ALT_DRIVERS=/usr/lib/host-driver.so \
111+
read_variable "$bundled" level_zero_driver)
112+
if [ "$got" != "/usr/lib/host-driver.so" ]; then
113+
fail "$script: the user's Level Zero driver was overwritten with '$got'"
114+
fi
115+
116+
got=$(ZES_ENABLE_SYSMAN=0 read_variable "$bundled" report_free_memory)
117+
if [ "$got" != "0" ]; then
118+
fail "$script: the user's free memory setting was overwritten with '$got'"
119+
fi
120+
121+
# A build for some other kind of graphics card. None of the Intel
122+
# variables belong here.
123+
other="$WORK/$prefix-other"
124+
make_backend "$other" "$prefix" libcublas.so.12
125+
126+
for name in level_zero_driver opencl_driver_list report_free_memory; do
127+
got=$(read_variable "$other" "$name")
128+
if [ -n "$got" ]; then
129+
fail "$script: $name was set on a build with no Intel libraries ('$got')"
130+
fi
131+
done
132+
done
133+
134+
if [ "$failures" -gt 0 ]; then
135+
echo "$failures check(s) failed"
136+
exit 1
137+
fi
138+
139+
echo "PASS: every run.sh sets up the Intel graphics driver correctly"

0 commit comments

Comments
 (0)