Cycle-level stall profile of any gfx1100 kernel (hipcc, Mojo, hand asm) from a real SQTT thread trace on the 7900 XTX, captured through rocprofv3 ATT (any HIP program or code object). Shows, per instruction, how many cycles each wave waited before it issued.
tools/doctor.sh says what this machine still needs to capture, with the fix.
Docs: docs/api.md (every subcommand, flag and exit code), docs/design.md (layout, data flow, memory, what was rejected), docs/pytorch.md (whole PyTorch process). build/wavewait --help lists every subcommand and flag; Adreno and Mali phones: docs/DEVICES.md.
| Capability | Command | Platform |
|---|---|---|
| Capture a kernel trace | tools/att-capture.sh RUNDIR -- CMD... |
gfx1100 (RDNA3), Linux, ROCm rocprofv3 ATT |
| Per-instruction stall table and causes | build/wavewait DIR --causes |
gfx1100, x86-64 Linux |
| Every dispatch of a run, or one in full | build/wavewait app RUNDIR [--json] |
gfx1100, x86-64 Linux |
| Stalls by instruction class and source line | build/wavewait DIR --by-class or --by-line [--json] |
gfx1100, x86-64 Linux |
| Fix hints and exposed (unhidden) cycles | build/wavewait DIR --hints |
gfx1100, x86-64 Linux |
| Energy view (J/MH, mJ per token) | build/wavewait DIR --exposed --watts W |
gfx1100, x86-64 Linux |
| Whole-process kernel ranking | build/wavewait rank RUNDIR [--wide] [--json] |
gfx1100 rocprofv3 kernel trace, Linux |
| Occupancy of a code object | build/wavewait occ CODEOBJ [--json] |
gfx1100 code objects |
| Diff two captures | build/wavewait diff A B [--json] |
gfx1100, x86-64 Linux |
| Budget gate for CI | build/wavewait budget FILE DIR [--json] |
gfx1100, x86-64 Linux |
| JSON output for scripts and agents | build/wavewait DIR --json (also --hints, --loops, --exposed, --by-line, and app, rank, occ, budget) |
gfx1100, x86-64 Linux |
| Phone result as JSON | build/wavewait phone OUT --json |
any phone capture |
| HTML timeline and GUI window | build/wavewait DIR --html OUT |
gfx1100, x86-64 Linux; --gui needs mojo-imkit |
| Phone GPU causes, diff and budget | scripts/ww-phone DEV OUT K.cl |
Android arm64 over adb, no root; DEV = nickname or adb serial; Adreno 6xx (oneplus), Mali (samsung, not re-checked: not attached 2026-11-29) |
| Warm capture of the hottest kernel | tools/att-warm.sh RUNDIR -- CMD... |
gfx1100 (RDNA3), Linux, ROCm rocprofv3 ATT |
| Live GPU self-check | tools/check-live-gpu.sh |
gfx1100 with ROCm; PENDING (exit 0) without a GPU |
Detail: Subcommands and outputs, Phone GPUs, docs/api.md.
ROCm's thread trace writes raw RDNA3 SQTT for any HIP program as it is (no ELF swap, any grid,
WGP mode). Point it at WGP 3 (the only one that emits instruction tokens here) and launch enough workgroups
that CU 3 gets some (examples/saxpy.hip launches 192):
hipcc --offload-arch=gfx1100 -O3 examples/saxpy.hip -o .work/att/saxpy
rocprofv3 --att --att-target-cu 3 --att-shader-engine-mask 0x1 \
--att-library-path <dir of AMD's rocprof-trace-decoder library> -d .work/att/run -- .work/att/saxpy
tools/from-att.sh .work/att/run .work/att/saxpy_att # .att files unchanged + pcmap of code object 2
build/wavewait .work/att/saxpy_att --causes --top 10tools/att-capture.sh RUNDIR -- CMD... is that capture without the traps: CU 3 / SE mask 0x1 / the decoder path as defaults
(ATT_CU, ATT_SE_MASK, ATT_DECODER_DIR, ATT_KERNEL regex), a 256 MB buffer (ATT_BUFFER; more needs ATT_BUFFER_OK=1:
at 1 GB rocprofv3 fails to create the ATT packet and then deadlocks in its signal handler, holding the GPU for minutes), timeout -s KILL
(ATT_TIMEOUT, 300 s) and a watcher that kills the whole process group within about a second of failed to create ATT packet or
Resource deadlock in the log and exits FAIL att: .... Afterwards it prints the biggest trace against the buffer and warns
(WARN) from 90 %: probably cut. It runs itself under gpu-wait run when that is installed. Then build/wavewait app RUNDIR.
Checked: the saxpy table has the same 28 instructions in the same order as the reference capture
(fixtures/saxpy_cu, a one-workgroup launch), 8 waves per instruction instead of 4 (two workgroups on CU 3). A single-workgroup
launch traces nothing: it runs on whichever CU the dispatcher picks.
The last step of the capture is a verdict from wavewait app RUNDIR. att: 1 of 2 dispatches have waves on CU 3; none: __amd_rocclr_fillBufferUnAligned
is a plain line (the runtime's fill kernel is empty in every HIP capture). When no dispatch has a wave the capture ends
FAIL att: 2 dispatches, 0 with a wave on CU 3: the grid did not reach it (192 or more workgroups; one workgroup traces nothing)
and exits 1; a run dir wavewait cannot list gives att: verdict skipped (...). ATT_VERDICT=0 turns it off, and
ATT_CU other than 3 WARNs: wavewait walks CU 3 only.
rocprofv3 traces the FIRST dispatch of a kernel, and that one is cold. tools/att-warm.sh RUNDIR -- CMD... captures the hottest
kernel at its middle iteration in one gpu-wait job: pass 1 runs CMD under rocprofv3 --kernel-trace --output-format csv into RUNDIR.rank,
wavewait rank names the kernel and its mid (ATT_KERNEL=REGEX picks another kernel than the top one), pass 2 is att-capture.sh with
--kernel-iteration-range [mid-mid]. It prints warm: KERNEL iteration MID of N; a kernel with one dispatch gets a WARN warm: line
and the cold capture. Checked on examples/saxpy_loop.hip (the saxpy kernel launched 2000 times after 1 s of other GPU work): iteration 1000 of
2000, the traced dispatch is the 1000th saxpy of the kernel trace; cold 46435 against warm 38910 cycles.
A walk with mism > 0 prints FAIL walk and exits 3: its causes look valid and are not (--allow-mism shows them, with WARN).
tools/run_hsaco KERNEL.hsaco SYMBOL GRID BLOCK [BYTES|iN ...] launches one kernel of a gfx1100 code object (hipcc, Mojo,
hand asm) through the HIP runtime (tools/run_hsaco.mojo, loaded at run time, built into build/ on first use). GRID and
BLOCK are x[,y[,z]]; each further argument is a device buffer of that many bytes (filled with 1.0f) or iN, an int32 value,
in kernel order. The runtime fills the hidden kernargs (blockDim, gridDim). It prints the first 4 floats of every buffer.
Under ATT it is an ordinary HIP program:
hipcc --offload-arch=gfx1100 --cuda-device-only --no-gpu-bundle-output -O3 -c k.hip -o k.hsaco # WGP mode, as is
tools/att-capture.sh .work/att/k -- tools/run_hsaco k.hsaco kernel_symbol 192 256 4096 4096 4096 # 192+ workgroups: see Limits
tools/from-att.sh .work/att/k .work/att/k_att
build/wavewait .work/att/k_att --causes --top 10 # or: build/wavewait app .work/att/kChecked on the GPU (2026-11-29, tools/check-live-gpu.sh): run_hsaco and 13 of the 14 probes in probes/ trace and walk with 0 mismatches;
a grid of 1 traces nothing and ends in the FAIL att above. Not verified: probes/hunt_nop_sleep (its wave is in AMD's decode and wavewait lists 0 waves for it, docs/status.md).
Reading the table: in the raw table a wait's cost shows on the instruction that issues AFTER it (an
s_waitcnt vmcnt(0) that waited 670 cycles shows as a 670 delta on the next instruction); --causes fixes that.
Each packet's class (VALU, SALU, SMEM, branch, memory, barrier, IMMEDIATE) must fit the instruction it is
assigned to; an instruction no packet fits is untraced and skipped (seen: s_delay_alu always, s_clause
sometimes traced as IMMEDIATE, s_endpgm never). A branch sends op 3 when taken and op 4 when not; the walk counts both
per wave. Packets that fit nothing print a WARN. Disassembly uses the
system LLVM 23: ROCm 7.2's objdump prints some gfx11 VOP3 as .long and shifts every later pc.
| command | what | check.sh |
|---|---|---|
wavewait DIR [--top N] [--causes] |
per-instruction stall table, causes. --top N cuts an app-dispatch or --causes table to the N costliest rows (charged cycles, costliest first) and ends on the cause summary; the plain table of a capture dir stays whole, --top N there sizes the ranking below it; --top 0 prints every row |
golden table, cycles conserved, app --top 3 prints 3 rows |
tools/comfy-prof.sh OUT G1.api.json G2.api.json ... |
kernel profile of any ComfyUI API graph: resident server under rocprofv3 --kernel-trace, graphs one after the other (last = warm shot), per shot stage windows, rank --stages and the class table; gpu-wait job, MEM 36 GB; recipe and the LTX GGUF-dequant finding in docs/pytorch.md |
needs the GPU; the class table is gated below |
tools/kclass.sh RUNDIR STAGES.tsv [--steps] |
per ComfyUI node (or sampler step) window of a kernel trace: wall, busy union, dispatches, kernel time by class gemm / attn / conv / norm / bitops (GGUF unpack proxy) / elem | tools/test_kclass.sh: node lines and counts, shares sum to 100, negative controls |
wavewait rank RUNDIR [--top N] [--wide] [--json] |
every kernel of a whole process from rocprofv3 --kernel-trace --output-format csv: share, ms, dispatches, avg us, mid (the iteration for a warm --kernel-iteration-range capture); names are cut to the terminal width with ... in the middle, --wide and --json keep them whole; PyTorch recipe: docs/pytorch.md |
total against python's csv sum, quoted C++ names, no line over 200 characters, --wide and --json hold the 612-character name |
wavewait diff A B [--json] |
two captures aligned by instruction text (LCS): per-row delta, cause shift, +/- rows, total cycles | 28/28 aligned, 1 removed row flagged |
wavewait diff RUN_A RUN_B --kernel K [--top N] [--by-class] |
the same for ONE dispatch of two rocprofv3 ATT run dirs (--kernel PREFIX or --dispatch N, one selector for both sides). Rows are the N (default 20, --top 0 = all) that moved the most total cycles (dcycles), then the class table, the cause table (cycles A, B, shift) and total cycles A -> B. Above 4M cells (WAVEWAIT_ALIGN_CELLS) the alignment is Hirschberg's, linear in memory: a 14,000-row kernel diffs in 10 s and 88 MB where the table took 1.2 GB |
run dir against itself moves 0 cycles, both alignments agree |
wavewait DIR --json |
rows + totals, stable keys, for scripts and agents; the keys end on schema, kernel, mism, open, first_mismatch, functions. With --hints, --loops, --exposed or --by-line the object gains hints, loops, exposed_rows or lines. Every command has a JSON form (app, rank, occ, budget, phone*), see docs/api.md |
round-trips 28 rows; each form parses, a failure is a FAIL line and exit 1 (checks/cli.sh) |
wavewait DIR --by-class [--watts W --tok-s T] |
charged cycles, share and issues per wave per instruction class: vmem load (global_/buffer_/tbuffer_/flat_load*, spill scratch_* and v_readlane/v_writelane, barrier s_barrier), vmem store (stores and atomics), smem (s_load*, s_buffer_load*), lds (ds_*), s_waitcnt split by counter (vmcnt, lgkmcnt, expcnt, vscnt, depctr, mixed = more than one counter), valu (v_*), salu (every other s_*, so s_nop, s_clause and s_set_inst_prefetch_distance count here), branch (s_branch, s_cbranch*), other; --json carries the same as classes. Cycles are the charged ones and sum to the table total; with W and T also each class's share of the board watts and mJ per token (cycle-share model, upper bound, not a measured split) |
classes sum to 12897, issues = awk count |
wavewait DIR --by-line |
costs per source line (DWARF, build with -g) |
every pc mapped, addr2line agrees |
wavewait DIR --hints |
fix hints from the measured gfx1100 timing (hoist, empty wait, VOPD, LDS bank) and divergent: the waves took a branch a different number of times, with how often each wave ran it (ran 1..3 times per wave, taken 0..2) |
probe fires all 4, saxpy golden; app_div back edge ran 1..3 times per wave as AMD's per-wave files say, silent on uniform kernels |
wavewait DIR --exposed [--top N] |
rows by exposed cycles: the traced SIMD's idle cycles, each shared by the waves alive then, so a wait 8 waves sat in together counts once and cycles another wave issued in count not at all; then occupancy (mean, max waves alive) and the waves per SIMD the code object allows | rows + tail = SIMD idle; one wave slot (WAVEWAIT_ONLY) gives exposed = cycles - 1 per issue exactly |
wavewait DIR --exposed --watts W [--mhs M] |
mining / energy view: the W share spent while the traced SIMD issued nothing, J/MH now and if every idle cycle issued at the same W (an upper bound: an idle SIMD still draws clock and leakage power) | no --watts = byte-identical --exposed output |
wavewait occ CODEOBJ [--json] |
per kernel: waves per SIMD it allows and the limit (vgpr, lds, waves), LLVM's rules | 16/16 kernels equal hipcc's ; Occupancy: (fixtures/occ) |
wavewait budget FILE DIR rule exposed N |
max exposed cycles | own value passes, -1 fails |
wavewait app RUNDIR [--top N] [--json] |
every dispatch of a rocprofv3 ATT run, one row per kernel; a line after the table counts the dispatches with no wave on the traced CU (the grid did not reach it); --top N keeps the N costliest by cycles |
2 kernels, saxpy row = its table (38342); the table text is byte-identical to before |
wavewait app RUNDIR --dispatch N / --kernel NAME |
the full table (and every flag below) of ONE dispatch, walked against its own code object | equals its app row |
wavewait DIR --loops |
charged cycles per innermost loop (backward branch), poll loops flagged spin |
cycles conserved on the megakernel fixture |
WAVEWAIT_PACKETS=W wavewait ... |
debug: every issue of wave slot W (W = all: of every walked wave, plus a WAVE line per wave start), no packet cap: time, slot, cycles since the wave's last issue, charged cycles, pc, size, op, class, text, MISS where the walk lost alignment |
checks/causes.sh recomputes the causes from the all dump |
wavewait budget FILE DIR [--json] |
cycles N / cause NAME PCT rules, exit 1 naming each broken rule; --json lists every rule with its limit, what the capture has and the verdict |
own numbers pass, -1 cycle and -10% fail |
wavewait DIR --html OUT |
self-contained per-wave timeline page | 4 lanes x 112 bars |
wavewait DIR [--causes] [--top N] --gui |
the causes and costliest rows in a window (imkit, picture above): starts build/wavewait-gui with the same arguments, which check.sh builds only when mojo-imkit is checked out next to this repo; the CLI never needs it |
built when imkit is present |
wavewait sim |
blocked: needs the per-SIMD scheduler (docs/W7-blocked.md) |
exits 2 |
Peak RSS on the 11 MB trace: 23.9 MB table, 24.0 MB --html; app mode on fixtures/app 45.4 MB.
A 37 MB trace walks in 0.34 s at 47.9 MiB (0.44 s at 48.1 MiB before the walk indexed flat per-pc lists instead of hashing
a pc and comparing text per packet); a 32 MB .att through app takes 0.71 s at 70 MB (was 1.38 s at 68 MB: the cause table adds 4 MB).
- The traced SIMD is found from the trace (the one where every instruction packet's wave slot is alive); AMD's
decoder put
examples/diverge.hipon SIMD 3. Earlier versions always walked SIMD 0. --exposedsees one SIMD's issue stream: a cycle counts as hidden when another wave on that SIMD issued. AMD's rocprof-compute-viewer ranks pipes instead (WMMA > VALU > VMEM/LDS > SALU); the two numbers are not the same.- Divergence is wave level only: SQTT on gfx11 has no EXEC mask.
divergentcompares how often each wave took a branch (op 3) and shows how often it ran it (taken plus not taken, op 4):fixtures/app_div's back edge ran 1..3 times per wave, the counts AMD's per-wave files give. Waves that never ended (open) are not in these counts. - Causes are decided per issue from the trace alone (
### --causes).issue waitmeasures contention on the traced SIMD only: waves on the other SIMDs of the WGP are not in the trace.valu dep,salu dep,lds queueandvmem issueare latency labels from the instruction's text, given when the SIMD was not busy with other waves; the trace does not prove a dependency.fetchis a 128 B code line first used after 150 or more cycles, inferred from the pc, not read from a counter. - ATT traces only workgroups that land on CU 3: launch enough of them (a single workgroup traces nothing).
- A trace without instruction packets fails with
FAIL trace: no instruction packetsand says how many waves started on which CUs (0 on CU 3: launch 192 or more workgroups; some on CU 3: the capture did not target it,--att-target-cu 3). - No emulator replay yet (
wavewait sim,docs/W7-blocked.md).
src/wavewait.mojo (binary build/wavewait) decodes raw RDNA3 SQTT itself (a nibble state machine over the layout 3 packet
tables, frozen in src/sqtt_table.mojo), no Python at analysis time. tools/from-att.sh builds blob_N.bin + pcmap.tsv from
an ATT run (llvm-objdump through tools/pcmap.awk). Checked byte-identical against the retired Python analyzer
(tools/stalls.py, deleted; its saxpy table is frozen in fixtures/golden/) on the saxpy
fixture and 8 probe captures (loops and taken branches included).
Moves each wait's cost onto the s_waitcnt / s_barrier that held the wave (the next instruction keeps 1
cycle) and names the cause of every issue, not of a row's average. For one issue of one wave, d = cycles since the wave's
last issue, charged = d minus what a wait before it held, the first rule that fits decides:
| rule | cause |
|---|---|
| the first issue of a wave | wave start |
a wait (s_waitcnt, s_barrier): its text, and the cycles it held the wave |
mem (vmcnt, vscnt), lds/smem (lgkmcnt), mem+lds/smem, barrier, depctr |
| charged 8 or less | issue |
| charged 150 or more on an instruction that starts or crosses a 128 B code line | fetch |
| another wave of the traced SIMD issued in at least half of the d - 1 cycles between the two issues | issue wait: contention on the SIMD, measured by one counter of cycles with an issue and one saved value per wave slot |
| else the instruction's text | valu dep (v_), lds queue (ds_), salu dep (s_), vmem issue (the rest) |
valu dep is a latency label, measured only as "no other wave kept the SIMD busy", never as a proven dependency; issue wait sees one SIMD. A row is labelled with the cause that holds most of its cycles, and the kernel's summary is the sum
over issues. Total cycles are conserved (check.sh), and checks/causes.sh recomputes every cycle per cause from the
WAVEWAIT_PACKETS=all dump with an independent awk oracle on app_ts, app_mega and app_div. saxpy: 27% wave start,
25% lds/smem, 21% mem+lds, 20% mem.
A kernel that calls a non-inlined device function (s_swappc_b64, s_call_b64) is walked through the call and
back; cycles by function then splits the total between the kernel and each function it entered.
The decoder streams (no packet list): 11 MB trace 72 -> 23 MB peak, of which 11 MB is the trace itself.
probes/: 14 hand-written gfx1100 assembly probes (NAME.s: LDS, banks, barriers, WMMA, icache, s_nop) that measured RDNA3 timing rules.probes/build.sh [OUTDIR] [NAME...]assembles them (clang + ld.lld,PF=1..3arms icache's prefetch distance);probes/verify.sh(incheck.sh) checks every probe's code bytes, disassembly and kernel descriptor againstprobes/golden/, the streams they had before they were assembly. Capture one with the launch line in its header, e.g.tools/att-capture.sh RUN -- tools/run_hsaco build/probes/bank.hsaco bank 192 32 128; the grid must reach CU 3 (see Limits).tools/att-capture.sh: the rocprofv3 ATT capture above, guarded (buffer cap, hang watcher, truncation warning, a verdict on the dispatches).tools/att-warm.sh RUNDIR -- CMD...: the same capture at the middle iteration of the hottest kernel (warm).tools/check-live-gpu.sh [saxpy|empty|probes|warm]: the capture path proven on the GPU, onePASSorFAILline per step and per probe;PENDING(exit 0, not a pass) whenLIVE_GPU=0ortools/doctor.shfails.checks/capture.sh(CPU only) covers the verdict,att-warm.shand the phone resolver without a GPU or a phone.tools/run_hsaco: launches one kernel of a code object through HIP, for the capture above.tools/att-trim.sh RUNDIR OUT [N]: a one-dispatch run dir cut to its N earliest-ending waves, forfixtures/.
./check.sh (CPU only): tools/amd_oracle.py checks every ATT fixture against AMD's own decoder (code.json): hits
equal waves on every pc, each s_waitcnt within 1 cycle per wave. stall table of fixtures/saxpy_cu is aligned (28 instructions x 4 waves), Mojo == golden, --causes conserves cycles.
Every checks/*.sh runs at the end (each takes WW, default build/wavewait, and prints FAIL <step>: <reason>):
checks/causes.sh holds the per-issue cause oracle and the empty-trace texts. checks/lib/snapshot.sh WW OUTDIR writes
every table, causes, json, hints, loops, exposed and by-class output of the capture dirs and every app dispatch of the
fixtures with one sha256 manifest: a change that must not move a number leaves diff of two manifests empty.
No SQTT on Adreno, so a phone gives causes per kernel, not per instruction. scripts/ww-phone DEV OUT K.cl [N] [MB]
builds tools/wwk.c with the NDK, pushes it, reads every KGSL counter around N enqueues of an OpenCL kernel
k(__global float *a, int n) and an idle window, pulls the result and prints wavewait phone OUT:
cause share cycles/us
alu 64% 1595
mem 1% 39
fetch 14% 370
top cause: alu -> ALU bound: cut instructions per element ...
Works on oneplus (Adreno 640, no root). xiaomi (Adreno 840, Android 17) and flip (Adreno 730) keep counter reads closed (KGSL perfcounter=0 or EPERM;
writing it reboots the phone, so no tool here does). Countable names: Mesa assets/adreno/aNxx_perfcntrs.xml.
DEV is a nickname (oneplus, xiaomi, flip, samsung) or any adb serial, ro.serialno or model string (scripts/ww-adb, sourced by every
phone script). Only entries in state device count (an offline or unauthorized one ends in FAIL adb: naming the state), the entries of one phone
(USB and wireless, two wireless transports) are merged by ro.serialno, USB is preferred, and one lock ~/.cache/corewait/phone-<ro.serialno>.lock
serves the phone whatever the transport (the old per-serial locks are held too, so a script that still uses them excludes). A phone with neither
/dev/kgsl-3d0 nor /dev/mali0 (an A70: MT6580, Android 5.1) ends in FAIL device: SERIAL has no Adreno or Mali counter path before anything is pushed.
WW_RESOLVE_ONLY=1 scripts/ww-phone DEV OUT K.cl prints serial, psn, gen and lock and stops (getprop only). Checked live 2026-11-29:
scripts/check-live-phone.sh oneplus and ... ce56368f (its serial) both end in ok live with alu, mem, efu as top causes; xiaomi (two wireless
entries, one phone) runs gemv_best, checksum -4153.16; docs/DEVICES.md has the numbers.
Rules that cost a reboot, devices and what each gives: docs/DEVICES.md.
wavewait phone-diff OLD NEW kernel time + per-cause cycles, NEW against OLD
wavewait phone-budget OUT FILE "us N" / "cause NAME P" caps, exit 1 + OVER lines
scripts/ww-perfetto DEV OUT K.cl path 3: vendor GPU counter producer under Perfetto, busy-window means
scripts/ww-ablate DEV OUT K.cl per-line cost: re-record with each body line removed (declarations zeroed)
scripts/ww-phone-race DEV OUT ROUNDS ARMS.tsv kernel variants interleaved per round: best/median us, checksum, instructions
scripts/ww-phone-sustain DEV OUT K.cl [SECS] [N] -- ARGS 60 s run: runs/s first vs last 10 s, battery W, mJ per run (the PMIC zones are the OnePlus ones)
scripts/ww-phone-ab OUT ARMS [ROUNDS] [SUS] A/B of kernels where no counter is readable (xiaomi, DEV=flip or an a7xx/a8xx serial): GPU event time, checksum, output hash, optional sustained run with battery W
scripts/check-live-phone.sh [DEV] [freeze] re-record the probes on an attached phone (nickname or serial) and check each top cause; PENDING when absent
build/wwdis PROGRAM.bin GPU_ID Adreno listing of OUT/program.bin (Mesa ir3 via the tinymesa wheel); ww-phone writes OUT/listing.s
Any OpenCL kernel: scripts/ww-phone DEV OUT K.cl N MB -- buf:MB f32:V i32:V local:BYTES k=NAME g=GLOBAL l=LOCAL [chk]
(chk fills buffers with fixed bytes and prints a checksum of the last one, to compare kernel versions).
Budgets take cycles N [+P%] (shader busy cycles, clock-free) next to us. A worked example, a Q4 GEMV made 13x
faster with these tools: docs/DEVICES.md.
Mali (Arm Bifrost/Valhall): scripts/ww-phone samsung OUT K.cl ... runs tools/wwm.cpp (Arm libGPUCounters, no root) and
assets/mali-causes.tsv (alu, wait, ls, branch, tex). Build steps: the header of tools/wwm.cpp. Devices and results: docs/DEVICES.md.
Open limit: the Mali route was measured on the SM-A217F on 2026-11-20 and not re-checked since; that phone was not attached on 2026-11-29, so
scripts/check-live-phone.sh samsung prints PENDING and the resolver's Mali branch (/dev/mali0) is tested against a stub only.
Skill folder: skills/wavewait/. CLI reference: docs/api.md.
Design: docs/design.md.
skills/wavewait/SKILL.md teaches an agent the loop: capture with tools/att-capture.sh,
find the kernel with app, read causes, lines and hints, edit, capture again, diff, then lock the win with budget.
Copy or symlink the folder into the agent's skills directory (for Claude Code: ~/.claude/skills/wavewait or a
project's .claude/skills/wavewait).
Apache-2.0, see LICENSE and NOTICE. Copyright 2026 AMARBARO · amarbaro.org labs.
