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
I ran a set of llama-bench experiments on Ubuntu 24.04.04 with Intel Arc A770 GPUs using the Vulkan backend in llama.cpp build 8502. The main conclusion is simple:
-ub and -b should not be treated as fixed values when changing the number of GPUs.
They are part of the MGPU tuning strategy, especially for prompt processing (PP).
These tests suggest three practical rules for llama.cpp Vulkan MGPU on Arc A770:
Do not reuse -ub and -b blindly when changing the GPU count.
For PP, retune -ub first, then refine -b.
Evaluate PP and TG separately, because the best PP settings may not help TG at all.
On this setup, the best 2-GPU PP result in the tested range was approximately:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I ran a set of llama-bench experiments on Ubuntu 24.04.04 with Intel Arc A770 GPUs using the Vulkan backend in llama.cpp build 8502. The main conclusion is simple:
-ub and -b should not be treated as fixed values when changing the number of GPUs.
They are part of the MGPU tuning strategy, especially for prompt processing (PP).
Baseline:
GGML_VK_VISIBLE_DEVICES=0,1 ./llama-bench -m '/Works/llama-2-7b.Q4_0.gguf'-mg 0 -sm none,layer -fa 0 -n 64 -p 1024
load_backend: loaded RPC backend from /home/tto/Works/llama-b8502/libggml-rpc.so
ggml_vulkan: Found 2 Vulkan devices:
ggml_vulkan: 0 = Intel(R) Arc(tm) A770 Graphics (DG2) (Intel open-source Mesa driver) | uma: 0 | fp16: 1 | bf16: 1 | warp size: 32 | shared memory: 65536 | int dot: 1 | matrix cores: none
ggml_vulkan: 1 = Intel(R) Arc(tm) A770 Graphics (DG2) (Intel open-source Mesa driver) | uma: 0 | fp16: 1 | bf16: 1 | warp size: 32 | shared memory: 65536 | int dot: 1 | matrix cores: none
load_backend: loaded Vulkan backend from /home/tto/Works/llama-b8502/libggml-vulkan.so
load_backend: loaded CPU backend from /home/tto/Works/llama-b8502/libggml-cpu-sapphirerapids.so
-ub and -b Tunning
GGML_VK_VISIBLE_DEVICES=0,1 ./llama-bench -m '/Works/llama-2-7b.Q4_0.gguf' -mg 0 -sm none,layer -fa 0,1 -p 1024 -n 0 -ub 128 -b 256,512,1024,2048,4096
ggml_vulkan: Found 2 Vulkan devices:
ggml_vulkan: 0 = Intel(R) Arc(tm) A770 Graphics (DG2) (Intel open-source Mesa driver) | uma: 0 | fp16: 1 | bf16: 1 | warp size: 32 | shared memory: 65536 | int dot: 1 | matrix cores: none
ggml_vulkan: 1 = Intel(R) Arc(tm) A770 Graphics (DG2) (Intel open-source Mesa driver) | uma: 0 | fp16: 1 | bf16: 1 | warp size: 32 | shared memory: 65536 | int dot: 1 | matrix cores: none
load_backend: loaded Vulkan backend from /home/tto/Works/llama-b8502/libggml-vulkan.so
load_backend: loaded CPU backend from /home/tto/Works/llama-b8502/libggml-cpu-sapphirerapids.so
Final conclusion
These tests suggest three practical rules for llama.cpp Vulkan MGPU on Arc A770:
Do not reuse -ub and -b blindly when changing the GPU count.
For PP, retune -ub first, then refine -b.
Evaluate PP and TG separately, because the best PP settings may not help TG at all.
On this setup, the best 2-GPU PP result in the tested range was approximately:
GGML_VK_VISIBLE_DEVICES=0,1
./llama-bench
-m /home/tto/Works/llama-2-7b.Q4_0.gguf
-mg 0 -sm layer -fa 0 -p 1024 -n 64
-ub 256 -b 2048
with:
pp1024 = 1739.12 t/s
tg64 = 31.29 t/s
In MGPU mode, -ub and -b are not secondary knobs — they are part of the scaling strategy.
Beta Was this translation helpful? Give feedback.
All reactions