Files
reims-vgpu/scripts/gpu-load-probe
Anees IqbalandClaude f7bd9eadd8 ✨ A probe with a dial on each of the three big rails, because the sustained-animation one has saturated and can no longer rank a device change
Pathway: x86 macOS / Linux Vulkan. New probe under `scripts/`; no device code.

`sustained-animation-probe` has stopped being able to measure this device on
macos-13. The guest produces ~26 800 draws and ~76 presented frames a second
whatever the device does underneath, and the drain worker sits at duty 0.83 —
it has idle time. A measured 3.9 us/chain saving in the pipeline span moved
`draws_s` by less than 0.1 %, and `slot_us` rose 77 -> 129 ms/s with
`ring_retire_blocks` 291 -> 496: the worker spent exactly what it saved
waiting, because there was no more guest work to do with it.

A probe the device cannot fall behind reports "no effect" for a real win and
for a real regression alike. That is the failure this replaces, and it is not
fixed by running the old probe longer or more often.

`gpu-load-probe` makes each guest frame heavier rather than asking for more
frames — which is also the only thing a page can do, since the frame rate is
the guest's own display cadence. Three dials, because they land on three
different rails and a change can help one and hurt another:

  layers=N   composited surfaces          -> the writeback / store rail
  verts=K    per-frame WebGL bufferData   -> the guest buffer gather rail
  tex=W      per-frame 2D canvas repaint  -> the sampled-image rail

The gather axis is the one nothing else here reaches. On a compositing load
`buffer_guest_gather_bytes` is 5.8 GB/s over 427 000 transfer regions a
second — the largest GPU cost left in the device now the writeback scatters in
one dispatch — and a CSS page barely exercises it. A WebGL canvas that
re-uploads its whole vertex buffer every frame does exactly that, and the
shader is deliberately trivial so the cost lands on the gather rather than on
fragments.

Determinism follows `anim.html`'s rule and for its reason: every step is per
frame, nothing in the content reads the clock, so two boots draw identical
content per frame and differ only in how many frames they get through. Layer
promotion is forced with `backface-visibility` plus a 3D transform rather than
hinted with `will-change`, which that page measured to be advisory often enough
to split boots of one binary into two clusters 24 % apart.

The URL is written to `<outdir>/load-url.txt`, so a result read later says
which load produced it. Two boots at different dials are two workloads, not two
readings.

Verification performed:
  - `bash -n` on the script; the shim `kb/harness/gpuload.sh` (gitignored)
    drops it into `ab.sh` as `AB_PROBE` the way `anim.sh` does

Not verified: **this probe has not been run against a guest yet.** It is
written to the same interface and the same serving pattern as
`sustained-animation-probe`, whose shape it copies deliberately, but no boot
has confirmed Safari renders the page, that WebGL is available on the macos-13
rail, or what the dials are worth in counters. That is the next thing to do
with it, and until then no number may be quoted from it.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 07:40:16 +03:00
..