Performance of llama.cpp on Intel GPU with SYCL backend #23313
Replies: 28 comments 68 replies
|
compiled with cmake -B build-sycl -DGGML_SYCL=ON -DGGML_SYCL_F16=ON -DGGML_SYCL_TARGET=INTEL -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_FLAGS="-march=znver4" -DCMAKE_CXX_FLAGS="-march=znver4" -DCMAKE_BUILD_TYPE=Release && cmake --build build-sycl --config Release -j 16 single b70 dual b70: |
|
If instead compiling and using with f16=off: cmake -B build-sycl -DGGML_SYCL=ON -DGGML_SYCL_F16=OFF -DGGML_SYCL_TARGET=INTEL -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_FLAGS="-march=znver4" -DCMAKE_CXX_FLAGS="-march=znver4" -DCMAKE_BUILD_TYPE=Release && cmake --build build-sycl --config Release -j 16 Single B70: Dual B70: |
|
And with a much more interesting model, namely Qwen 3.6 27B: q4 and q8: |
|
Ooft. A770 16GB, i5 14600k, current cachyOS. fp16: fp32: Very weird, compared with the one in the table - much better prefill, half the decode performance. |
|
B580, AMD Ryzen 7 5700X3D, Ubuntu 25.10 built with fp16 in |
|
Intel Arc Pro B50, Intel i7-8700 32GB RAM build: c0c7e14 (9298)
build: 2f6c815 (9397)
Command line arguments: Build options: cmake .. -B build -DGGML_VULKAN=1 -DGGML_RPC=ON nothing else changed between these runs, I tested my old version, ran "git pull", built it and retested |
|
I hope it helps. 255H, ARC 140T, 32GB RAM
build: d4c8e2c (9442) |
|
~/llama.cpp$ cmake -B build/ReleaseOV -G Ninja -DCMAKE_BUILD_TYPE=Release -DGGML_OPENVINO=ON :~/llama.cpp$ GGML_OPENVINO_STATEFUL_EXECUTION=1
specs https://www.asrockind.com/en-gb/NUC%20BOX-358H |
|
📊 Intel Panther Lake Xe3 iGPU (12 EU) Benchmark Matrix: OpenVINO vs. Vulkan vs. SYCL Benchmarking sweep across all three major acceleration backends available in Environment
Models Tested
📈 Performance Summary Matrix
🛠️ Deep-Dive Analysis
📋 Raw Build & Execution Logs 1. Qwen3 80B MoE — OpenVINO Crash Log |
|
HW:ryzen5 5600X, DDR4-3600 128GB, ARC B570 FP32 FP16 |
|
HW:ryzen5 5700X, DDR4-3600 64GB, ARC B580 + ARC PRO B60 (24gb) llama build b60+b580
build: 65ef50a (9501) ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -fa 1
build: 65ef50a (9501) on arc b60 ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -fa 0 -dev sycl0
build: 65ef50a (9501) ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -dev sycl0 -fa 1
build: 65ef50a (9501) on arc b580 ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -dev sycl1 -fa 0
build: 65ef50a (9501) ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -dev sycl1 -fa 1
build: 65ef50a (9501) VULKAN After promt processing, the GPU frequency is reset to minimum and TG is low ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -fa 0
build: 65ef50a (9501) I set the minimum frequency on the GPU to b60 2300 and b580 2683 ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -fa 0
build: 65ef50a (9501) ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -fa 1
build: 65ef50a (9501) on B60 ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -dev vulkan1 -fa 0
build: 65ef50a (9501) ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -dev vulkan1 -fa 1
build: 65ef50a (9501) on b580 ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -dev vulkan0 -fa 0
build: 65ef50a (9501) ./llama-bench -m ~/llama-2-7b.Q4_0.gguf -dev vulkan0 -fa 1
build: 65ef50a (9501) |
Arc A380I know, I know... I got this it for its AV1 encoding/decoding, not LLMs, but here we are...
F16
F32
Got a couple of warnings during execution:
Other info: Build config (F16/F32 variations):
Found 1 SYCL devices:
SYCL Optimization Feature:
build: 7c158fb (b9518) |
|
Hi,
./llama-bench -fa 0,1 -m ../../models/llama-2-7b.Q4_0.gguf
build: 6471e3c (9607) sycl-ls Thanks for your great work! |
A380 - DockerApologies for the testing in docker, my local env is messed up in all sort of ways, im unable to test on bare metal however Ill share the docker compose and commands to reproduce if anyone is interested. Ill also attach other benchmarks to compare the current state as of this commit e95dae1 All results are the third results printed SYCL F16
SYCL F32
I ran a similar docker image a few days ago and I remember my results being far far better, not sure what has happened with the pp. Vulkanggml_vulkan: Found 1 Vulkan devices:
OpenvinoOpenVINO: using device GPU
Docker composeservices:
bench-openvino:
build:
context: .
dockerfile: .devops/openvino.Dockerfile
target: full
image: llama.cpp:full-openvino-local
devices:
- /dev/dri:/dev/dri
volumes:
- llama-cache:/models
environment:
- LD_LIBRARY_PATH=/app
- GGML_OPENVINO_DEVICE=${GGML_OPENVINO_DEVICE:-GPU}
- GGML_OPENVINO_STATEFUL_EXECUTION=1
- LLAMA_CACHE=/models
entrypoint: /app/llama-bench
command:
- -hf
- ${HF_REPO:-TheBloke/Llama-2-7B-GGUF:Q4_0}
- -fa
- "1"
- -ngl
- "99"
bench-sycl-f16:
build:
context: .
dockerfile: .devops/intel.Dockerfile
target: full
args:
GGML_SYCL_F16: "ON"
image: llama.cpp:full-sycl-f16-local
devices:
- /dev/dri:/dev/dri
volumes:
- llama-cache:/models
environment:
- LLAMA_CACHE=/models
- ONEAPI_DEVICE_SELECTOR=level_zero:0
- ZES_ENABLE_SYSMAN=1
entrypoint: /app/llama-bench
command:
- -hf
- ${HF_REPO:-TheBloke/Llama-2-7B-GGUF:Q4_0}
- -fa
- "1,0"
- -ngl
- "99"
bench-sycl-f32:
build:
context: .
dockerfile: .devops/intel.Dockerfile
target: full
args:
GGML_SYCL_F16: "OFF"
image: llama.cpp:full-sycl-f32-local
devices:
- /dev/dri:/dev/dri
volumes:
- llama-cache:/models
environment:
- LLAMA_CACHE=/models
- ONEAPI_DEVICE_SELECTOR=level_zero:0
- ZES_ENABLE_SYSMAN=1
entrypoint: /app/llama-bench
command:
- -hf
- ${HF_REPO:-TheBloke/Llama-2-7B-GGUF:Q4_0}
- -fa
- "1,0"
- -ngl
- "99"
bench-vulkan:
build:
context: .
dockerfile: .devops/vulkan.Dockerfile
target: full
image: llama.cpp:full-vulkan-local
devices:
- /dev/dri:/dev/dri
volumes:
- llama-cache:/models
environment:
- LLAMA_CACHE=/models
entrypoint: /app/llama-bench
command:
- -hf
- ${HF_REPO:-TheBloke/Llama-2-7B-GGUF:Q4_0}
- -fa
- "1,0"
- -ngl
- "99"
volumes:
llama-cache:
name: llama-cacheCommandsdocker compose run --build --rm bench-openvino # OpenVINO
docker compose run --build --rm bench-sycl-f16 # SYCL F16
docker compose run --build --rm bench-sycl-f32 # SYCL F32
docker compose run --build --rm bench-vulkan # VulkanFor repeated runs remove the |
|
@toomanybyt3s Could you check the driver by following cmds? |
|
Hardware: Intel Core Ultra 5 250K Plus, DDR5-6400 16GBx1, Intel Arc B580 LE with minimum core clock set to 2850 MHz since it seems to drop during inference despite having plenty thermal headroom
Gemma4 E4B has 4B parameters active, so I have calculated the effective memory bandwidth utilization as 45%. There seems to be some overhead with MoE models in general. |
|
Intel Arc Pro B70 32GB — Llama 3.1 8B & 70B Build: b9739 (8452824) | OS: Ubuntu 26.04 | oneAPI 2026.0.0 | fp32 | FA=1
* 70B Q4_K_M exceeds 32GB VRAM — run at ngl=60 (hybrid CPU+GPU). All other models fit fully on-GPU. Q8_0 tg128 unchanged across b9672 and b9739 — generation appears memory-bandwidth-limited on this SKU. PR #21527 did not affect this result. Full results + raw JSONL: https://github.com/Wesley-Jakob-Gilbert/Intel-Arc-GPU-Benchmarks/blob/main/results/b70-solo/llama-cpp-inference.md |
|
Intel Arc A770 16GB — Llama 2 7B Q4_0 build: 81ff7ab (9928) | OS: Ubuntu 26.04 | oneAPI 2026.1.0 | fp32 | FA=0,1 ZES_ENABLE_SYSMAN=1 ./build/bin/llama-bench -m /path/to/llama-2-7b.Q4_0.gguf -fa 0,1
| model | size | params | backend | ngl | fa | test | t/s |
| ------------------------------ | ---------: | ---------: | ---------- | --: | --: | --------------: | -------------------: |
get_memory_info: [warning] ext_intel_free_memory is not supported (export/set ZES_ENABLE_SYSMAN=1 to support), use total memory as free memory
get_memory_info: [warning] ext_intel_free_memory is not supported (export/set ZES_ENABLE_SYSMAN=1 to support), use total memory as free memory
get_memory_info: [warning] ext_intel_free_memory is not supported (export/set ZES_ENABLE_SYSMAN=1 to support), use total memory as free memory
get_memory_info: [warning] ext_intel_free_memory is not supported (export/set ZES_ENABLE_SYSMAN=1 to support), use total memory as free memory
| llama 7B Q4_0 | 3.56 GiB | 6.74 B | SYCL | -1 | 0 | pp512 | 1624.44 ± 10.67 |
| llama 7B Q4_0 | 3.56 GiB | 6.74 B | SYCL | -1 | 0 | tg128 | 47.63 ± 0.06 |
| llama 7B Q4_0 | 3.56 GiB | 6.74 B | SYCL | -1 | 1 | pp512 | 1079.70 ± 0.51 |
| llama 7B Q4_0 | 3.56 GiB | 6.74 B | SYCL | -1 | 1 | tg128 | 55.31 ± 0.63 |
build: 81ff7abe5 (9928)Have modify the system env and drivers, but still could not reach the best performance above. lspci -nnk | grep -i vga -A3
03:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Arc A770] [8086:56a0] (rev 08)
Subsystem: Acer Incorporated [ALI] Device [1025:3888]
Kernel driver in use: xe
Kernel modules: i915, xe
icpx --version
Intel(R) oneAPI DPC++/C++ Compiler 2026.1.0 (2026.1.0.20260617)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2026.1/bin/compiler
Configuration file: /opt/intel/oneapi/compiler/2026.1/bin/compiler/../icpx.cfg
dpkg -l | grep libze-intel-gpu1
ii libze-intel-gpu1 26.05.37020.3-1 amd64 Intel oneAPI L0 support implementation for Intel GPUs -- shared library
|
|
Hardware:
Software:
Model:
Command: Results:
Notes:
If useful, I can also share longer-context measurements for this same model (Qwen3.6-27B Q5_K_M), including FA on/off behavior at deeper KV/cache depths. |
|
Your benchmarks stand out, as well as your older commit reported. I just got my b70 and am struggling to hit 30t/s gen. I managed to go from <200t/s pp to 450-500 t/s pp by changing my batch and ubatch. But I am still only hitting about 20-25 t/s gen. I managed to get close to 40 with MTP. But still, your benchmarks seem a lot better overall. Do you have any insight to that? Is it the older commit ? the i9 ? the older models? (I'm compiling the old commit now for testing). |
|
Hi, there was a big difference between compiling with -DGGML_SYCL_F16=ON and without it. With F32, performance is much worse in PP—50% worse on average. Did you perhaps compile using F32? |
|
Oh, that's interesting; I'll give it a try. cmake --build build-sycl --config Release -j |
GGML_SYCL_ENABLE_MKL_FA=1It's opened as default. In code: commit 11924d4 (tag: b10223, origin/master, master) It will get performance increase in more LLMs event with fp32 building on B60: Test Script
Environment Configurations
Per Metric
|
GGML_SYCL_FA_ONEDNN=1 on PTL (Intel Arc B390)I was curious about the performance impact of the oneDNN SDPA path introduced by PR #25222, so I benchmarked three paths: oneDNN / MKL / FA-off. I know oneDNN is currently only enabled on BMG (Battlemage) hardware, but I had an LLM run a test against the reproduction scheme of uxlfoundation/oneDNN#5510, and at least on PTL + Level Zero 1.15.39122 there were no computation errors. In code: commit 0713275 (build: b10270) To enable the oneDNN path on PTL, the BMG-only hardware check in Test Script
Per Metricllama-2-7b.Q4_0.gguf (llama 7B Q4_0)
gemma-4-26B-A4B-it-qat-heretic-UD-Q4_K_XL.gguf (gemma4 26B.A4B Q4_0)
Hardware
Software
Notes
|
|
Wow, what a difference. I have a benchmark from a week ago to compare with. Spectacular: Qwen3.6-27B-Q5_K_M Performance ComparisonAll benchmarks were run with identical llama.cpp runtime parameters. The only compilation changes were: -DGGML_SYCL_DEVICE_ARCH=xe2 -DGGML_SYCL_DNN=ONThe second run also used a larger context size, but this does not affect these benchmark results. Runtime Parameters (identical in both runs)
Speculative Decoding--spec-type draft-mtp --spec-draft-n-max 3Baseline BuildBuild ConfigurationBackend: SYCL
Precision: FP16Optimized BuildBuild ConfigurationBackend: SYCL
Precision: FP16
-DGGML_SYCL_DEVICE_ARCH=xe2 -DGGML_SYCL_DNN=ONPrompt Processing Performance
|
|
In code: commit f8e3026 (tag: b10322, origin/master, master) Test Script
This is a community fine-tuned version of standard gemma4 12b model - yuxinlu1/gemma-4-12B-agentic-fable5-composer2.5-v2-3.5x-tau2-GGUF. Other models shared the same command options. Build Configurations
My setup
Metric
Interestingly, error "failed to create context" was raised when fa=0. Besides, I didn't see any notable speed differences between MKL_FA and DNN_FA, only on this gemma4 and granite and not on llama2 though... |
|
I have swept a few parameters trying to improve the decode speed of some modern useful models (Muse Glimmer and Qwen 3.8 27B) on my double-GPU setup:
I built llama.cpp from source, commit 4df29be using the following command: Over the sweep, F16 made the biggest impact on the performance, with AOT helping squeeze a few more percent. On Muse Glimmer (bartowski/Muse-Glimmer-30B-Q4_K_S.gguf), this translated into the following results on the i915 driver:
GGML_SYCL_DEV2DEV_MEMCPY had no impact. Xe DriverI wanted to improve FA performance further, as well as get better tensor split decode results. The first step was to move to the Xe driver, which yielded:
Note both PP and TG improvements, especially with Flash Attention. These figures are on par with Vulkan+i915 on decode (~17tps) while being much better on prefill. GGML_SYCL_DEV2DEV_MEMCPY still had no effect. IOMMU PTAs I wanted to improve the tensor split, I set IOMMU to the passthrough mode. The same benchmark command gave the following results:
Note that the layer split is not affected, while in the tensor split mode the prefill is 466->580 - 24% faster, outperforming the layer split mode! The model is coherent. No luck on decode yet :( Counterintuitively (?), GGML_SYCL_DEV2DEV_MEMCPY=1 actually decreases the performance:
Setting attention cache to q8_0 (GGML_SYCL_DEV2DEV_MEMCPY=0) makes both prefill and decode a bit slower:
Bonus: Qwen3.8-27BWith lmstudio-community/Qwen3.8-27B-Q4_K_M.gguf, the best result is:
Takeaways
Hope this is useful (and also hope decode can be made faster). |
Environment
Build optionscmake -B build/sycl -G Ninja \
-DGGML_SYCL=ON \
-DGGML_SYCL_TARGET=INTEL \
-DGGML_SYCL_DNN=ON \
-DGGML_SYCL_F16=ON \
-DGGML_SYCL_DEVICE_ARCH=bmg-g31 \
-DGGML_NATIVE=ON \
-DMKL_DIR=/opt/intel/oneapi/mkl/latest/lib/cmake/mkl \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_CXX_COMPILER=icpx \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib" \
-DCMAKE_CXX_FLAGS="-ffast-math -O3" \
-DCMAKE_C_FLAGS="-ffast-math -O3"Benchmark options./llama.cpp/sycl/bin/llama-bench \
-hf unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_XL \
-ctk q8_0 -ctv q8_0 -fa on -ngl 99 \
-p 512,1024 -n 512
./llama.cpp/sycl/bin/llama-bench \
-hf unsloth/Qwen3.8-27B-GGUF:UD-Q5_K_XL \
-ctk q8_0 -ctv q8_0 -fa on -ngl 99 \
-p 512,1024 -n 512
./llama.cpp/sycl/bin/llama-bench \
-hf unsloth/Qwen3.8-27B-GGUF:UD-Q6_K_M \
-ctk q8_0 -ctv q8_0 -fa on -ngl 99 \
-p 512,1024 -n 512Qwen 3.8 27B (Q4, Q5, Q6) - Q5 has the best performance.
build: cd26896 (10553)
build: cd26896 (10553)
build: cd26896 (10553) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Purpose
It's used to share the performance data on Intel GPU with SYCL backend.
The performance data is only used as reference, since we don't double check the data.
It can not be used as any commercial purpose.
Rule
Encourage to test with default setting (environment variables).
If you want to update the data with special building or running setting, please create a new table.
Create/update the tables directly following the format.
Insert new record, instead of update it for same keys; Sort the records by col1, col2, col3.
Add your comments in the latest for more discussion.
Don't add table to compare with other hardware, framework or backend.
Please run 1+ times and update with the stable data.
Tips and tricks
Xe driver gives a huge boost over i915.
Combined with IOMMU and Xe,
--split-mode tensorgives decent number on prefill2 x Arc A770 can give usable speeds, at least with benchmark 512+128 regimes.
Refer to: Performance of llama.cpp on Intel GPU with SYCL backend #23313 (comment)
User can choose them according to the test result.
Quick build scripts:
Performance data on Intel GPU
Default setting
Build:
Run:
Data:
FP16
t/s
t/s
DDR5-6400 16GB
DDR5-6400 16GB
- Medium
32GB
- Medium
32GB
DDR5-6400 16GB
DDR5-6400 16GB
64GB
24.04.4
64GB
24.04.4
5600X
DDR4-3600
128GB
24.04.4
6.17.0-29-generic
5600X
DDR4-3600
128GB
24.04.4
6.17.0-29-generic
5600X
DDR4-3600
128GB
24.04.4
6.17.0-29-generic
5600X
DDR4-3600
128GB
24.04.4
6.17.0-29-generic
DDR5-6400 16GB
DDR5-6400 16GB
5700X3D
25.10
5700X3D
25.10
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
64GB DDR5
26.04
64GB DDR5
26.04
More PP/TG Types:
FP16
t/s
t/s
t/s
t/s
(12 EUs)
Panther Lake
26.04
(12 EUs)
Panther Lake
26.04
All reactions