test(isa): the two parsers, on fixtures

isa_tools (fast tier) runs libr4d/isa/selftest.sh: no build tree, no card, no
ROCm. rows.awk at the nine 24-VGPR boundaries and at the wave64 quantum;
waterfall.awk on a forward branch after a movrel (not a loop), a real back-edge
(a loop), a movrel with no branch, and a kernel with no movrel after a kernel
that has one.

Against the code this replaces, five of the nine occupancy checks fail (97,
121, 145, 241, 256) and the forward-branch case counts a loop where there is
none. The rest pin behaviour that is right today: the movrel-with-no-branch row
and the empty kernel stay as they are, and the seen-flag reset in flush() has no
observable case in this tree -- waterfall.awk resets it per kernel so a later
edit cannot reintroduce one.
This commit is contained in:
orca authored and StillDeadcode committed 2026-10-27 18:24:13 +01:00
1 parent f406c4dafc
commit f69c9d8324
3 files changed
+93

No files matched your search

+7
View File
@@ -10,6 +10,12 @@ that report the geometry a kernel was launched with rather than every geometry i
BUILD=... ./waterfall.sh # divergent VGPR indices, per kernel
./loop.sh # its K loop, classified
./trace.sh traces/dec -- ./bin/radiance ... # then: ./tsum.sh traces/dec/k_kernel_trace.csv
./selftest.sh # the two parsers, on fixtures (ctest: isa_tools)
`res.sh` and `waterfall.sh` exit nonzero when they looked at nothing -- no `.hip.o`, an object whose
code object will not extract or disassemble, or not one kernel in the tree. Empty output from an
instrument is a failed run, not a clean tree. A HIP translation unit that carries no kernels has no
`.hip_fatbin` and is skipped rather than failed.
`res.sh` prints mangled names; the substring `dis.sh` takes picks one template instantiation, and
the parameter order is in the kernel's declaration (`gemm_fp8a8_kernel` is
@@ -27,6 +33,7 @@ anchor, because a largest-loop search finds the epilogue, a long unrolled store
| `loop.sh` | isolates the working loop of that disassembly and classifies its body by instruction class |
| `res.sh` | one row per device kernel in a build tree: VGPRs, SGPRs, LDS, scratch, spills, waves a SIMD, workgroup size |
| `waterfall.sh` | every kernel that indexes a VGPR array with an index the compiler could not prove uniform |
| `selftest.sh` | the parsers behind `res.sh` and `waterfall.sh`, against fixtures |
| `trace.sh` | runs a command under `rocprofv3 --kernel-trace` and leaves a CSV |
| `tsum.sh` | summarises that CSV over a steady-state window: where device time goes, per (kernel, grid) |
| `gaps.sh` | where the device is idle, and which op it was waiting for |