Commit Graph

14 Commits

Author SHA1 Message Date
Markus Fritsche 107ccddbb1 Clean up for public release: README rewrite, LICENSE (MIT), patches reorganized
Final deliverables (mesa-panvk-shared-tls-wls + llama.cpp-mali-mmq-warptile) at top of patches/;
iteration trail moved to patches/iterations/. Public-facing README with the 4.8x result and the
two-fix summary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 20:35:44 +02:00
Claude (noether) 5b541d596e Shader CHAMPION converged: 28 t/s (4.8x), correctness-gated; f16acc refused; ~15% left is quantize-dispatch (profile, not tile)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:11:46 +02:00
Claude (noether) 6ee32814b2 Shader iter6: BK_STEP=1 regressed (barrier crossover); BK_STEP=2 is sweet spot, reverted to iter5 champion 2026-07-11 18:36:21 +02:00
Claude (noether) 220a3b1667 Shader iter5 CHAMPION: scoped BK_STEP (spec const 11) -> L=28 t/s, M restored to 20.6 (clean) 2026-07-11 18:27:38 +02:00
Claude (noether) 1e23ce0cd2 Shader iter4: BK_STEP=2 -> L path 28 t/s (+9%), but M regressed (global #define); needs L-scoping 2026-07-11 18:15:53 +02:00
Claude (noether) 05f240ef6c Shader iter3 CHAMPION: BLOCK 256 same-registers -> ub128 25.8 t/s (+10%), spill-free
Shared-occupancy is the lever. Progression 5.8->23.4->26.2 t/s (~30% roofline). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 17:58:10 +02:00
Claude (noether) 2600465c3c Shader iter2: 32-acc tile REGRESSED 2.4x -> occupancy-bound, not AI-bound; iter1 champion 2026-07-11 17:44:52 +02:00
Claude (noether) 272604b10d Shader iter1: Mali L-warptile (WM=WN=16) -> ub128 4x (5.8->23.4 t/s), spill 5328->96
Confirms the ceiling was the desktop-tuned shader, not the hardware. Per-thread acc = WM*WN/WARP
(matches our tls_size instrument to the byte). Large ubatch now beats the ub64 ceiling + CPU.
~25-30% of roofline; iter2 grows the tile. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 17:29:55 +02:00
Claude (noether) dbf97a0fc1 FIX: panvk priv-heap exhaustion solved (shared TLS + WLS reuse); crash gone ub64->1024
Device-shared TLS scratch + grid-independent WLS reuse collapse per-cmdbuf 304MB TLS and
per-dispatch WLS into ~1 BO each. Peak priv-VA 3985MB->908MB, no OOM at any ubatch (was crash
at >=72). Verified on panthor. Real upstreamable Mesa panvk bug fix (mesa-panvk-0010).

BUT prefill speedup NOT achieved: larger ubatch is 3x SLOWER (ub64=21, ub128=5.8, ub256=7.4 t/s)
because llama.cpp's L-variant matmul shader spills ~10x more registers (the 304MB stack) -> poor
Mali occupancy. ub64 @ 21 t/s stays the ceiling, ties CPU. Remaining lever = ggml-vulkan L-shader
Mali tuning (separate effort). See docs/RESULTS.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 16:30:55 +02:00
Claude (noether) bec204e375 Phase 1: consumer-side levers falsified; accumulation is in-flight cmdbufs x 304MB TLS
cleanup_frequency (10->2) and free-on-reset both no-effect: cmdbufs are in-flight so can't be
reset. ~12 live 304MB TLS-stack BOs = 3.65GB. Real levers: cut x19 core overalloc, or reduce
in-flight depth. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 16:00:09 +02:00
Claude (noether) 881b118158 Add fix plan: cleanup_frequency=10 is the accumulation trigger; consumer-side bounding is the primary lever
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 14:58:50 +02:00
Claude (noether) 97629e935c Fully characterize the ub64 cliff: TLS-stack register spill is the dominant term
Live instrumentation on panthor: WLS reuse verified working (644 REUSE/46 ALLOC) but the
crash is dominated by the TLS *stack* alloc in emit_tls() at EndCommandBuffer — L-variant
matmul shader spills 10x more registers (tls_size 544->5328 B/thread => 38MB->304MB stack),
x~12 cmdbufs retained in the tls pool => ~3GB, over the 4GB priv heap. Remaining fix is
structural (free tls-pool BOs post-submit and/or fix the x19 sparse-core overallocation).
See docs/root-cause-final.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 14:35:03 +02:00
Claude (noether) e74bae69fe panvk WLS fix v1 + confirmed mechanism (partial: reuse halves but doesn't eliminate)
Instrument-first panthor boot confirms Fable's diagnosis: ~326 per-dispatch WLS allocs
exhaust the sub-4GB priv VA heap at ub>=128. Grow-only single-max reuse (fix v1) halves the
pressure (326->715 dispatches) but WLS sizes vary 128x (155KB-19MB) so a single buffer is
insufficient. Refined fix pending 2nd review.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 14:06:47 +02:00
Claude (noether) 16b96537fd rocky-vulkan-llama: skeleton — deps, root-cause diagnosis, llama.cpp submit patch
Documents the RK3588 Mali-G610 GPU-prefill stack (panthor + panvk + llama.cpp Vulkan),
the panvk ub64 OOM blocker, and collects the ggml-vulkan tunable-submit patch. Mesa panvk
fix pending root-cause confirmation (see docs/root-cause.md).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 13:33:00 +02:00