Repository navigation
Conversation
Contributor
|
What is the reason this is gated on __ARM_FEATURE_QRDMX? https://developer.arm.com/documentation/101028/0012/13--Advanced-SIMD--Neon--intrinsics says this define indicates the availability of SQRDMLAH and SQRDMLSH. https://arm-software.github.io/acle/neon_intrinsics/advsimd.html doesn't list any requirements for the vaddv instructions other than A64, my impression is that they should be available if |
Member
Author
|
@unbounded |
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
…ml-org#900) * ggml : speed-up q4_1 ARM_NEON by ~5% * ggml : implement vaddvq when missing * ggml : implement vminvq and vmaxvq when missing * ggml : implement vzip when missing * ggml : fix comment * ggml : try to use correct ifdef
phuongncn
pushed a commit
to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4
that referenced
this pull request
Apr 28, 2026
…ml-org#900) * ggml : speed-up q4_1 ARM_NEON by ~5% * ggml : implement vaddvq when missing * ggml : implement vminvq and vmaxvq when missing * ggml : implement vzip when missing * ggml : fix comment * ggml : try to use correct ifdef
phuongncn
pushed a commit
to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4
that referenced
this pull request
Apr 28, 2026
Co-authored-by: Iwan Kawrakow <[email protected]>
ljubomirj
pushed a commit
to ljubomirj/llama.cpp
that referenced
this pull request
May 6, 2026
…ml-org#900) * ggml : speed-up q4_1 ARM_NEON by ~5% * ggml : implement vaddvq when missing * ggml : implement vminvq and vmaxvq when missing * ggml : implement vzip when missing * ggml : fix comment * ggml : try to use correct ifdef
AlexiAlp
pushed a commit
to minghaop/llama.cpp
that referenced
this pull request
Jun 2, 2026
…ml-org#900) * ggml : speed-up q4_1 ARM_NEON by ~5% * ggml : implement vaddvq when missing * ggml : implement vminvq and vmaxvq when missing * ggml : implement vzip when missing * ggml : fix comment * ggml : try to use correct ifdef
bong-water-water-bong
pushed a commit
to 1bit-MONSTER/llama.cpp
that referenced
this pull request
Nov 4, 2026
…ort (engine ggml-org#900) arena_reserve() fails on the free list, not on the size: the issue measured 193.2 MiB free in 5 blocks against a 121.7 MiB slot, and the refusal told the operator the model's working set does not fit - then advised "Raise it to at least 4030 MiB" while the budget in force was 4096 MiB. The free list can tell the two cases apart (free >= need with no block that large means fragmented), so the refusal now reports which one happened, with the largest block, and drops the size advice in the fragmented case - where the number it printed was not a fixed point, because resident tracks the budget. The genuine capacity case keeps the engine ggml-org#788 wording and its raise-to number. The miss is recorded whole in the latch, so a later acquire in the same run repeats the first refusal's reason instead of re-deriving the wrong one. Diagnostic only: no allocation, eviction or placement behaviour changes. tests/test-hrx-arena-refusal.cpp: 5 arms - both of the issue's measured states, a genuine capacity miss, the unbounded default, and the corner where a large enough free block exists (not called fragmentation).
bong-water-water-bong
added a commit
to 1bit-MONSTER/llama.cpp
that referenced
this pull request
Nov 4, 2026
…ort (engine ggml-org#900) (#180) arena_reserve() fails on the free list, not on the size: the issue measured 193.2 MiB free in 5 blocks against a 121.7 MiB slot, and the refusal told the operator the model's working set does not fit - then advised "Raise it to at least 4030 MiB" while the budget in force was 4096 MiB. The free list can tell the two cases apart (free >= need with no block that large means fragmented), so the refusal now reports which one happened, with the largest block, and drops the size advice in the fragmented case - where the number it printed was not a fixed point, because resident tracks the budget. The genuine capacity case keeps the engine ggml-org#788 wording and its raise-to number. The miss is recorded whole in the latch, so a later acquire in the same run repeats the first refusal's reason instead of re-deriving the wrong one. Diagnostic only: no allocation, eviction or placement behaviour changes. tests/test-hrx-arena-refusal.cpp: 5 arms - both of the issue's measured states, a genuine capacity miss, the unbounded default, and the corner where a large enough free block exists (not called fragmentation). Co-authored-by: bong-water-water-bong <[email protected]>
bong-water-water-bong
added a commit
to 1bit-MONSTER/llama.cpp
that referenced
this pull request
Nov 4, 2026
…m (engine ggml-org#900) (#182) A slot parked while an execution is in flight (arena_deferred_) survives the arena being re-created, so end_execution() reclaims it into the NEW free list at its OLD offset. Those offsets interleave with live allocations: the free list then claims 193.2 MiB in 5 blocks in a 200 MiB arena whose only weight is 121.7 MiB, the next weight of that size is refused, and the refusal reports 205 MiB parked against a 200 MiB limit - both numbers the issue quotes. It is not only a wrong count. arena_take_locked() hands out whatever block fits, so a stale extent that is large enough would be given to a second weight while the first still holds it: one extent, two weights, silent corruption. The grow path already drops everything else that pointed into the released arena (entries_, last_use_, resident_bytes_, the free list); the parked list belongs with them, and no lease can reference a parked extent because eviction only takes entries the cache solely owns (use_count() == 1). Measured on Qwen3-0.6B-Q4_K_M, -ngl 0, one gpu-hold ticket, base = the pin's staged binary vs this build, budgets 200/210/220/230/240. Base: parked exceeds the limit at every budget (205/200 ... 245/240) and a 121.7 MiB weight is refused at every budget. Fix: resident + parked + free sums to the limit (199.3 of 200 ... 239.9 of 240), the free list is one block instead of 4-5, and the 121.7 MiB weight is admitted every time. Co-authored-by: bong-water-water-bong <[email protected]>
bong-water-water-bong
pushed a commit
to 1bit-MONSTER/llama.cpp
that referenced
this pull request
Nov 4, 2026
…t use it where it can (engine ggml-org#900) The residency budget was never compared with the set of host weights a run needs: placement tested each weight against its file size, acquire() charges the materialized length (a carrier the dispatch builder picks after placement: 132 B per row-block for the shared4 layout against 136 B in the file for IQ4_XS, 144 B for the row64 ones), and the arena's advice is a need+resident+parked snapshot that moves with the budget - following it cycles 38 <-> 44 MiB on a 4B. Now the sum is taken before the first request: one entry per distinct (identity, generation), keeping the largest materialized length seen for each, so the total is the model's set and not one program's slice of it. When it exceeds the budget, one line says so; placement declines host-weight ops when the set alone cannot fit. The other direction is deliberately not inferred: a set that fits does not mean a run that fits, because the arena also holds the slots parked while programs are in flight. Measured on Qwen3-4B-IQ4_XS at -dev HRX0 -ngl 0 -fit off: the set is 304.3 MiB (579 program observations, GGML_HRX_HOST_WEIGHT_TRACE=1), while the host-weight path only runs at a budget of 3072 MiB or more - 2048 MiB fails with 505.1 MiB resident and 1448.6 MiB parked. The number is a lower bound, and the message says so; the parked-slot accounting is engine ggml-org#900's remaining subject.
bong-water-water-bong
added a commit
to 1bit-MONSTER/llama.cpp
that referenced
this pull request
Nov 4, 2026
…t use it where it can (engine ggml-org#900) (#200) The residency budget was never compared with the set of host weights a run needs: placement tested each weight against its file size, acquire() charges the materialized length (a carrier the dispatch builder picks after placement: 132 B per row-block for the shared4 layout against 136 B in the file for IQ4_XS, 144 B for the row64 ones), and the arena's advice is a need+resident+parked snapshot that moves with the budget - following it cycles 38 <-> 44 MiB on a 4B. Now the sum is taken before the first request: one entry per distinct (identity, generation), keeping the largest materialized length seen for each, so the total is the model's set and not one program's slice of it. When it exceeds the budget, one line says so; placement declines host-weight ops when the set alone cannot fit. The other direction is deliberately not inferred: a set that fits does not mean a run that fits, because the arena also holds the slots parked while programs are in flight. Measured on Qwen3-4B-IQ4_XS at -dev HRX0 -ngl 0 -fit off: the set is 304.3 MiB (579 program observations, GGML_HRX_HOST_WEIGHT_TRACE=1), while the host-weight path only runs at a budget of 3072 MiB or more - 2048 MiB fails with 505.1 MiB resident and 1448.6 MiB parked. The number is a lower bound, and the message says so; the parked-slot accounting is engine ggml-org#900's remaining subject. Co-authored-by: bong-water-water-bong <[email protected]>
bong-water-water-bong
added a commit
to 1bit-MONSTER/llama.cpp
that referenced
this pull request
Nov 4, 2026
ggml-org#900) (#202) resident + parked is bounded by the arena and the arena by the limit, so the snapshot of a capacity miss is always limit + one weight. Printed as advice that is the measured 6 MiB-at-a-time climb (2304 -> 2310 on a run whose floor is 2560) and, below the budget in force, the measured 38 <-> 44 MiB cycle. The capacity branch now names the numbers and says the snapshot cannot size the run; the fragmented wording (#180) is untouched and the unbounded arm no longer prints limit 0.0 MiB. Co-authored-by: bong-water-water-bong <[email protected]>
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Time per token for
Q4_1drops by ~5%Also, make it build on ARMv7 Raspberry Pi 4
🤖 Generated by Copilot at 63f7ecf
Summary
🚀🔧🔄
This pull request enhances the
ggml.cfile to run faster and more reliably on ARM devices by using inline functions, simpler macros, and NEON optimizations.Walkthrough
ggml.cto process two blocks of x and y at a time using more NEON registers and operations (link, link)