Repository navigation
Commit 3115269
committed
Isolate upstream #30270: correct fix, no measurable effect here, and a guard proven red
A clean isolation of llama.cpp PR #30270 (commit c28e174141dd, merged 2026-10-11), which was merged with, in the author's own words, a better by-eyeball measurement on a FreeBSD box with mismatched RAM clocks, no numbers and no review comments. One machine, one source tree copied twice, one variable: the seven lines present or removed, with the removal printed into the run log. Numbers from upstream's own llama-bench with 5 repetitions, so each carries a spread, and our JNI layer is not in the picture.
The result is negative and that is the point: every difference is inside plus or minus 2 percent with random signs, across four F16C tiers, and the two non-F16C control modules move just as much as the test cases. haswell is plus 1.8 percent at 16 threads and minus 0.8 at 8. The fix is still right -- the F16C branch defined only the COMPUTE macro, so the selected one fell through to a 64K lookup table and the hardware instruction was never used -- but its gain is machine and workload dependent, and on a bandwidth-rich server CPU with a 4-bit quant it is zero. The author's own caveat fits that.
It also refutes something this repository wrote an hour earlier. A haswell jump from 221.8 to 422.7 between a b11538 4-vCPU run and a b11558 64-vCPU one had been read as consistent with #30270, because haswell gained far more than the AMX module. The isolation says #30270 contributes nothing, so that jump was the instance size: 4 threads on a 64-vCPU machine have far more memory bandwidth to themselves. The correction is kept in cpu-backend-modules.md rather than quietly removed, because the next person comparing two tables across a pin and a machine size will be tempted the same way.
And a guard that makes the omission impossible, proven both ways with clang -fsyntax-only against the real b11574 header: it passes on the fixed tree, fails with the #error on the reverted one, does not fire without __F16C__, and both trees compile when it is absent -- so the guard is the only thing that changes the outcome. The first attempt at that test proved nothing, because it appended the guard after the include and the header's own fallback always defines the macro; a guard that passes in the broken case has to be suspected of being in the wrong place. Both the mistake and the fix are recorded.
cpu-backend-modules.md also gains the b11558 tables from a 64-core Granite Rapids as an additional section, never editing the b11538 ones, as that file's house rules require. They answer the open question about high core counts: at 64 threads haswell leads token generation at 192.6 while sapphirerapids is last at 181.8 -- and ggml picks the latter, which sharpens the upstream module-scoring finding rather than adding a new one.
TODO.md: five rows of the measurement table are struck through, leaving only the two that need hardware nobody rents, and the upstream section gains a fifth item that is a small PR rather than an issue -- move the two defines into the branch they complete, add the guard, and offer the measurement with it rather than disputing the change.
check-natives.py 0 disagreements, 122 buildcheck tests green, and a search over TODO.md and docs/benchmarks for bucket names, account ids, instance ids and presigned URLs finds nothing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G1 parent ee7dcc1 commit 3115269
4 files changed
Lines changed: 274 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
863 | 902 | | |
864 | 903 | | |
865 | 904 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
156 | 238 | | |
157 | 239 | | |
158 | 240 | | |
| |||
0 commit comments