GB10 first 0.23.0 capture: the L2 capacity sweep and l2-merge failures
The diagnostic code (modes l2-buffer-diag and l2-merge-timing, their evaluators and tests) and the commits cited below are kept on the local branch archive/s4-v03-gb10-capture-diagnosis. The readings of the valid runs and the gate counts of the void one are summarized in v0.3-gb10-first-capture-l2-diagnosis.json.
Offline analysis of the capture at measurement commit 42e039d (5's report v0.3-gb10-first-full-capture.md, local commit 4c9ad1d; raw archive SHA-256 94f7717a...), read only; no GPU was used. It changes no rule, exception or statistic. The experiment at the end is a proposal, not yet run.
1. l2/capacity_sweep near 1.5 times L2 (rule 3, 2 of 24 points)
Within a round the point is steady; between rounds it moves as a whole. At 36 MiB the 15 samples of each round keep their level: no trend from the first sample to the last, and the IQR is 4% to 7% of the median (15% in round 4). The round medians are 1475, 882, 1167, 891 and 1150 GB/s. They form three levels, one round near 1470, two near 1160 (1167 and 1150) and two near 885 (882 and 891), with nothing between them. Taking the 20 MiB point (1961 GB/s) as all hits and the 60 MiB point (290 GB/s) as all misses, the hit fractions are 0.94, 0.79, 0.88, 0.79 and 0.88.
The whole cliff moves with the process, not only one point. Each round's median at each size, as a ratio to the median over rounds:
| Size | r1 | r2 | r3 | r4 | r5 |
|---|---|---|---|---|---|
| 2 to 22 MiB | 0.99 to 1.04 | 0.97 to 1.00 | 0.99 to 1.09 | 0.96 to 1.00 | 0.99 to 1.03 |
| 28 MiB | 1.01 | 0.85 | 1.04 | 0.90 | 1.00 |
| 36 MiB | 1.28 | 0.77 | 1.01 | 0.77 | 1.00 |
| 48 MiB | 0.96 | 1.16 | 1.00 | 1.05 | 0.93 |
| 60 MiB | 1.01 | 0.99 | 0.99 | 1.00 | 1.00 |
The two low rounds (2 and 4) are also low at 28 MiB and are the highest at 48 MiB (hit fractions 0.24 and 0.15, against 0.01 to 0.10). The cliff is spread wider in these processes, not shifted. Round 3 is 6% to 9% faster at 12, 15 and 22 MiB, sizes that fit the L2.
Unrelated to order, clock or host. l2 ran in the same place in all five rounds (fourth, after dram-bw), about 4.5 minutes apart. The SM clock around the 36 MiB point was 2535 to 2543 MHz in every round (2487 to 2545 MHz over the whole sweep). The host busy share was at most 5.6%. The levels do not follow the round order: high, low, middle, low, middle.
Why l2-rescan varies less. The two kernels read differently:
- The capacity sweep is one process-lifetime 60 MiB
cudaMalloc, filled with a constant, whose prefix is read cyclically 43 times per launch (36 MiB), with no flush between launches. It measures the steady state of repeated scans. l2-rescanreads its own 96 MiB buffer: a 128 MiB flush, one cold pass, then one timed pass. It measures what survives a single pass.
At 36 MiB the rescan's pass 2 (241 to 267 GB/s) is about pass 1 (238 to 241 GB/s): one pass after a flush leaves almost nothing. The retention the sweep shows is built up over repeated scans. The rescan's spread (10.8%) is still two levels, 265 and 267 against 241 three times, but small in absolute terms because so little is retained.
Retention exceeds the cache. A 0.94 hit fraction on 36 MiB means about 34 MiB served from cache, beyond the 24 MiB L2. Even an ideal thrash-resistant policy would serve at most 24 / 36 = 0.67 of a cyclic scan. Two things could explain it: a further cache level on the memory side, or compression of the constant fill (both buffers are cudaMemset to one byte value). Neither is known for GB10.
Most likely mechanism. The level is fixed for the life of a process and the same in every launch of that process. It moves the whole near-capacity part of the curve. The best fit is how this process's physical pages of the 60 MiB buffer map onto L2 slices and sets. Under unified memory every process gets different physical pages, so some slices hold more of the working set than others. An even spread hits most at 1.5 times L2 and least at 2 times; an uneven one loses hits at 28 to 36 MiB and gains them at 48 MiB in the less loaded slices. Two alternatives:
- Session state set at start. For example a fabric clock or a replacement mode, the same for every buffer of one process.
- Fill-dependent retention. For example compression, possibly combined with placement.
This also fits the registered bistable band at 0.75 to 1.25 times L2 (v0.3-gb10-l2-bistability-observation.md): one per-process cause, which in steady-state repeated scans reaches 1.5 to 2 times L2.
2. l2-merge rule 1 (3 to 7 flags per round, 4 allowed)
Each round flags different points.
- The flags are points, 3, 7, 7, 6, 3, 6 and 4 in rounds 1 to 7, as in the capture report. In 33 of these 36 point-rounds all four sample lists of the point (launch, turnaround and both bandwidths) are flagged together.
- 31 of the 36 have
stagger_stages16 and sharing 4 to 23, 26 of them at 96 CTAs. The other 5 have stagger 0, all at 48 CTAs with sharing 4 to 16. - No point is flagged in every round. The most frequent, 96 CTAs, sharing 8, 16 KiB, stagger 16, is flagged in 5 of 7.
The shape is a short slow episode, not a level change.
- Every round has the same median at a point: 852 to 872 ns, 466 to 470 ns and 412 to 413 ns at three of them.
- A round is flagged when its 15 samples contain one or two slow episodes. An episode is one to three consecutive samples, the first 30% to 40% slow, then decaying: for example 1176, 1040, 945 against 852.
- Over 630 points across the seven rounds there are 250 episodes. Between two episodes in one list the gap is 8 samples in 42 of 65 cases.
- The same 8-sample gap appears in the other flushed DRAM modes of this capture (
closed-loop,sync-loop,closed-loop-mma), and not inmma-chain(no episode).
Not the same source as section 1. This is the GB10 DRAM slow episode already recorded: fixed shape, about 8 samples (some 15 ms of flush and launch), in latency-bound cold DRAM reads, onsets set by the sequence and not by the point (gb10-dram-lowbif-bimodality-posthoc.md, v0.3-gb10-mlp-wall-order-posthoc.md). l2-merge points are S=1 cp.async reads waiting on DRAM fills, latency-bound, so they show it more often (0.40 episodes per point against 0.14 to 0.23 in the other modes). The capacity sweep is the opposite: stable within a process, different between processes.
3. Registered experiment for section 1
Approved by the lead and registered here before any run. Nothing below changes after the data are taken.
Procedure. A diagnostic mode l2-buffer-diag in vgpu_bench, not in BUILD_MODES and not in any profile. It reuses the capacity sweep's kernel (l2_read_cg_kernel, grid 4 x SMs, 512 threads) and, at each size, the frozen passes per launch of the capture (20, 28, 36, 48 and 60 MiB: 125, 80, 43, 10 and 8 passes), with the sweep's two warm-up launches of two passes before every point and no flush. Each process:
- Allocates six separate 64 MiB buffers and fills them with the sweep's constant (
cudaMemsetto 3). - Steady arm, constant fill: visits buffers 1 to 6, then 6 to 1; at each visit it reads the buffer's prefix at the five sizes, 15 samples each.
- One-pass arm, constant fill: for each buffer, 15 repeats of the rescan's 128 MiB flush, pass 1 and pass 2 at 36 MiB.
- Rewrites every buffer in place (same allocation, so the same physical pages) with splitmix64 of the 8-byte word index and a fixed seed. This is a full-period 64-bit generator, not a short cycle, so the data are incompressible.
- Repeats steps 2 and 3 with the random fill.
Three processes in one session on Spark 1, under the GPU lock, with --clock-probe (SM clock before and after every point), host_quiet and the capture's host gate. Each process runs through capture_posthoc.py (desktop and thermal gates, host gate, rules 1 and 2 on its sample lists). A process that fails a gate or rule 1 or 2 is void, archived and replaced by a further process, at most two; the readings use the first three valid processes. Rule 3 does not apply, since the difference between processes is what is measured.
Quantities. For a buffer, fill and visit, B(ws) is the median of its 15 bandwidth samples, and the hit fraction at 36 MiB is h = (1/B(36) - 1/B(60)) / (1/B(20) - 1/B(60)), from that buffer's own references. A buffer is stable if its two visits' B(36) differ by at most 5% of their mean. A buffer's level is the mean of its two visits.
Readings.
- Placement: in at least 2 of the 3 processes, the six buffers' constant-fill levels at 36 MiB span at least 20% of that process's median (the capture's processes spanned 0.77 to 1.28 of the median). In addition, at least 15 of the 18 buffers are stable.
- Session state: in every process the six levels span at most 5% of the process median, and the three process medians span more than 10%.
- Compression: with the random fill, h is at most 0.67 in every buffer, while the constant fill's median h over all buffers is above 0.67. This reading is independent of the other two.
- Neither: if neither placement nor session state is met, the result is recorded as "neither supported", with the within-process and between-process spans reported and no mechanism named; what to do next is decided separately.
- Not reproduced: if all 18 buffers' levels lie within 5% of their overall median, the per-process difference did not appear in this session and nothing is concluded.
Both one-pass arms are reported (pass 1 and pass 2 bandwidths per buffer and fill), not judged. The result decides whether the near-capacity sweep points can be stabilized by measurement design (for example the median over several buffers, which would be registered before any recapture), or need a registered device exception.
4. l2-merge: wall-clock period of the slow episodes (offline)
- Samples against wall clock. In this capture every scheduled launch lasts about 1.3 ms, and the flushed DRAM modes take about 1.9 to 2.7 ms per sample (process time less the clock probes, over the points' warm-up and timed launches). The 8-sample gap is therefore about 15 to 22 ms in every mode. The equal launch lengths confound a fixed number of samples with a fixed wall-clock period, so this capture cannot separate the two. The earlier mechanism-check runs at legacy lengths (0.1 to 1 ms DRAM launches) hold only 36 pairs of episodes, too few to decide.
- Host events. Nothing on the host matches. The capture's 10 ms CPU samples show a steady 2 CPUs busy (the benchmark and the tracer), with no autocorrelation at 20 ms, 40 ms or 400 ms lags. The 1 s host trace over the capture shows only the capture,
mysqld,node_exporterand the tracer above 2% of a CPU. The 1 s resolution cannot resolve a 20 ms period. - Suggested measurement (needs approval). One latency-bound cold DRAM point (for example
l2-mergeat 96 CTAs, sharing 8, 16 KiB, stagger 16) with 200 samples at two launch lengths, about 0.6 and 1.25 ms, each sample stamped with the host monotonic clock after its event. A fixed wall-clock period gives the same period in milliseconds at both lengths; a fixed sample count gives the same gap in samples. - Design options if the period is fixed in wall clock (suggestions, no rule change).
- Make each sample a group of launches spanning a whole number of periods, as
l2-rescangroups its passes. Each sample then holds the same share of the episode, and the spread between samples falls. - Alternatively, randomize the host gap between samples so that the episodes fall on random samples. This does not remove them; it only makes them independent of the sample index.
- Lengthening a single launch to many periods would also average them, but costs time in proportion.
- Make each sample a group of launches spanning a whole number of periods, as
5. Registered experiment for section 4
Approved by the lead and registered here before any run. Nothing below changes after the data are taken.
Procedure. A diagnostic mode l2-merge-timing in vgpu_bench, not in BUILD_MODES and not in any profile. It runs one l2-merge point with that mode's kernel, flush and buffer: 96 CTAs, sharing 8, 16 KiB per CTA, stagger 16, the 1 GiB scheduled buffer. Two lengths are used: the frozen 1464 steps (A, about 1.25 ms) and 732 steps (B, about 0.62 ms). Each process runs four blocks of 200 samples, A, B, A, B, each after 3 warm-up samples. A sample is the flush and the timed launch, as in the capture. Every sample records its CUDA event time and the host monotonic clock just before its flush. Three processes in one session on Spark 1 run under the GPU lock through capture_posthoc.py, with --clock-probe and the host gate. A process that fails the host or thermal gate is void, archived and replaced, at most twice. Rules 1 and 2 are recorded but void nothing, since the slow samples are what is measured.
Quantities. In a block, a sample is slow if its launch time exceeds 1.15 times the block's median. An onset is a slow sample whose predecessor in the block is not slow. A gap is the distance between consecutive onsets in one block, counted in samples and in milliseconds of host clock. For each length the gaps of all blocks and processes are pooled: G_s and G_t are their medians, and T is the median host time per sample.
Readings.
- Not separable: T at A and T at B differ by less than 25%.
- Not enough episodes: fewer than 10 gaps at either length.
- Fixed wall-clock period: G_t(A) and G_t(B) agree within 10%, and G_s(A) and G_s(B) differ by at least 15%.
- Fixed sample count: G_s(A) and G_s(B) agree within 10%, and G_t(A) and G_t(B) differ by at least 15%.
- Neither: every other outcome. The four medians and the gap histograms are reported and no mechanism is named.
The share of slow samples and the episode lengths per length are reported, not judged.
6. Results of sections 3 and 5
Measurement commit a87ac60 (binary SHA-256 3bea4d66..., built on Spark 1 with CUDA 13.0 for sm_121a). One session on 2026-11-27 from 04:49:49 to 05:02:12 UTC, under the GPU lock, after 8's session had released it. Every process passed the host gate. The raw records are in results/v03-gb10-diag/a87ac60/spark-raw.tar.gz (SHA-256 ccdf52df...) in the 4 worktree.
Section 3, buffer experiment: void, no reading. All five allowed processes (three plus two replacements) failed rule 1. 14, 30, 36, 38 and 43 of 264 lists had an IQR over 10% of the median, against 13 allowed. Rule 2 passed in all five. The experiment therefore has no valid process and no reading, and its data are archived without being read for any of the readings.
The cause of the failure is in its design. The flagged lists are the 36 MiB points, the point under study: 63 of 120 lists with the constant fill and 57 of 120 with the random fill, against 0 to 10 of 120 at every other size and 0 to 5 of 30 in the one-pass arm. This experiment makes 36 MiB a fifth of all lists, where the capture's sweep had one 36 MiB list among 24 points. Rule 1, counted over the whole run, could hardly pass. This was not foreseen when the experiment was registered.
A repeat needs a new registration. For example, rules 1 and 2 would be recorded but void nothing, as in section 5, since the dispersion at 36 MiB is part of what is studied, or the run would be counted per size. That choice is the lead's.
Section 5, episode timing: reading "neither". Three valid processes; rules 1 and 2 were recorded and, as registered, voided nothing.
| A, 1464 steps | B, 732 steps | |
|---|---|---|
| Host time per sample T | 2.41 ms | 1.76 ms |
| Gaps between onsets | 49 | 42 |
| Median gap G_s (samples) | 10 | 8.5 |
| Median gap G_t (ms) | 24.8 | 15.9 |
| Slow share | 10.5% | 9.2% |
| Episode lengths (samples: count) | 1: 13, 2: 29, 3: 7, 5 to 7: 6 | 1: 25, 2: 10, 3: 6, 4 to 11: 9 |
The two lengths are separable: T differs by 37%. Both remaining readings fail.
- Fixed wall-clock period needs the G_t to agree within 10%. They differ by 56%.
- Fixed sample count needs the G_s to agree within 10%. They differ by 18%.
The reading is "neither", and no mechanism is named. Descriptively, the gap moves much less in samples than in wall time.
7. Re-registration of the buffer experiment
Registered by decision of the lead, before any new run. It replaces section 3 for the repeat. The void data of section 6 are never read. Unless stated here, section 3 stands.
Gates by purpose.
- Rules 1 and 2 void a process only through the 20 and 60 MiB lists of the steady arm. These are the references from which every hit fraction is computed, so they must be clean. They are counted over those lists alone: 96 lists per process, launch times and bandwidths.
- At 28, 36 and 48 MiB, in the one-pass arm and in the control arm, rules 1 and 2 are recorded but void nothing. Their dispersion is part of what is studied. 36 MiB was 1 of the sweep's 24 points and is a fifth of this experiment's lists.
- The host gate and the other
capture_posthoc.pygates are unchanged.
Control arm. Each process first runs a single-buffer replica of the capture's sweep: one 60 MiB buffer filled with the constant, read at the sweep's 12 sizes in its order (2 to 60 MiB). Each size uses its frozen passes (1299, 388, 201, 160, 136, 125, 108, 98, 80, 43, 10 and 8), its two warm-up launches and 15 samples. The buffer is then freed, and the six-buffer arms of section 3 follow.
Processes. Five valid processes, at most two replacements, so that the control's three levels have a chance to appear.
Steadiness of a buffer. A buffer-visit is unsteady if its 36 MiB list has an IQR over 10% of its median. A buffer keeps its level only if both constant-fill visits are steady and their medians differ by at most 5%. A buffer's level is the mean of its two visits' medians, steady or not. The share of unsteady buffer-visits is reported per arm and fill.
Readings.
- Not reproduced: the five control 36 MiB medians span less than 20% of their median (the capture's five spanned 52%). Then the per-process difference did not appear in this binary, and only the control and the share of unsteady visits are reported.
- Otherwise, as in section 3, scaled to five processes:
- Placement: the six levels span at least 20% of the process median in at least 3 of 5 processes, and at least 25 of 30 buffers keep their level.
- Session state: every process's six levels span at most 5% of its median, and the five process medians span more than 10%.
- Compression: with the random fill, h is at most 0.67 at every buffer-visit, while the constant fill's median h is above 0.67. This reading is independent of the other two.
- Neither: every other outcome, with the spans and the unsteady shares reported and no mechanism named.
- Also reported: the control's within-process IQR at 36 MiB, against 4% to 7% in the capture. A large rise there with six buffers allocated would point to the alternation itself changing the state.
8. Result of section 7
Measurement commit 94138c7 (binary SHA-256 6f029855...). Spark 1, 2026-11-27 from 05:08:26 to 05:17:52 UTC, under the GPU lock. Five processes, all valid: the 20 and 60 MiB reference lists passed rules 1 and 2, and the host gate passed. The raw records are in results/v03-gb10-diag/94138c7/spark-raw.tar.gz (SHA-256 f33b91ad...) in the 4 worktree.
Reading: neither supported. Compression: not supported.
- Control reproduced. The single-buffer replica gave 790, 941, 775, 954 and 1093 GB/s at 36 MiB, a 34% span. Its within-process IQR at 36 MiB was 7.5% to 13.5%, against 4% to 7% in the capture.
- Placement not met. In every process the six buffers' levels span 33% to 58% of the process median, well over 20%. But only 8 of 30 buffers keep their level, against 25 required. 52% of constant-fill and 48% of random-fill buffer-visits at 36 MiB are unsteady (IQR over 10%).
- Session state not met. The within-process spans are far above 5%. The five process medians span 17%.
- Compression not met. With the random fill the median hit fraction at 36 MiB is 0.87 (largest 0.94), as with the constant fill (0.87, largest 0.94).
- One pass (reported). Pass 1 is 235 to 249 GB/s and pass 2 235 to 271 GB/s, with either fill.
What the registered readings leave open, without naming a mechanism:
- Separate buffers in one process differ as much as processes did in the capture, so the state is not set once per process.
- A buffer's state does not hold between two visits a few seconds apart, nor within a 15-launch list, when other buffers are read in between.
- The retention above 24 MiB at 1.5 times L2 is the same with incompressible data.
The near-capacity points of the capacity sweep therefore cannot be made reproducible by taking a median over buffers in one process. Recapturing them needs either a registered device exception for 28 to 48 MiB on GB10, or a separate study of what changes the state within a process. That is the lead's decision.
Spill residual: corrected attribution. An earlier version of this paragraph named the local pipe bandwidth (local_mem_l1_hit_bw_per_sm_gbps, estimated at 150 GB/s per SM) as the likely source of the l1_boundary batch points' remaining over-prediction (+67.6% GB10, +38.0% RTX 4070 at core 1af5351). That was a guess from bound_fraction alone, and it is wrong.
- Scaling both
localbandwidths by 2, 3, 4 and 6 leaves all four predictions unchanged. Thelocalbound comes from the reload latency on the chain, not from the bandwidth. - The predicted extra follows the reload table's
l2_spillrows exactly: halving them halves it, and the x128 prediction (3815 ns on GB10) is the 2048 Bl2_spillpoint. So the core treats these 128 KiB footprints as all L1 misses. - The cause is the carveout. The kernel uses no shared memory, but each CTA reserves 1 KiB, so
occupancytakes the smallest carveout option that holds it, 8192 B.spill_miss_ratethen takes the smallest measured curve at or above that, 16384 B, whose L1 holds about 105 KB; at 128 KiB its miss rate is about 1. The zero-carveout curve gives 0.56 (GB10) and 0.77 (RTX 4070) there. - With the zero-carveout curve also used for 16 KiB, the MAPE falls from 54.9% to 13.1% (GB10) and from 35.0% to 12.6% (RTX 4070). Those are the figures of the reload latency check in
crates/vgpu-core/tests/model.rs, which uses the zero-carveout curve.
Which carveout the hardware chose for this kernel was not measured when this was written, and the carveout-to-curve mapping was named as the candidate. The registered carveout probe has since measured it (v0.3-gb10-carveout-probe-reregistration.md, result). A 128-thread CTA with no shared memory request has its pointer-chase L1 cliff at 102.42 KiB, next to the 16 KiB request's 103.23 KiB. So the 16 KiB curve the core reads matches the hardware, and the mapping is not the cause; that candidate is withdrawn. The same probe found the spill-latency kernel's 512 B frames near their L1 level at 96 to 160 KiB per SM (design.md 9.2), which leaves the residual unexplained.