Skip to main content

Result: what one more barrier per loop step costs on GB10

The measurement registered in v0.3-barrier-sync-plan.md, read by its frozen rules. Diagnostic: no core, profile or rule changes.

Capture​

  • Measurement commit cb28677. Binary built on Spark 1 with CUDA 13.0 for sm_121a, SHA-256 1c25c2fd5ceb8e914c4f63a90d2a1a4e3a1e93abc2ab65ac2bbe8d87985e80c3. The assembler check passed on this binary before the capture: every one of the 18 instances has exactly B BAR.SYNC and W FFMA per loop iteration (sass-check-capture.json).
  • One session on 2026-11-27, build from 22:43:16 UTC, capture from 22:44:57 to 22:45:17 UTC, all under the GPU lock. The quiet-host gate passed; the pilot froze the 72 points; three processes, all host-checked and valid (busiest second 5.3% to 5.5%), no replacement used; every launch passed long_launch.verify. SM clock 2508 to 2562 MHz across the points.
  • Raw: capture.json, pilot.json, the freeze, and the reading computed by microbench/barrier_step.py judge against profiles/gb10-0.23.0.json, judge.json.

Reading 1: capture rules​

Rules 1 and 2: 0 failing lists in each process (3 and 10 allowed). Rule 3: 0 of 72 points (3 allowed). No point fails a rule, so every configuration is read.

Readings 2 to 4​

Per-step time t(B) in ns, the median of the three processes; d1 = t(1) - t(0); b the least-squares slope over B = 1, 2, 4, 8, 14 (median of the processes). The profile's fixed_sync_ns for one buffer is 26.0 ns at 4 warps and 29.2 ns at 8 warps.

WWarpsGridt(0)t(1)t(14)d1bBarrier-free stepBarrier countLinear
04110.912.4114.21.47.86not resolvedmattersyes
044810.912.1113.31.27.80not resolvedmattersyes
08110.915.2157.24.310.93not resolvedmattersyes
084810.915.2157.04.310.92not resolvedmattersyes
644130.134.4117.24.36.62not resolvedmattersno
6444830.134.4117.44.36.63not resolvedmattersno
648153.461.4179.08.09.38not resolvedmattersno
6484853.261.0179.37.89.44not resolvedmattersno
51241239.5241.8245.72.20.23pays itdoes not matter
512448246.4248.0246.61.7-0.18pays itdoes not matter
51281410.1523.2588.4112.95.20does not pay the barrier costmattersno
512848408.6533.4586.9124.84.55does not pay the barrier costmattersyes

By the frozen rules:

  • Reading 2, the barrier-free step. Two configurations read "does not pay the barrier cost" (W = 512 at 8 warps): the first barrier adds 113 to 125 ns, far above the profile's 29.2 ns. Two read "pays it" (W = 512 at 4 warps): one barrier changes the step by under 5%. The other eight are not resolved: at W = 0 and 64 the first barrier adds 1.2 to 8.0 ns, more than 5% of t(1) but less than half of fixed_sync_ns.
  • Reading 3, the barrier count. It matters in ten configurations and does not in two (W = 512 at 4 warps, where the barriers are hidden by the work).
  • Reading 4, linear in the count. Linear at W = 0 (largest residual 1.6% to 4.7%) and in one of the two W = 512, 8-warp configurations; not linear at W = 64, where the first barriers are partly hidden (t rises by 1 to 5 ns up to 4 barriers, then by about 8 to 9 ns per barrier), nor in the other W = 512, 8-warp configuration (largest residual 8.1%).

Reported without a verdict​

  • Size against the profile. On an empty step (W = 0) one more barrier costs 7.8 ns at 4 warps and 10.9 ns at 8 warps, about 20 and 28 SM cycles at the median measured clock (2560 MHz): about a third of fixed_sync_ns (26.0 and 29.2 ns), whose kernel also waits for and commits an asynchronous copy group every step.
  • One CTA against all SMs (all SMs over one CTA, median of the processes). At W = 0 and 64, within 2% at every barrier count (largest -1.95%). At W = 512: at 4 warps +2.6% to +2.9% at 0 to 2 barriers and within 0.4% from 4 on; at 8 warps +2.5% at 2 barriers and within 2% at the others.
  • The 8-warp, 512-instruction step. Without barriers the eight warps run out of step and the step takes 409 to 410 ns; with one barrier per step it takes 523 to 533 ns, and further barriers add about 5 ns each. One explanation is that a barrier puts all warps in step every iteration, so their FMA streams no longer overlap; this run does not test it.

What this says for the two roadmap items​

These are observations for the core's owner, not a proposal:

  • The core charges fixed_sync_ns once per step whatever the barrier count. Here the count matters in most configurations, and on an empty step the cost grows linearly at about 8 to 11 ns per barrier.
  • Whether a barrier-free loop should pay the step charge has no single answer: with enough work per warp at 4 warps the barriers cost nothing, while at 8 warps with the same work the first barrier costs about four times fixed_sync_ns.

The RTX 4070 part waits for a quiet desktop window.