Spill reload latency: registered decision before the long-launch recapture
Registered before any long-launch capture of spill-latency that has the launch cost taken out (9c94ee7) is built into a profile. It settles the second proposal of issue #15: the reload latency in the core is provisional (design.md 6.4) because 51 to 52 of the 60 points of spill_reload_latency_by_count come from launches under 1 ms. This test decides whether the reload latency lookup holds on a long-launch recapture. Nothing below changes after a recaptured profile exists.
What is frozen
- Core:
cd5f35f, which readsspill_reload_latency_by_count(batch_before_dep,l1_hitandl2_spill) andl1_to_l2_spill_threshold_by_carveout. A change to the lookup or to how it reads the miss curve before this test is scored voids it. - Scorer:
scripts/spill_decision.pyas committed with this file (SHA-256ff9427ece9e8ce91574bb7f40b09de138e0fb93605ffe7dc8bcf5b432e551b3b). Its lookup is a copy of the core's (reload_table,reload_table_ns,Machine::spill_reload_nsinsim.rs);python/tests/test_spill_decision.pychecks that it reproduces the core's own boundary numbers. - Predictions on the current profiles: v0.3-spill-decision-frozen.json, from
python scripts/spill_decision.py freeze --profile gb10=profiles/gb10.json --profile rtx4070=profiles/rtx4070.json, corecd5f35f(clean build),profiles/gb10.json(0.22.0-posthoc) andprofiles/rtx4070.json(0.21.0-posthoc). They hold every point'sextra_ns_vs_zeroand the predictions of both tests below, and are what the recapture is compared against.
Data
For each GPU, the first long-launch profile (provenance.capture_protocol present) that meets all of these:
spill-latencypassed rule three of the capture (capture_protocol.rule_three["spill-latency"].statusispassed), so the profile was built only from valid rounds of this mode.- Its
merged-spill-latency.jsonhaslaunch_cost_by_frame, socollect_profile.pytook the launch cost out of each point. - It was not opened for these points before this file was committed.
If a GPU's capture fails spill-latency, its fields keep their previous values (long-launch-capture.md) and that GPU is recorded as not run. No point is dropped or re-captured to make a GPU eligible. GB10 and the RTX 4070 decide; other GPUs are scored and reported without a verdict.
Tests
Both use only batch_before_dep points, the ones the core reads, and extra_ns_vs_zero as stored in the profile.
- Count. Per GPU and per regime (
l1_hit,l2_spill): each point at 32 and 68 reloads is predicted by linear interpolation over the reload count from the other points of the same frame (0, 8, the other held-out count and 128), as the core interpolates. Pass when the median absolute error is at most 10% and no point is off by more than 25%. - Boundary. The 4
l1_boundarypoints with reloads (1 KiB frames, 128 KiB per SM), which the core never reads, predicted by the lookup alone: interpolated over the frames' footprint between thel1_hitandl2_spilltables and mixed by the zero carveout miss curve of the same profile at that footprint. Pass when the mean absolute error is under 20%, the bound of the core testspill_reload_latency_at_the_l1_boundary_matches_the_microbenchmark.
A test is not decided when a held-out point has no extra time or a boundary point is missing.
Verdict
python scripts/spill_decision.py score --frozen docs/results/analysis/v0.3-spill-decision-frozen.json --profile gb10=GB10.json --raw gb10=GB10_RUN/merged-spill-latency.json --profile rtx4070=RTX4070.json --raw rtx4070=RTX4070_RUN/merged-spill-latency.json --out OUT.json prints it.
- Pass: both tests pass in both regimes on GB10 and on the RTX 4070. design.md drops the long-launch condition from the provisional note on the reload latency. It stays provisional until executed reload counts are available, which this test does not touch.
- Fail: any test fails on either GPU. The failing test is reported as it came out, design.md 9.2 gets the limit, and the roadmap gets a box for it. No new form is fitted to these points, and the
l1_boundarypoints stay out of the lookup. - Not decided: either GPU is not run or has a test not decided. The provisional note stays as it is.
The verdict is reported in this file, pass or fail.
Reported without a verdict
- The whole core on the 4
l1_boundarypoints (spill_l1_boundaryinscripts/recheck_mechanisms.py). The core reads the 16 KiB miss curve for this kernel's 8 KiB carveout and charges nearly all reloads at its 128 KiB footprint at the L2 latency. These rows belong to the spill frame footprint re-check inROADMAP.md, not to this test. - The change of each
l2_spillbatch point against the frozen value. From the bias of the per-launch frame cost (long-launch-capture.md), the 2 and 4 KiB points are expected to come out lower. - Other GPUs.
- Not covered: the static reload count (9.2), the coupling of spill frames to the cross-wave L2 split (issue #15, design.md 9.2), and how the latency changes with more than 128 threads per SM.
On the current short-launch profiles (not evidence)
These are what the thresholds were set against. They come from the same profiles as the frozen predictions, so they say nothing about the recapture.
| GB10 | RTX 4070 | |
|---|---|---|
Count, l1_hit | median 8.6%, worst +18.6% | median 0.2%, worst +0.4% |
Count, l2_spill | median 1.9%, worst -4.7% | median 1.6%, worst -3.4% |
| Boundary, lookup | MAPE 13.1% (-19.2% to +14.5%) | MAPE 12.6% (+3.7% to +17.1%) |
| Boundary, whole core | +4.6% to +79.6% | +22.8% to +41.2% |
Both would pass. The test asks whether that still holds once the points come from long launches with the launch cost taken out.