Repository navigation
Conversation
|
Checked on my side, on the machine from #2081: Core Ultra 7 155H, one thread pinned to a P-core, clang 23.1.3 with
The instructions repeat to within about a thousand between rounds. The machine wasn't idle, so the cycles only show the direction. The PR inlines all of |
|
Thanks — I’ve linked your original-machine run and the binary-size tradeoff in the description, with cycles marked directional. Keeping this draft until the required mini qualification; no CUDA or Metal result claimed. |
span_fade and rfc_wrap are inline on the host (the take is bendlang#2114's change, by Lorenzobattistela) and unchanged on the devices. A constructor with static nodes that is not hot is read in place, like any uncounted node: the inlined counted path made each of lexer's takes longer. Co-Authored-By: Claude Fable 5.2 <[email protected]> (cherry picked from commit a41ad59)
Closes #2081.
CPU takes were paying a
FARcall even for a last-held shared node. Use the existingDEVICEswitch: keep that helper out of line on Metal/CUDA devices, but let the host inline it. No helper body, memory ordering or cap changes.Using nuxyel’s BPE repro, three alternating before/after runs pinned to CPU0:
perf statmedian335f239aAll six runs print
256,31633,2633430213. Linux x86_64, i7-11700, clang22.1.8,-std=c11 -O3; PMU counters ran over99% of the interval. Cycles were noisy, so this only claims the instruction reduction.Build the linked repro with each checkout’s
bun bend2/main.ts bpe_encode.bend -o bpe, then runtaskset -c 0 perf stat -e instructions:u,cycles:u ./bpe.Repo gate passes56/56;
comp.tsis65987/66000 tokens. Full unchanged gate bundle was also run:test/perffail because this machine cannot resolve theclusterbastion;pingskips because the site checkout is unavailable. Keeping this draft for mini/platform qualification. No GPU, macOS or Windows execution claim.@nuxyel also checked this head on the original Core Ultra 7 machine. The three output lines and instruction reduction held; full host inlining beat the proposed split. Their cycles are directional because the machine was busy, and they measured a larger binary. This is their independent CPU check, not locally rerun mini or GPU qualification.
Thanks @nuxyel for the repro and measurements. AI-assisted with omp / GPT-6.1 Sol; no subagents.