You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c46b325
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+32-5Lines changed: 32 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -257,8 +257,8 @@ platforms you target, e.g. `cpu-linux-x86-64`.
257
257
|`cpu-windows-aarch64`| CPU | Windows on ARM (Snapdragon X / Surface) | A JDK 8+ JVM; **Windows 10 or newer**. Built natively on `windows-11-arm` with `clang-cl`, same hybrid CRT as the x86-64 jar; one CPU backend module (ggml builds no ARM variant set for Windows), so the Vulkan and OpenCL module jars can join it. |
258
258
|`metal-macos-aarch64`| Metal + CPU | macOS aarch64 (Apple silicon) | A JDK 8+ JVM. |
259
259
|`cpu-android-aarch64` / `cpu-android-x86-64`| CPU | Android | For Android use the [`llama-android` AAR](#importing-in-android); these jars are the same libraries (with the CPU modules, aarch64 one per ARM feature level) for other Android JVM setups. |
260
-
|`cuda13-linux-x86-64`| CUDA 13 | Linux x86-64 with NVIDIA GPU | NVIDIA driver + CUDA 13 runtime libraries (`libcudart.so.13`, `libcublas.so.13`). |
261
-
|`cuda13-windows-x86-64`| CUDA 13 | Windows x86-64 with NVIDIA GPU | NVIDIA driver + CUDA 13 Toolkit (`cudart64_13.dll`, `cublas64_13.dll`, `cublasLt64_13.dll` on `PATH`). |
260
+
|`cuda13-linux-x86-64`| CUDA 13 | Linux x86-64 with NVIDIA GPU | NVIDIA driver + CUDA 13 runtime libraries (`libcudart.so.13`, `libcublas.so.13`). **The driver must be new enough for CUDA 13.4** -- see the note below. |
261
+
|`cuda13-windows-x86-64`| CUDA 13 | Windows x86-64 with NVIDIA GPU | NVIDIA driver + CUDA 13 Toolkit (`cudart64_13.dll`, `cublas64_13.dll`, `cublasLt64_13.dll` on `PATH`). **The driver must be new enough for CUDA 13.4** -- see the note below. |
262
262
|`vulkan-linux-x86-64`| Vulkan | Linux x86-64 with a Vulkan 1.2+ GPU (NVIDIA / AMD / Intel) | A Vulkan runtime (`libvulkan.so.1`), which current GPU drivers install. The most portable Linux GPU option. glibc ≈ 2.39 (built on `ubuntu-latest`). |
263
263
|`vulkan-linux-aarch64`| Vulkan | Linux aarch64 with a Vulkan 1.2+ GPU | A Vulkan runtime (`libvulkan.so.1`). glibc ≥ 2.39. |
264
264
|`vulkan-windows-x86-64`| Vulkan | Windows x86-64 with a Vulkan 1.2+ GPU | A Vulkan runtime (`vulkan-1.dll`), which current GPU drivers install. The most portable Windows GPU option. |
@@ -270,19 +270,46 @@ platforms you target, e.g. `cpu-linux-x86-64`.
270
270
|`rocm-windows-x86-64`| ROCm / HIP | Windows x86-64 with AMD GPU | The AMD ROCm **10** runtime DLLs (`amdhip64.dll`, `rocblas.dll`, `hipblas.dll`) on `PATH`; every Radeon target TheRock builds for Windows, gfx900 through RDNA4 (gfx900/gfx906/gfx90c/gfx1153 best effort). |
271
271
|`sycl-linux-x86-64`| SYCL (Intel oneAPI, fp16) | Linux x86-64 with Intel GPU (Arc / iGPU) | An Intel oneAPI / Level-Zero runtime. fp16 accumulation, as upstream's SYCL release builds. |
272
272
|`sycl-windows-x86-64`| SYCL (Intel oneAPI, fp16) | Windows x86-64 with Intel GPU (Arc / iGPU) | The Intel oneAPI / Level-Zero runtime DLLs on `PATH`. |
|`openvino-windows-x86-64`| OpenVINO | Windows x86-64 (Intel GPU / NPU / CPU) |The Intel OpenVINO runtime DLLs on `PATH`. |
273
+
|`openvino-linux-x86-64`| OpenVINO | Linux x86-64 with an Intel GPU or NPU |**Opt-in** (see the note below): the jar does nothing until `-Dnet.ladenthin.llama.backend=openvino` names it. An Intel OpenVINO runtime**and an OpenCL ICD loader** (`libOpenCL.so.1`, package `ocl-icd-libopencl1` -- the OpenVINO archive does not ship it; without it the module silently does not open). |
274
+
|`openvino-windows-x86-64`| OpenVINO | Windows x86-64 with an Intel GPU or NPU |**Opt-in** (see the note below): the jar does nothing until `-Dnet.ladenthin.llama.backend=openvino` names it. The Intel OpenVINO runtime DLLs on `PATH` (the OS supplies `OpenCL.dll`). |
275
275
276
276
> [!NOTE]
277
277
> No vendor runtime is bundled; it comes from the GPU driver or toolkit on the host. The GPU
278
278
> module jars are validated **build-only** in CI (GitHub runners have no GPU): the smoke jobs put
279
279
> every GPU module of the platform next to the library and see ggml skip each one for lack of a
280
280
> runtime, so end-to-end GPU inference is verified locally / on self-hosted hardware. A module
281
281
> whose runtime is installed but finds no device (e.g. the CUDA toolkit without an NVIDIA GPU)
282
-
> simply registers none.`-Dnet.ladenthin.llama.backend=<a>,<b>` restricts the modules put in
282
+
> simply registers none -- **with two measured exceptions, both described below.**`-Dnet.ladenthin.llama.backend=<a>,<b>` restricts the modules put in
283
283
> place to the named ones (`cpu` for none) and fails loud when a named jar is not on the
284
284
> classpath; unset, every GPU module jar on the classpath is used.
285
285
286
+
> [!IMPORTANT]
287
+
> **Two GPU jars need more than their runtime, and both were found by measurement rather than by
288
+
> reading the code** ([`docs/benchmarks/gpu-module-jars.md`](docs/benchmarks/gpu-module-jars.md)).
289
+
>
290
+
> **CUDA: the driver must be new enough for the toolkit the module was built with (13.4).** The
291
+
> module ships native code for the GPU generations listed in `CMAKE_CUDA_ARCHITECTURES`
292
+
> (Turing through Blackwell); a GPU outside that set runs only if the driver can compile the
293
+
> module's PTX, and **a driver too old to do so does not fall back to the CPU -- it ends the
294
+
> process.** ggml calls `abort()`, which no Java `catch` can intercept, and it happens even with
295
+
> `-ngl 0`: having the jar on the classpath is enough, because the backend registers and the device
296
+
> is used during setup whatever the layer count says. Measured on a Tesla T4 with driver
297
+
> 595.91.07, where that generation still shipped as PTX only. If you cannot control the driver,
298
+
> keep the jar off the classpath or pass `-Dnet.ladenthin.llama.backend=cpu`.
299
+
>
300
+
> **OpenVINO is opt-in, and that is why.** On a host *without* an Intel accelerator its CPU plugin
301
+
> opens perfectly well and contributes a device, so llama.cpp prefers it -- measured at
302
+
> **17x slower prompt processing and 172x slower generation** than the CPU modules (490.4/34.5
303
+
> down to 29.4/**0.2** tokens per second). It therefore breaks the premise every other module jar
304
+
> keeps ("a module that cannot help is skipped") in both directions: it also fails to open at all
305
+
> without an OpenCL ICD loader, which its own runtime archive does not include. So its jar on the
306
+
> classpath does nothing until `net.ladenthin.llama.backend` names it, and the loader says so on
307
+
> stderr.
308
+
>
309
+
> **Vulkan is the one that behaves exactly as designed** and is the recommended portable choice:
310
+
> without an ICD it is skipped, with throughput identical to the CPU baseline (201.8/24.1 against
311
+
> 202.2/24.1 on the same machine).
312
+
286
313
> [!NOTE]
287
314
> On the **module path** each natives jar is an automatic module
288
315
> (`net.ladenthin.llama.natives.<classifier>`, with `_` for `-`) that nothing requires, so
0 commit comments