prefill: ~7% pp512 regression on Arc B580 since #30160 (embeddings get_rows reorder), constant per-invocation cost
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp
- Domain
- performance
Research direction
Read commit #30160 and inspect the graph construction path that reorders get_rows for embeddings, focusing on the plain token-only path described in the report. Reproduce the pp512 benchmark on an Arc B580 with the stated llama-bench settings, comparing builds before and after #30160. Done means identifying whether the added per-invocation host-side cost is expected and whether the ordering can be limited to graphs that need it.
Written by the indexing model from the issue text.
Description
Setup: Intel Arc B580 (Xe2), driver 32.0.101.9150, Windows 11, MinGW Release build (static, Vulkan backend), llama-bench -t 14 -ub 512 -p {512,4096,16384} -n 128 -fa auto, gemma-4-E4B Q4_0 (dense, standard token path, no raw embeddings, no multimodal inputs), warm card.
Bisecting the prefill regression over 448147d42..b11756 (279 commits, stock builds, no local patches) isolates two independent commits: first bad is 5e4878e97 (#30145, tracked separately in #30381), second bad is 8e2d31e0e (#30160, "graph : reorder get_rows for embeddings").
pp512, stock builds:
| build | pp512 |
|---|---|
448147d42 (07.10) |
3356 t/s |
b11756 |
3102 t/s (-7.6%) |
Bisect details:
- phase 1 (trees as-is): first bad =
5e4878e97(#30145) -> #30381 - phase 2 (with
5e4878e97locally reverted at every step, 230 commits): first bad =8e2d31e0e(#30160). A plaingit revertof it no longer applies on master (later commits build on top of it), so each bisect step was revert -> build -> bench -> reset.
Second confirmation on a local integration branch, interleaved A/B (4 pairs, binaries alternated within a single session; identical-binary control: mean -0.4%, single run +/- 2%; my branch carries a local FA capability-gate relaxation for B580, see the provenance note in #30018 - deltas are internally consistent, absolute values on stock builds differ):
| tree | pp512 |
|---|---|
| pre-rebase (predates #30160) | 4294 t/s |
| b11756 + local fixes + local revert of #30145 | 4019 t/s (-6.9%, 4/4 pairs) |
Re-enabling #30145 on top of the same tree costs another -3.9% (3995 -> 3838 t/s), consistent with #30381.
Characteristics of the #30160 cost:
- Prefill-only and confined to short prompts: pp512 -6.9% (the only statistically solid point: interleaved, +8.17 ms per invocation); pp4096 -1.2% and pp16384 ~0% are within single-shot noise (+/- 2%). Profile is consistent with a one-time per-invocation overhead (~8 ms), not a per-token slowdown.
- Same delta with
-fa offand-fa auto; per-op GPU time sums are unchanged across the boundary, so the cost is host-side (graph build / first-batch sync), not shader time. - decode (tg128) is not affected by this cost; across the whole commit range decode actually improved +5.7%, not attributable to this commit.
#30160 is a correctness fix (mixed/raw-embedding branches, gemma4 PLE, etc.), so I am not proposing a revert. Question: is the extra one-time cost on the plain token-only path expected? For a dense model with only token embeddings the reordered split-0 construction appears to add a host-side sync that did not exist before; if the new ordering could be limited to graphs that actually need it (mixed batch / raw embeddings), the standard path would keep the old timing.
- Dominant language
- C++
- Stars
- 133k
- Forks
- 25.1k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 505
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ggml-org/llama.cpp
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
ggml-org/llama.cpp#31601 · 2 comments ·
Maintainers usually reply within 1 day
-
Compile bug: FreeBSD ggml vulkan compilation issuePossibly taken @angt claimed this 1 day ago. Openbug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ggml-org/llama.cpp#31541 · 2 comments ·
Maintainers usually reply within 1 day
-
Compile bug: tools/server/server-context.cpp fails to compile with Intel icx/icpx: std::setw missing <iomanip> includePossibly taken @afnan-mojumder claimed this 4 days ago. Openbug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ggml-org/llama.cpp#31458 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
ggml-org/llama.cpp#31456 · 2 comments ·
Maintainers usually reply within 1 day
-
Misc. bug: Sub-heading levels are incorrect for the CUDA, MUSA, and SYCL sections in the Docker documentationPossibly taken A pull request linked to this issue is open or already merged. Openbug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 85/100
ggml-org/llama.cpp#31404 · 1 comment ·
Maintainers usually reply within 1 day
All issues in ggml-org/llama.cpp
Similar issues
-
documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
QuantStack/git2cpp#203 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
BaptisteHudyma/Lamp-Da#588 ·
Maintainers usually reply within 1 day
-
bug macOS networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
docling-project/docling-parse#448 ·
Maintainers usually reply within 5 days