fix(perf): pin the qualification runners to the high-performance GPU (Refs #7955)

Merged
LO
1mo ago
+24-1

Refs #7955

Why

Before the #7955 performance cohort, the two Holter Tower failures from the 2026-11-01 pre-flight were rerun on current main (51c4fdb893), on Pop, with the same runners and flags. Neither reproduces (numbers below). The rerun found one thing that would make the cohort's browser rows unreliable, and this PR fixes it.

Pop is a laptop with two GPUs: an Intel iGPU and an NVIDIA RTX 4000 Ada. The renderer asks WebGPU for the default adapter, and Chrome's default changed between runs:

runadapter the viewer got
2026-11-01 pre-flight (viewer, advanced_model and Holter)NVIDIA lovelace
2026-11-04 rerun on main, same runner flagsIntel gen-12lp

--gpu hardware --require-hardware-gpu accepted both, because it only refuses software adapters. So the samples of one cohort could be measured on two different GPUs without anything failing.

Change

--gpu hardware now launches Chrome with --use-webgpu-power-preference=default-high-performance. On one GPU it changes nothing. retained-qual.md says so, and tells the reader to check that every row of a cohort names the same gpuAdapter. No product code changes; the viewer still asks for the default adapter.

Untimed probe on Pop (ifc-gpu-check, the runner's own GPU_ARGS.hardware, headed Chrome 156 on a private Xvfb, 2 launches each):

launch flagsrequestAdapter()high-performancelow-power
runner flags as on mainintel gen-12lp (2/2)nvidia lovelaceintel gen-12lp
plus --use-webgpu-power-preference=default-high-performancenvidia lovelace (2/2)nvidia lovelaceintel gen-12lp

Test

scripts/perf/retained-qual-browser.test.mjs: a hardware launch through launchFresh passes the flag to Chrome, and a SwiftShader launch does not. Without the production line it fails (not ok 3, 13 pass / 1 fail); with it, 14/14 pass.

Holter on current main (both pre-flight failures)

Pop, ordinary admission on a shared host, one round each, so these wall times are not benchmark evidence. Arm built from 51c4fdb893 with qualification/prepare-retained-arm.sh (engine manifest 5b7c8c46…).

2026-11-01 pre-flightmain 51c4fdb893
native pins (retained_compare)Holter > 4 h 28 min, stoppedcomplete, 0 violations, 54,536/61,201 (advanced_model 4,802/6,650); 14.2 min for both
CLI exportfailed after 18 min: Invalid string length (exit 1)ok, 849 s, 54,536/61,201, peak RSS 4.4 GB, OBJ 739,230,704 B, byte-identical to #8553's fixed run
viewerno terminal after 75 minok, first retained frame 7.0 s, terminal 831 s, 54,536/61,201, browser peak HWM 3.07 GB, 0 device losses (Intel iGPU)
browser memoryok, 14.6 minok, 810 s, wasm max 493 MB, peak HWM 1.11 GB

Refusals, CLI: operation_unsupported 6,371, incomplete 289, kernel_failure 4, empty_result 1. Each refusal is typed per product and nothing is partly published.

What fixed them:

  • CLI: #8553 (b56274ba60). The 739 MB OBJ and 1.03 GB report passed V8's maximum string length. The worker incarnation retired line above that error is end-of-run teardown noise; it is still printed and is not a failure.
  • Viewer: #8561 (51be141b60). Retained summary writes every 250 ms rebuilt the hierarchy tree, so the main thread ran at 1.8 products/s. #8540 (ddf4172c9d) also bounds a stuck page from Node, so a hang now fails at --timeout-ms instead of blocking the job.

This branch's runner on Holter (same main arm, --expect pins 54,536/61,201, same flags otherwise): ok, adapter nvidia lovelace, first retained frame 6.5 s, terminal 886 s, 54,536/61,201, 0 device losses, browser peak HWM 3.04 GB.

The Holter viewer now takes 831–886 s to reach terminal on either GPU. #8561's run on 2026-11-01 took 512 s. The GPU is not the cause. That run fell inside a 6-hour Balanced power-profile trial on Pop, and Pop is back on Battery (no turbo) now. The load is main-thread bound (long tasks 606 s). This is not attributed, and it is not a failure.

Not verified here

  • pre-handoff --base origin/main: all gates PASS, except retained-free viewer, which was SKIPPED because apps/viewer/dist was not built. This PR touches no viewer code.
  • scripts/perf/retained-qual-*.test.mjs: 102/102 pass.

šŸ¤– Generated with Claude Code