Audio version — Estimated duration: 6 min 21 sec

Intel GPU Installation (SYCL/oneAPI)

If you have an Intel graphics card (Arc A-series, Iris Xe, or UHD Graphics), you can accelerate model inference using SYCL through Intel’s oneAPI toolkit. This unlocks your iGPU or dGPU for much faster performance than CPU-only.

Supported Intel GPUs

FamilyExamplesNotes
Intel Arc (Alchemist)A770, A750, A580, A380Best performance — dedicated GPU
Intel Iris XeIntegrated in 11th-13th gen CoreGood for small models (≤3B)
Intel UHD GraphicsOlder integrated graphicsLimited — small quantized models only
Intel Arc BattlemageB580, B570Supported — newer GPUs

What is SYCL?

SYCL is a cross-platform programming model that lets code run on CPUs, GPUs, and other accelerators. Intel’s oneAPI implements SYCL for their hardware. In llama.cpp, the SYCL backend (GGML_SYCL=ON) is what lets your Intel GPU accelerate inference.

The key flag is -DGGML_SYCL=ON. At build time, you also choose which Intel GPU runtime to target:

  • -DGGML_SYCL_TARGET=INTEL — for Intel Arc, Iris Xe, UHD (most users)
  • -DGGML_SYCL_TARGET=INTEL_NOUVEAU — older Intel GPUs (rare)

Prerequisites

In addition to the core tools in the Prerequisites Guide, you need:

  1. Intel GPU with latest drivers — Download from Intel Driver & Support Assistant.

  2. Intel oneAPI Base Toolkit — This provides the SYCL compiler (icpx) and runtime libraries.

    • Download: Intel oneAPI Base Toolkit
    • Installation: Run the installer. On the component selection screen, ensure “Intel oneAPI DPC++/C++ Compiler” and “Intel® oneAPI DPC++ Library” are selected. A full install is ~4 GB; you can deselect everything else to save space.
    • Environment setup: After install, run this once per terminal session:
      C:\Program Files (x86)\Intel\oneAPI\setvars.bat
      Or search for “Intel oneAPI Command Prompt” in the Start Menu — it opens a pre-configured terminal.
  3. Verification:

    icpx --version

Step-by-Step Installation

Use the Intel oneAPI Command Prompt (or run setvars.bat in a regular terminal).

1. Clone the Repository

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp

2. Create a Build Directory

mkdir build
cd build

3. Configure with SYCL Support

cmake .. -DGGML_SYCL=ON -DGGML_SYCL_TARGET=INTEL

If you have both Intel Arc (dGPU) and integrated graphics, you can select which device to use at runtime (see below).

4. Compile

cmake --build . --config Release

The first build downloads several Intel GPU kernels — this is normal and only happens once.

Verification

Run the help command:

./bin/Release/llama-cli.exe --help

To confirm SYCL is working, run a small model and check the log output for lines like:

ggml_sycl_init: Found 1 SYCL device(s):
  Device 0: Intel(R) Arc(TM) A770 Graphics, compute capability 1.3

Running on Intel GPU

Use the -ngl flag to offload layers, just like CUDA/HIP:

./bin/Release/llama-cli.exe -m "C:\AI\models\llama-3.2-3b.gguf" -ngl 99 -p "Hello!"

Choosing Between Integrated and Discrete GPU

If your system has both an Intel iGPU and Arc dGPU, llama.cpp selects the first device by default. To choose a specific device, set the environment variable:

$env:GGML_SYCL_DEVICE="0"   # First device (usually dGPU)
$env:GGML_SYCL_DEVICE="1"   # Second device (usually iGPU)

Run llama-cli.exe with --verbose to see device numbering.

Troubleshooting

  • “icpx not found” — You haven’t run setvars.bat or opened the oneAPI command prompt. Ensure the oneAPI environment is loaded.
  • “Level Zero driver not found” — Your Intel GPU driver is outdated. Update via the Intel Driver & Support Assistant.
  • Compilation is very slow — First-time SYCL builds compile GPU kernels; this is expected. Subsequent builds are faster.
  • Out of memory at runtime — Intel iGPUs share system RAM. Use a smaller model or lower quantization (Q4_K_M or Q3_K_M). Reduce -ngl to offload fewer layers.

Last Updated: 2026-07-19