Gemini 4 Hydrogen 1.22×
Harness: Antigravity · switches: NANOCHAT_OPT_DATALOADER=1 NANOCHAT_OPT_FP8_KRNL=1 NANOCHAT_OPT_FP8_WCACHE=1 NANOCHAT_OPT_QKV_SHARE=1 NANOCHAT_OPT_QKV_SUM3=1 NANOCHAT_OPT_MLP_FUSE=1 NANOCHAT_OPT_OPTIM=1 NANOCHAT_OPT_OPTIM_CUDA=1 NANOCHAT_OPT_ROPE_NORM=1 NANOCHAT_OPT_ROPE_V2=1 NANOCHAT_OPT_SOFTCAP_CE=1 NANOCHAT_OPT_MICRO_BS=32 NANOCHAT_OPT_ASYNC_LOG=1 NANOCHAT_OPT_NORM_FUSE=1 NANOCHAT_OPT_VE_FUSE=1 NANOCHAT_OPT_AMAX_FUSE=1 NANOCHAT_OPT_FP8_WGRAD_FP32=1 NANOCHAT_OPT_OPTIM_V2=1 NANOCHAT_OPT_QKV_LT=1 NANOCHAT_OPT_SOFTCAP_CE_V2=1 NANOCHAT_OPT_NORM_BWD_1BAR=1 NANOCHAT_OPT_SCALED_MM_LT=1 NANOCHAT_OPT_OPTIM_PE_FUSE=1 NANOCHAT_OPT_OPTIM_BMM_LT=1 NANOCHAT_OPT_OPTIM_VE_COALESCE=1 NANOCHAT_OPT_OPTIM_TAIL_SPLIT=1 NANOCHAT_OPT_SOFTCAP_CE_V3=1 NANOCHAT_OPT_ROPE_V3=1 NANOCHAT_OPT_QUANT_V2=1
API stalls passed the 6 h pause allowance, so the lost time was run as a continuation of the same conversation on the saved submission (142 min); the judged result is the continuation's. The time axis leaves out the held time of both segments.
- Judged
- 1.22×
- Tier
- N1
- Self-best
- 1.22×
- Rounds
- 10
- Hours
- 10.0
- API cost
- $95.1
- Input tokens · 93.3% cached
- 363 M
- Output tokens
- 4.4 M
- Requests
- 2,278
- Micro-batch regrouping 4×16 → 2×32
- ✓
NANOCHAT_OPT_MICRO_BS=32, round 6B on top of earlier changes 0.9086 → 0.8909 s/step (1.0981× → 1.1199×), peak 56.19 → 93.17 GiB - Scope of hand-written kernels replacing Inductor glue
- ✓ whole block plus softcap + CE, all as the precompiled CUDA extension
fp8_fast: round 3 dual-layout quantization + 64×64 transpose, shared QKV input, relu² fused with quantization fwd/bwd (with the weight cache 1.0044× → 1.0617×); round 5A RoPE + QKNorm (saves only rstd, −4.5 GiB), softcap + CE + backward quantization (→ 1.0981×); round 7A norm + residual (first version in round 5B at 2.36σ, fp32 recompute brings it to 0.419σ, → 1.1469×); round 7B value embedding; round 8 amax folded into upstream kernels; round 9A profile shows only 2.01 ms/step left in Inductor kernels - Per-shape cuBLASLt algorithm selection
- ✓ continuation round 10A
NANOCHAT_OPT_SCALED_MM_LT: fixed per-shape cuBLASLt algorithms for forward, DX and DW (picked by head-to-head timing at M=65536; lm_head DX keeps the first heuristic), unit-test output diff 0, −9.3 ms/step (1.1959× → 1.2084×), GEMM 440.55 → 432.39 ms/step; round 10B also tunes the Muon BF16 BMMs; round 10C profile notes DX 1536→6144 still has no override (52.5 ms/step) - FP8 weights quantized once per step
- ✓
NANOCHAT_OPT_FP8_WCACHE: round 2 Pythoncustom_opversion 1.0045× (round 1 was 1.0044×, no gain), reverted; round 3 C++ cache checked by pointer + version counter (1.0617× together with the quantization kernels, shared QKV and MLP fusion, no separate number) - Fast accum on backward GEMMs
- tried, not kept: round 5B
NANOCHAT_OPT_FP8_FAST_ACCUM_BWD=1passed the statistical gate at max −2.66σ, close to 3σ; a microbenchmark at M=65536 then showed the backward kernel without fast accum is faster, off from round 6B on - Other main levers
- round 1 data fetch: fixed the always-false
device == "cuda"check, background thread + pinned ring buffers (1.0044×, N0); round 4 optimizer issues Muon reduce_scatter first and stacks straight into comm buffers (−4.9 ms); round 8 weight grads emitted directly in fp32 (on top of round 7B 1.1558× → 1.1605×); round 9A AdamW and Muon pre/post-processing in CUDA (−2.9 ms); round 9B QKV backward accumulates the three dx in cuBLASLt via beta; continuation round 10B Polar Express axpby fusion, coalesced AdamW collectives, last Muon group split 16 + 8 to overlap its all_gather (with the BMM tuning −2.5 ms, optimizer span 36.38 → 33.88 ms)
Raw work log16 sections
-8.3 hRound 1 (Baseline Profile + Data/Host-Sync Optimization)
- Started: 2026-11-20T01:17:29Z - Baseline Profile:bench/bench.py profile --tree /submission/nanochat --config /submission/switches.json --out /tmp/prof-ref --from 12 --iters 2(completed 2026-11-20T01:20:05Z) - Trace span (2 steps, updates 12–13):1967.61 ms(983.81 ms/update), GPU busy97.5%, total GPU kernel launches in step 0:11,741(971.76 mskernel sum,978.97 mswall). - Step 0 Accounting (1 update = ~979 ms): -Model: GEMM (_scaled_mm / linear):409.67 ms(42.2%),1800calls -Model: FP8 quant / amax / transpose:242.58 ms(25.0%),3656calls — [Kind 1 & 2/3] (weight quant+col_major repeated 4x per update; uncoalesced Inductort().contiguous()taking up to 635 us/call; double-pass_to_fp8; triplicate QKV input quant) -Model: FA3 (fwd + bwd):103.65 ms(10.7%),384calls -Model: Triton fwd/bwd (RoPE / norm / act / resid / ve):76.79 ms(7.9%),2900calls — [Kind 1 & 3] -Model: RMSNorm (fwd + bwd):39.47 ms(4.1%),344calls — [Kind 1 & 3] -Model: Softcap + CrossEntropy (+ lm_head quant):26.20 ms(2.7%),224calls — [Kind 3] (materializes 4.29 GB fp32 logits + tanh tensors per microstep) -Optimizer (Muon BMM + NCCL + Muon/AdamW kernels & copies):~41.7 mswall (23.04 msNCCL +20.65 msMuon BMM +15.14 mskernels/copies across streams) — [Kind 1 & 2] (double copy of grads before reduce_scatter, double copy of owned params, 12 separatevalue_embedsNCCL ops,RING_LLprotocol) -Grad Accum (AccumulateGrad add_):9.77 ms(1.0%),525calls +1401memsets — [Kind 2] (grad_accum_steps=4) -Host Sync / DataLoader: [Kind 2 — Bug]dataloader.pychecksuse_cuda = device == "cuda", which evaluates toFalsefortorch.device("cuda", local_rank). This disablespin_memoryandnon_blocking=True, forcing a blockingcudaStreamSynchronize(52–84 ms) insideaten::copy_on every microstep, plus ~8–10 ms synchronous Pythonbestfit/ tokenization on the training thread, preventing CPU lookahead and causing GPU idle gaps before every microstep and optimizer step. - Hotspot Chosen for Round 1: Data & Host Sync (nanochat/dataloader.py) under switchNANOCHAT_OPT_DATALOADER=1(N0). 1. Fixuse_cudacheck viatorch.device(device).type == "cuda"(use_cudawas previously alwaysFalsewhen giventorch.device("cuda", rank)). 2. ReplaceO(buffer_size)linear scan +list.pop+ per-doctorch.tensor()allocation inbestfitwith an exactO(1)bitmask + FIFOdequebucket structure +long_heap(producing exact tie-breaking). 3. Ring-buffercpu_buffer(8pinned slots, event-guarded) andgpu_buffer(6slots) with a background producer thread and dedicatedcopy_streamso parquet I/O, tokenization, best-fit packing, and H2D DMA overlap asynchronously with GPU execution. - Round 1 Measurements & Verdict: -bench/bench.py time(/tmp/time-r1):0.9933s/update (windows[0.9873, 0.9941, 0.9983]),1.0044xvs frozen reference (0.9977s/update),263,924tok/s, peak memory55.94GiB. Eliminates blockingcudaStreamSynchronize+ synchronous best-fit on CPU ahead of Rounds 2–5 where GPU time drops significantly. -bench/bench.py check --quick(/tmp/qcheck-r1):PASS(N0, bitwise identical) across 10 updates, 175 parameters, 640 token rows/rank (wall_s: 123.9s). - Committed:/submission/nanochatcommit on branchopt,/submission/switches.jsonupdated (NANOCHAT_OPT_DATALOADER=1). ---
-7.8 hRound 2 (Python `custom_op` FP8 Weight Cache — Abandoned/Superseded)
- Tried: CachingFloat8Linearweight(w_fp8, w_inv, w_col)across the 4 microsteps in pure Python via@torch.library.custom_op+weakref(NANOCHAT_OPT_FP8_WCACHE=1). - Timing (bench/bench.py time,/tmp/time-r2):0.9932s/update (windows[0.9872, 0.9961, 0.9964]),1.0045xvs frozen ref (57.33GiB peak mem). Virtually identical to Round 1 (0.9933s/update) because Pythoncustom_op+weakrefoverhead (580 calls/upd) plus eager 7-kernel ATen_to_fp8+_to_col_majoron microstep-0 misses offset the ~15 ms saved GPU work. - Decision: Reverted Python cache (git checkout -- nanochat/fp8.py) and replaced with a pre-built C++/CUDA extension (fp8_fast) in Round 3. ---
-7.8 hRound 3 (CUDA `fp8_fast` Dual Quant + C++ Weight Cache + QKV Share + Fused MLP)
- Started: 2026-11-20T01:41Z | Committed:954cb69- Root Causes Attacked: 1.Model: FP8 quant / amax / transpose(242.58 ms/updin baseline): replaced Inductor double-pass_to_fp8and uncoalescedt().contiguous()(up to 648 us) with a single pre-built C++/CUDA extension ([csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu)) providingquant_dual(vectorizeduint4amax + IEEE double scalar scale/inv_scale +64x64warp4x4__shfl_xor_sync+__byte_permtranspose with conflict-free swizzled SMEM + coalesceduint4column-major stores). Saves only(in_inv, in_col, w_inv, w_col)in backward ctx (no redundantin_fp8). 2. Weight FP8 re-quantization 4x per update: C++unordered_mapcache (get_cached_weight_fp8) keyed on(ptr, M, N, dtype, device)verified viaweak_intrusive_ptr<TensorImpl>+version_counter. 3. Triplicate attention QKV input quantization (c_q, c_k, c_v):_Float8QKVMatmulFastquantizesinput_2donce and shares(in_fp8, in_inv, in_col)across all 3 projections. 4. Intermediate MLPrelu(h)^2HBM materialization & 96x uncoalescedgo_T:_Float8ReluSqMLPFastfusesrelu_sq_quant_dual(fwd) andrelu_sq_bwd_quant_dual(bwd) directly into FP8 dual-layout stores. - Unit Parity & Microbenchmark (fp8_fast): - Bitwise0byte differences onquant_dual,relu_sq_quant_dual, andrelu_sq_bwd_quant_dualvs eager_to_fp8 + _to_col_major. - Eager 2-layer GPT parity check:0.0loss diff,0/21non-bitwise params. - Round 3 Measurements & Verdict (NANOCHAT_OPT_FP8_KRNL=1,NANOCHAT_OPT_FP8_WCACHE=1,NANOCHAT_OPT_QKV_SHARE=1,NANOCHAT_OPT_MLP_FUSE=1): -bench/bench.py time(/tmp/time-r3):0.9397s/update (windows[0.9354, 0.9404, 0.9433]),1.0617xvs frozen reference (0.9977s/update),278,960tok/s, startup+compile75.6s(down from ~115s), peak memory60.69GiB. -bench/bench.py check --quick(/tmp/qcheck-r3):exact_items_ok=true,NOT_BITWISE(due to Inductor vs custom CUDA graph rounding ontorch.compile). -bench/bench.py check --n1(/tmp/n1-r3):PASS(N1,verdict=equivalent) — max endpoint deviation0.31 sigmavs3.0 sigmabound ([0.116, 0.178, 0.310, 0.140, 0.162, 0.125]sigma). - Committed:/submission/nanochatcommit954cb69,/submission/switches.jsonupdated. ---
-7.6 hRound 4 (MuonAdamW Zero-Copy Stacking + Reordered Overlap)
- Started: 2026-11-20T02:02Z - Root Causes Attacked (Optimizer ~47–51 ms/updinprof-r3,4.19 msCat/Memcpy +22.8–33.8 msNCCL): 1. RedundantCatArray+Memcpy DtoD(torch.stack(...)+.copy_()onstacked_gradsbeforereduce_scatterand onupdated_paramsbeforeall_gather): replaced withtorch.stack(..., out=...)directly into communication buffers inside [nanochat/optim.py](file:///submission/nanochat/nanochat/optim.py) (_reduce_muon_sub,_compute_muon_sub,_step_optimizedunderNANOCHAT_OPT_OPTIM=1). Also releasesgrad_chunkearly before launchingall_gather. 2. Group schedule stalls: upstream waits on 14 serial AdamWreduce_scatters (lm_head,wte,12x value_embeds, scalars) before starting the first Muon compute kernel, then leaves AdamWall_gathers bunched._step_optimizedlaunchesMuonreduce_scatters first (tiny->mid), computes firstMuonbatch immediately, runsAdamWcompute+all_gatheroverlapped with remainingMuoncompute, and waits on early gathers (starting_foreach_copy_on compute stream) overlapped with the lastMuonall_gather. - What Did Not Work: -NCCL_PROTO=Simple(20.71 msvs3.93 msdefault, 5x slower) andNCCL_PROTO=LL128(4.37 ms) on 2x Hopper NV18 (scratch/bench_nccl.py), andNCCL_ALGO=NVLS(ncclInvalidUsagefor fp32 reduce_scatter on 2 GPUs). Kept default NCCL. - Splitting Muon batch groups (NANOCHAT_OPT_OPTIM_SPLIT=1,0.9361s/update): caused 2 minor BF16 ULP flips from cuBLAS Polar Express batch-size sensitivity and added extra Inductor compilations; unsplit mode (NANOCHAT_OPT_OPTIM_SPLIT=0) is both faster and 100% bitwise identical. - Unit Parity (2x Hoppertest_optim_dist.py):0/52diffs (max_err = 0.0) vs baselineMuonAdamW.step. - Round 4 Measurements & Verdict: -bench/bench.py time(/tmp/time-r4-unsplit, combinedOPTIM=1+ R1/R3):0.9348s/update (windows[0.9311, 0.9359, 0.9375]),1.0673xvs frozen reference (0.9977s/update),280,414tok/s, peak memory60.69GiB (-4.9 ms/updateover Round 3). -bench/bench.py check --quick(/tmp/qcheck-r4-only,DATALOADER=1+OPTIM=1):PASS(N0, bitwise identical) across 10 updates, 175 parameters, 640 rows/rank. Combined R1+R3+R4 inherits R3'sN1tier (verifiedmax 0.31 sigma, re-verified after Round 5). - Committed:9edc81b. ---
-7.4 hRound 5A (Fused RoPE+QKNorm+Scale & Fused Softcap+CrossEntropy+Dual-E5M2 Quant)
- Root Causes Attacked: 1.Model: Triton RoPE + RMSNorm(q, k) + scale 1.2(~30 ms/upd, saving fullq_rot, k_rot[B, T, H, 128]per layer for backward): replaced in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py) (NANOCHAT_OPT_ROPE_NORM=1) with_RoPEQKNormScaleFast(rope_qknorm_fwd/rope_qknorm_bwd,D=128, BF16). Saves ONLYrstd_q,rstd_k[B, T, H]fp32 instead ofq_rot, k_rot(4.5 GiBpeak memory saved!), reconstructsx_rotfromq_out / (alpha * rstd)in backward, uses zero-copynormalize_rotary_2d, and matches PyTorch FP32 RMSNorm eps (1.1920928955078125e-7f). 2.Model: Softcap + CrossEntropy + lm_head bwd quant(26.20 ms/updin baseline +4.29 GiBFP32 logits per microstep): replaced in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py) (NANOCHAT_OPT_SOFTCAP_CE=1) with_Float8LmHeadSoftcapCE(softcap_ce_fwd/softcap_ce_bwd_quant_dual), skipping full BF16->FP32 logits andtanhmaterialization by streaming directly from BF16raw_logitsusing PTXtanh.approx.f32, single-passBOUNDED_EXPreduction forsoftcap <= 40, and direct64x64warp-swizzled E5M2 dual-layout quantization (32x32fallback for unaligned shapes). - Unit Parity: -scratch/test_rope_softcap.py:rope_qknormfp32_diff <= 0.0312;softcap_ce (32768, 1536, 32768, 32768, 'mean'):loss_diff=0.0,gx_max=3.73e-9,gw_max=5.96e-8(fwd677 us, bwd2560 us);sum,none, and32x32fallback verified. -scratch/test_r5a_gpt.py: 2-layer GPT parity passed eager (loss_diff=0.0,none_diff=4.77e-7) and compiled (loss_diff=4.77e-7,none_diff=4.77e-7). - Round 5A Measurements & Verdict (cumulative R1+R3+R4+R5A): -bench/bench.py time(/tmp/time-r5a):0.9086s/update (windows[0.9047, 0.9096, 0.9114]),1.0981xvs frozen reference (0.9977s/update),288,512tok/s (-26.2 ms/updateover Round 4),peak_memory_allocated_gib: 56.19GiB (-4.50GiB vs R4), startup+compile59.5s, zero warnings. -bench/bench.py check --skip-timing(/tmp/scheck-r5a):PASS(N1,exact_items_ok=true,verdict=equivalent) — max endpoint deviation0.176 sigmavs3.0 sigmabound ([0.107, 0.173, 0.157, 0.176, 0.113, 0.079]sigma). ---
-7.4 hRound 5B (`NANOCHAT_OPT_NORM_FUSE=1` Fused RMSNorm / AddRMSNorm / ResidX0Norm / SubScaleRMSNorm)
- Root Causes Attacked: - Replaced Inductor Triton RMSNorm,x + attn_outresidual add,resid_lambdas * x + x0_lambdas * x0, andbackout_lambdasubtraction kernels with 1-warp-per-row (C=1536, 6uint4s/lane) + fallback CUDA kernels in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) and [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py). - Round 5B Measurements & Decision: -bench/bench.py time(/tmp/time-r5b):0.9005s/update (windows[0.8972, 0.9012, 0.9031],1.1079xvs frozen ref), peak memory57.31GiB, startup42.0s. -bench/bench.py check --skip-timing(/tmp/scheck-r5b):PASS(N1), max endpoint deviation2.3638 sigma([2.3638, -1.0732, -0.6601, -0.7627, -0.7750, -0.9157]). - Also testedNANOCHAT_OPT_FP8_FAST_ACCUM_BWD=1(/tmp/n1-r5b-fix):PASS(N1,-2.6596 sigmamax), dangerously close to the3.0 sigmastatistical bound, and later trace/microbench atM=65536showedfa=Falsebackward (nvjet_qrtst144x128 coopA) is actually faster thanfa=True(192x192). - Decision: KeptNANOCHAT_OPT_NORM_FUSE=0andNANOCHAT_OPT_FP8_FAST_ACCUM_BWD=0by default cleanly in Round 6B, leaving the implementation gated incsrc/fp8_fast.cu+nanochat/gpt.py. ---
-6.2 hRound 6B (`NANOCHAT_OPT_MICRO_BS=32`, Commit `e647e71`)
- Committed:e647e71(csrc/fp8_fast.cu,nanochat/gpt.py,scripts/base_train.py). - Root Causes Attacked: - Upstream useddevice_batch_size=16(M=32768per microstep,grad_accum_steps=4), leaving 80 GiB+ of HBM unused on 141 GiB Hopper and doubling kernel launch, weight-read, grad-accumulation, and optimizer overhead vsmicro_batch_size=32(M=65536per microstep,grad_accum_steps=2) while preserving exacttotal_batch_size=262,144tokens/update (NANOCHAT_OPT_MICRO_BS=32). - Round 6B Measurements & Verdict: -bench/bench.py time(/tmp/time-r6b):0.8909s/update (windows[0.8876, 0.8925, 0.8927]),1.1199xvs frozen reference (0.9977s/update),294,231tok/s, peak memory93.17GiB allocated (95.88GiB reserved), startup59.1s, zero warnings. -bench/bench.py check --skip-timing(/tmp/scheck-r6b):PASS(N1,exact_items_ok=true,verdict=equivalent) — max endpoint deviation dropped back down to0.2046 sigmavs3.0 sigmabound ([0.0650, 0.1333, 0.2046, 0.1509, 0.1362, 0.0762]sigma). - Profile (/tmp/prof-r6b,from=12, iters=2,889.93 ms/updGPU sum): Identified top non-GEMM bottlenecks (fp8_amax_part151.2 ms/upd,fp8_quant_dual_64x6487.5 ms/upd,rope_qknorm_fwd/bwd35.6 ms/upd,triton_red_fused__fused_rms_norm_backward*~40+ ms/upd,softcap_ce14.0 ms/upd,MuonAdamWCatArray+foreach_copy3.7 ms/upd, plus~2.1 ms/updhost sync /zero_gradgap). ---
-6.2 hRound 6C + 6D (RoPE V2 + `sum3_bf16` + `OPTIM_CUDA` + `ASYNC_LOG`)
- Root Causes Attacked: 1.ASYNC_LOG(NANOCHAT_OPT_ASYNC_LOG=1in [scripts/base_train.py](file:///submission/nanochat/scripts/base_train.py)): replacesmodel.zero_grad(set_to_none=True)with flat param loop_p.grad = Noneand defers per-step CUDA sync /.item()/ console logging to step<= 1or every 100 steps (N0verified). 2.ROPE_V2(NANOCHAT_OPT_ROPE_V2=1in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py)): barrier-free 8-threads/headuint4RoPE + QKNorm fwd/bwd (rope_qknorm_fwd_d128_v2/bwd_d128_v2). 3.QKV_SUM3(NANOCHAT_OPT_QKV_SUM3=1in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py)): vectorizeduint43-waysum3_bf16matching exact(a + b) + cBF16 rounding (581.2 -> 392.8 us,0-byte diff). 4.OPTIM_CUDA(NANOCHAT_OPT_OPTIM_CUDA=1in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/optim.py](file:///submission/nanochat/nanochat/optim.py)): batched 2D-grid CUDAstack_tensors/unstack_tensors(withbump_version()onunstack_tensorsso FP8 weight cache version checks remain exact) replacingtorch.stack(..., out=...)CatArray+_foreach_copy_, overlapped with NCCLreduce_scatter(0/52diffs in 2-GPU distributed parity). - Round 6C + 6D Measurements & Verdict: -bench/bench.py check --quick(DATALOADER=1, OPTIM=1, OPTIM_CUDA=1, ASYNC_LOG=1,/tmp/qcheck-r6d-n0):PASS(N0, bitwise identical) across 10 updates, 175 parameters, 640 rows/rank (wall_s: ~125s). -bench/bench.py time --paired(/tmp/time-r6d, all R6D switches):0.8789s/update (windows[0.8752, 0.8811, 0.8803],298,271tok/s, startup56.5s, peak93.16GiB) vs paired reference0.9941s/update ([0.9885, 0.9955, 0.9984], startup142.0s) —1.1352xvs frozen ref (0.9977),1.1295xvs paired ref (-12.0 ms/updateover R6B). -bench/bench.py check --skip-timing(/tmp/scheck-r6d):PASS(N1,exact_items_ok=true,verdict=equivalent) — max endpoint deviation0.2502 sigma<=3.0 sigma([0.0401, 0.1258, 0.2502, 0.1412, 0.0637, 0.0739]sigma). ---
4.2 hRound 7A (Fixed `NANOCHAT_OPT_NORM_FUSE=1`: Eliminated BF16 `x_mid` Re-read & Inductor Fallback Bottleneck)
- Started: 2026-11-20T13:15Z | Committed:ff2cd85- Root Causes Fixed: 1.dcr/dcxorthogonality drift (~1–5%error in unit test,2.36 sigmain Round 5B): forward saved BF16x_mid, which backward re-read to reconstructu = x_mid * rstd. Over10^8elements, BF16 quantization error(x_mid_f32 - x_mid_bf16)failed to cancel insum d_c * x_midwheredcrcancels strongly. Rewroteresid_x0_norm_bwdandadd_resid_x0_norm_bwd(192-threadC=1536+ generic) in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py) to omitx_midfromsave_for_backwardand recomputeu = (cr * x + cx * x0) * rstdin FP32 directly from(x, x0)/(a, b, x0)already loaded at the top of each row. Also fixedadd_sub_scale_rmsnorm_fwd_gen_kernelto computerstdin FP32 and verified zero register spills (0B stack/spill, 40 regs/thread on 192-thread backward kernels). 2. Added_register_fp8_fast_inductor_fallbacks()in [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py) to prevent exponentialoperator_str()overhead during Inductor compilation of deep residual DAGs. - Unit Parity (scratch/test_r7a_norm_unit.pyvs FP64): - Passed across(65536, 1536),(17, 1536),(64, 256),(33, 1535)and all optionalNonegrad combinations:dcr_rel <= 0.00000,dcx_rel <= 0.00002,da/dx/dx0_rel <= 0.00234. - Round 7A Measurements & Verdict (R6D +NANOCHAT_OPT_NORM_FUSE=1): -bench/bench.py check --skip-timing(/tmp/scheck-r7a2):PASS(N1,exact_items_ok=true,verdict=equivalent) — max endpoint deviation dropped from2.36 sigma->0.419 sigma([0.047, 0.301, 0.419, 0.364, 0.327, 0.248]sigma vs3.0 sigma),93.54GiB peak alloc, record wall55.1s. -bench/bench.py time --paired(/tmp/time-r7a2):0.8699s/update (windows[0.8657, 0.8709, 0.8732],301,342tok/s, startup+compile38.9svs56.5sR6D /132.1sref, peak93.54GiB) vs paired reference0.9972s/update ([0.9919, 0.9998, 1.0000]) —1.1469xvs frozen reference (0.9977),1.1452xvs paired reference (-9.0 ms/updateabsolute /~12.5 msref-adjusted over R6D). ---
4.2 hRound 7B (`NANOCHAT_OPT_VE_FUSE=1`: Fused Value Embedding + VE Gate Forward In-Place & Deterministic Atomic-Free Backward)
- Root Causes Attacked: - In [prof-r7a](/tmp/prof-r7a/timing_profile.trace.json), Value Embeddings (12layers × 2 microsteps =24fwd+bwd calls/update) launchedtriton_*_embedding_dense_backward_*(6.02 ms/u),triton_*_add_embedding_*(3.91 ms/u),slice_backward_view_7(2.30 ms/u),embedding_dense_backward_3(1.16 ms/u), and 72 tinycutlass_32x32ve_gateGEMMs (0.88 ms/u), materializing~4.5 GiBofveandx[..., :12]intermediate buffers. - Addedprepare_ve_meta(1x per forward viacub::DeviceRadixSort::SortPairsonint32token+row,~3.1 us/layeramortized),ve_mix_fwd_inplace(mutates QKV_scaled_mmvoutput directly in-place with Inductor zero-clone),ve_mix_bwd(token-sorted atomic-free bitwise-deterministicve_bwd_tiles_192_kernel+ve_bwd_merge_partials_192_kernel+ve_bwd_reduce_dw_kernel,0 bytes stack/spill), andsum3_add_col_bf16(fusingd_x12intosum3_bf16) in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py), and [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py). - Unit & Parity (scratch/test_r7b_ve.py): - Verified exact bitwise determinism across repeated runs on all fastC=1536paths, multi-tile boundary merges (>3 tiles),sum3_add_col_bf16, compiled_Float8QKVWithVELinearFast, and compiled 2-layermini_gptparity (loss0.000diff, gradsl2_rel <= 3.59e-3). - Round 7B Measurements & Verdict (R7A +NANOCHAT_OPT_VE_FUSE=1): -bench/bench.py time --paired(/tmp/time-r7b):0.8632s/update (windows[0.8595, 0.8636, 0.8664],303,693tok/s, startup+compile35.3svs133.9spaired ref,peak_memory_allocated_gib: 89.06GiB-4.48 GiBvs R7A) vs paired reference0.9967s/update ([0.9918, 0.9983, 1.0001]) —1.1558xvs frozen reference (0.9977),1.1539xvs paired reference (-6.7 ms/updateover R7A). -bench/bench.py check --skip-timing(/tmp/scheck-r7b):PASS(N1,exact_items_ok=true,verdict=equivalent) — max endpoint deviation0.447 sigma([0.013, 0.290, 0.447, 0.341, 0.302, 0.240]sigma vs3.0 sigma),89.05GiB peak alloc, record wall50.9s. ---
5.6 hRound 8 (`NANOCHAT_OPT_AMAX_FUSE=1` + `NANOCHAT_OPT_FP8_WGRAD_FP32=1`: Fused Inline Amax Collection + Direct FP32 Weight Gradients)
- Root Causes Attacked: 1. Standalone dual quantization passes inquant_dualhad to scan large(B*T, C)activation/gradient tensors twice (pass 1 global max reduction + pass 2 quantize+transpose), duplicating memory traffic across QKV/proj/MLP/norm/RoPE/VE boundaries. 2. Linear weight gradients (dy_fp8.t() @ x_fp8) wrote BF16 outputs followed by Inductor BF16->FP32 cast/copy wrapper kernels for FP32 parameter.gradbuffers (Float8Linearweights). - Changes ([csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py), [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py)): 1. Addedquant_dual_from_amaxand*_amaxvariants (rmsnorm_fwd_amax,add_rmsnorm_fwd_amax,rmsnorm_add_bwd_amax,resid_x0_norm_fwd_amax,add_resid_x0_norm_fwd_amax,add_resid_x0_norm_bwd_amax,sub_scale_rmsnorm_fwd_amax,add_sub_scale_rmsnorm_fwd_amax,sub_scale_rmsnorm_bwd_amax,rope_qknorm_fwd_v2_amax,ve_mix_fwd_amax,ve_mix_bwd_amax,relu_sq_quant_dual_amax,relu_sq_bwd_quant_dual_amax), computing row/blockabsmaxinline during upstream producer/consumer kernels and threading amax tags toquant_dual_from_amax(NANOCHAT_OPT_AMAX_FUSE=1). Verifiednvcc -Xptxas -v0Bstack/spill across checkedsm_90kernels and added explicitemit_tag+ctx.mark_non_differentiable(tag)/want_pairguards soAOTAutogradnever materializesfull([1], 0)intoquant_dual_from_amaxwhen a tail tag is unused. 2. AddedNANOCHAT_OPT_FP8_WGRAD_FP32=1emitting_scaled_mm(..., out_dtype=torch.float32)directly when weight.dtype == torch.float32, eliminating BF16->FP32 cast kernels (confirmed viaTORCH_LOGS="output_code"). - Unit, Graph & Ablation Verification: -scratch/test_r8_amax.py+TORCH_LOGS="aot_graphs,output_code": verified[1/5]_scaled_mmFP32 (fa=False/True),[2/5]quant_dual_from_amaxvsquant_dual,[3/5]all 12*_amaxCUDA+Meta ops,[4/5]GPT eager/compiled parity + 2-stepMuonAdamW+ fallback toggles + non-FP8,[5/5]exact 4-layer dispatch counts (quant_dual_from_amax: 27,quant_dual: 6). -bench/bench.py timeablations: - R7B +FP8_WGRAD_FP32=1:0.8597s/upd (1.1605x,304,939tok/s, peak89.06GiB, windows[0.8554, 0.8611, 0.8626]) - R7B +AMAX_FUSE=1:0.8469s/upd (1.1781x,309,549tok/s, peak89.06GiB, windows[0.8436, 0.8467, 0.8503]) - R7B +AMAX_FUSE=1+FP8_WGRAD_FP32=1:0.8462s/upd (1.1790x,309,805tok/s, peak89.05GiB, windows[0.8429, 0.8473, 0.8483]) - Round 8 Measurements & Verdict (R7B +NANOCHAT_OPT_AMAX_FUSE=1+NANOCHAT_OPT_FP8_WGRAD_FP32=1): -bench/bench.py time --paired(/tmp/time-r8):0.8452s/update (windows[0.8427, 0.8465, 0.8464],310,152tok/s, startup+compile35.3s, wall66.1s,peak_memory_allocated_gib: 89.05GiB) vs paired reference0.9977s/update ([0.9931, 1.0006, 0.9994],262,753tok/s, startup132.4s) —1.1804xvs frozen reference (0.9977),1.1785xvs paired reference (-18.0 ms/updatevs R7B). -bench/bench.py check --skip-timing(/tmp/scheck-r8):PASS(N1,exact_items_ok=true,verdict=equivalent) — max endpoint deviation0.3100 sigma([0.0198, 0.2663, 0.2700, 0.3100, 0.2517, 0.2399]sigma <=3.0 sigma),89.05GiB peak alloc, record wall49.2s. ---
6.3 hRound 9A (`NANOCHAT_OPT_OPTIM_V2=1` + Parallel VE/CE Reductions + Tail `x0` Elimination)
- Root Causes Attacked: 1. Inductor-compiledadamw_step_fusedandmuon_step_fusedpre/post-polar elementwise/norm kernels +cat/torch.compilewarmup overhead in optimizer step (nanochat/optim.py): replaced with pure-CUDAadamw_step_cuda(adamw_vec8_kernel+ scalar fallback) andmuon_update_v2_cuda(muon_pre_pass1a/1b/scale, BF16 in-placebmm_out+pe_axpby_inplacePolar Express,muon_post_row_sq/col_sq/norm/update) in [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) + [nanochat/optim.py](file:///submission/nanochat/nanochat/optim.py) underNANOCHAT_OPT_OPTIM_V2=1. 2.softcap_ce_fwdandve_mix_bwdsingle-block reductions + zeroing allocations: replaced with 2-stage parallel reductions (softcap_ce_reduce_part1_kernel/part2_kernel,ve_bwd_reduce_dw_kernelwithcudaMemsetAsync). 3. Final transformer layer (i == n_layer - 1)x0_nextunnecessary autograd tracking: gatedemit_x0=(i < n_layer - 1)withctx.set_materialize_grads(False)andctx.mark_non_differentiablein [nanochat/gpt.py](file:///submission/nanochat/nanochat/gpt.py). - Round 9A Measurements & Verdict (R8 +NANOCHAT_OPT_OPTIM_V2=1): -bench/bench.py time --paired(/tmp/time-r9a-paired):0.8423s/update (windows[0.8396, 0.8429, 0.8444],311,220tok/s, startup+compile24.2s, wall54.7s,peak_memory_allocated_gib: 89.06GiB) vs paired reference0.9970s/update ([0.9922, 0.9979, 1.0007],262,942tok/s, startup132.6s) —1.1845xvs frozen reference (0.9977),1.1818xvs paired reference (-2.9 ms/updateover R8,-11.1scompile startup). -bench/bench.py check --skip-timing(/tmp/scheck-r9a):PASS(N1,exact_items_ok=true,verdict=equivalent) — max endpoint deviation0.2518 sigma([-0.0896, 0.1791, 0.2245, 0.2518, 0.2090, 0.2409]sigma <=3.0 sigma),89.05GiB peak alloc, record wall38.8s. - Profile (/tmp/prof-r9a,from=12, iters=2,842.06 ms/updGPU kernel sum): GEMM456.25 ms/u (54.2%), Custom/FP8/Fused228.42 ms/u (27.1%)(fp8_quant_dual_64x6488.58 ms/u,fp8_amax_part130.94 ms/u,add_resid_x0_norm_bwd_19218.08 ms/u), FA3111.11 ms/u (13.2%), NCCL32.02 ms/u (3.8%), ATen/Other12.25 ms/u (1.5%)(pe_axpby_inplace4.18 ms/u), Inductor Triton2.01 ms/u (0.2%). ---
6.3 hRound 9B (`288922b`: `NANOCHAT_OPT_QKV_LT=1` + `SOFTCAP_CE_V2=1` + `NORM_BWD_1BAR=1`)
- Started: ~2026-11-20T16:10Z | Committed:288922b- Profile Baseline (/tmp/prof-r9a,from=12, iters=2,842.06 ms/upd): -qkvbackward dx summed 3 separate_scaled_mmoutputs (q_dx, k_dx, v_dx) viasum3_bf16/sum3_add_col_bf16. -softcap_ce_fwd,softcap_ce_bwd_amax,softcap_ce_bwd_quant_dualhad room for fast math (fast_ex2f/fast_tanhf), deferred global scale, and128x64vector tiling. -add_resid_x0_norm_bwd_192,resid_x0_norm_bwd_192,sub_scale_rmsnorm_bwd_192used 2 block barriers per row. - Changes ([csrc/setup.py](file:///submission/nanochat/csrc/setup.py), [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py)): 1.NANOCHAT_OPT_QKV_LT=1: Cached thread-safecuBLASLtFP8 QKV backward accumulation (v -> k -> qwithbeta = 0.0f, 1.0f, 1.0f, up to 32 MiB workspace) +add_col12_inplace_kernel, eliminating 3 intermediate dx buffers andsum3_*kernels (96calls/upd). 2.NANOCHAT_OPT_SOFTCAP_CE_V2=1:softcap_ce_fwd_rows_v2_kernel<128>,softcap_ce_bwd_amax_v2_kernel<256, 6, true>,softcap_ce_bwd_quant_dual_128x64_fast_kernel<6>. 3.NANOCHAT_OPT_NORM_BWD_1BAR=1: Race-free 1-barriers_w[2][6]ping-pong inresid_x0_norm_bwd_192,add_resid_x0_norm_bwd_192,sub_scale_rmsnorm_bwd_192and*_amaxvariants. - Round 9B Measurements & Verdict (/submission/switches.json21 flags active): -bench/bench.py time --paired(/tmp/time-r9b):0.8343s/update (windows[0.8314, 0.8344, 0.8370],314,215tok/s, startup23.3s, wall53.4s) vs paired reference0.9975s/update ([0.9916, 1.0008, 1.0001]) —1.1959xvs frozen ref,1.1927xvs paired ref. -bench/bench.py profile(/tmp/prof-r9b):sum3_*eliminated;add_resid_x0_norm_bwd_19236.155ms -> 34.704ms(2 updates);softcap_ce_bwd_quant_dual18.456ms -> 17.032ms(2 updates). - Fullbench/bench.py check(/tmp/check-r9b/check.json):PASS(N1),speedup: 1.1987x(candidate_mean_s_per_update: 0.8323vs0.9977frozen ref, windows[0.8285, 0.8329, 0.8356],314,943tok/s,peak_memory_allocated_gib: 89.06),exact_items_ok=true,verdict=equivalent, max endpoint deviation0.2581 sigma([-0.0438, +0.1841, +0.1596, +0.1980, +0.2581, +0.1986]<=3.0 sigma). ---
8.1 hRound 10A (`NANOCHAT_OPT_SCALED_MM_LT=1`: Hopper `cublasLt` FP8 GEMM Tile/Cluster Tuning) · continuation
- Root Causes Attacked: -Model: GEMM (nvjet)(440.55 ms/u,53.7%of step time in/tmp/prof-r9b) usedtorch._scaled_mmdefaultcublasLtheuristic algorithms (many falling back to192x192or default clusters without shape-specific Hopper CGA cluster/tile/swizzle tuning). - Changes ([csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py),/submission/switches.json): 1. GeneralizedLtPlanKey/LtImmPlan/run_lt_fp8_gemm/get_or_create_lt_plan_extin [csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu) with cached workspace (get_lt_workspace) and Hopper SM90 algorithm overrides (lookup_hopper_lt_override) across all D24 FP8 GEMM shapes (tuned via heuristic + symmetric forward/reverse interleaved H2H verification atM=65536: FWD{66,201,36,1,1,2,5}for1536x1536andlm_head,{66,201,36,1,0,0,5}for1536->6144,{66,29,36,1,0,3,3}for6144->1536; DX{66,29,36,1,0,7,3}/{66,29,36,1,0,5,2}for1536x1536b0/b1,{66,29,36,1,0,5,5}for6144->1536,heur0forlm_headDX; DW{66,184,36,1,0,6,2},{66,184,36,1,0,4,5},{66,165,36,1,0,4,2}). 2. Addedscaled_mm_lt(fp8_fast::scaled_mm_ltCUDA + Meta + Autograd fallthrough) and gated dispatch via_fast_scaled_mmin [nanochat/fp8.py](file:///submission/nanochat/nanochat/fp8.py) underNANOCHAT_OPT_SCALED_MM_LT=1(callingtorch.ops.fp8_fast.scaled_mm_ltfor AOTAutograd FakeTensor safety). Rebuilt & installedfp8_fastinto/opt/candidate-env. - Verification, Profiling & Verdict (/submission/switches.json22 flags active): - Unit parity (/tmp/test_r10a_lt.py, deleted after run):max_diff=0.000e+00,qkv_bwd_gx rel_diff=0.000e+00. -bench/bench.py check --quick:exact_items_ok=true,NOT_BITWISE(wall_s: 39.6s,peak_memory_allocated_gib: 89.08). -bench/bench.py time --paired:0.8250s/update (windows[0.8220, 0.8260, 0.8271],317,734tok/s, startup23.9s,peak_memory_allocated_gib: 89.09GiB) vs paired reference0.9963s/update ([0.9913, 0.9975, 1.0002]) —1.2084xvs frozen ref,1.2060xvs paired ref (-9.3 ms/updateover R9B paired timing). -bench/bench.py check --n1:PASS(N1,verdict=equivalent) — max endpoint deviation+0.2849 sigma([-0.0259, +0.1742, +0.2849, +0.2107, +0.1786, +0.1266]sigma <=3.0 sigma). -bench/bench.py profile(/tmp/prof-r10a):Model GEMM (nvjet)dropped440.55 -> 432.39 ms/u(-8.16 ms/u). ---
8.1 hRound 10B (`NANOCHAT_OPT_OPTIM_PE_FUSE=1` + `OPTIM_BMM_LT=1` + `OPTIM_VE_COALESCE=1` + `OPTIM_TAIL_SPLIT=1`) · continuation
- Profile Baseline (/tmp/prof-r10a): -Optimizer.stepcritical path: serial Polar Expresspe_axpby(4.24 ms/u) +bmm_out,12xuncoalescedvalue_embeds(32768, 1536)bf16reduce_scatter/all_gather, and unsplitmproj(24, 6144, 1536)exposing a full2.41 msall_gather+0.46 msunstacktail after the final Muon BMM. - Changes ([csrc/fp8_fast.cu](file:///submission/nanochat/csrc/fp8_fast.cu), [nanochat/optim.py](file:///submission/nanochat/nanochat/optim.py),/submission/switches.json): 1.NANOCHAT_OPT_OPTIM_PE_FUSE=1: Addedpe_axpby_diag_vec_kernel+ BF16 HoppercublasLtBMM path inmuon_update_v2_cuda(fp8_fast.cu), fusingb*X + c*XX^Tinto a single pass across Polar Express iterations. 2.NANOCHAT_OPT_OPTIM_BMM_LT=1: Tuned BF16 strided batchedcublasLtoverrides (lookup_hopper_lt_bmm_override) across Muonm1536(B=48),mfc(B=12), andmproj(B=12/8/4). 3.NANOCHAT_OPT_OPTIM_VE_COALESCE=1: Coalesced large AdamWreduce_scatterandall_gatherlaunches viadist._coalescing_managerin_reduce_adamw/_compute_adamw(use_ag_cm = coalesce and n_large >= 2). 4.NANOCHAT_OPT_OPTIM_TAIL_SPLIT=1: Split finalmprojgroup (24matrices ->[16] + [8]) so the16-matrixall_gatheroverlaps with the remaining8-matrix Polar Express compute without affecting early tiny/mid schedules. - Verification, Profiling & Verdict (/submission/switches.json26 flags active): - Distributed 2-GPU parity (/tmp/test_optim_dist_r10b.py, deleted after run): PASS (AdamW max_diff=0.00e+00,Muon rel <= 8.35e-4). -bench/bench.py check --quick:exact_items_ok=true,NOT_BITWISE(wall_s: 39.7s,peak_memory_allocated_gib: 89.08). -bench/bench.py time --paired:0.8225s/update (windows[0.8202, 0.8226, 0.8246],318,728tok/s, startup25.2s,peak_memory_allocated_gib: 89.09GiB) vs paired reference0.9982s/update ([0.9941, 1.0003, 1.0002]) —1.212xvs frozen ref,1.212xvs paired ref (-2.5 ms/updateover R10A). -bench/bench.py check --n1:PASS(N1,verdict=equivalent) — max endpoint deviation0.6411 sigma([0.1132, 0.5503, 0.6411, 0.4852, 0.3774, 0.3207]sigma <=3.0 sigma). -bench/bench.py profile(/tmp/prof-r10b):Opt clusterspan dropped36.38ms -> 33.88ms(pe_axpby4.241 -> 1.408 ms/u,AllGather_RING_LL36x -> 16x,ReduceScatter_bf1626x -> 4x). ---
8.1 hRound 10C (`NANOCHAT_OPT_SOFTCAP_CE_V3=1` + `ROPE_V3=1` + `QUANT_V2=1`, Commit `f4a2fc8`) · continuation
- Root Causes Attacked: 1.softcap_cebackward recomputedamaxin a separate full read overraw_logits([65536, 32768]) before dual quant:NANOCHAT_OPT_SOFTCAP_CE_V3=1computes unscaledamax_uinline duringsoftcap_ce_fwd_rows_v3b_kernel+softcap_ce_reduce_v3_part1/2(reconstructed via scalar factor in backward) and widens backward dual quant tosoftcap_ce_bwd_128x128_v3b_kernel<256, 6>, eliminating the extra4 GiBbackwardamaxscan. 2.rope_qknorm_bwd: replacedrope_qknorm_bwd_d128_v2_kernel(~20.2 ms/u) withrope_qknorm_bwd_d128_tok192_h12_kernelunderNANOCHAT_OPT_ROPE_V3=1(14.92 ms/u). 3.quant_dual/quant_dual_from_amax/relu_sq_quant_dual(64x64tiles withuint2row writes): added 512-thread128x128vectorizeduint4dual-quant kernel (fp8_qd_128x128_vec16_kernel, swizzled SMEM transpose + grid swizzle forOP_MODE=1) underNANOCHAT_OPT_QUANT_V2=1. - Verification & Profiling (/submission/switches.json29 flags active): -cuobjdump --dump-resource-usage: verifiedSTACK:0 LOCAL:0onfp8_qd_128x128_vec16_kernel(32–35 regs),rope_qknorm_bwd_d128_tok192_h12_kernel(59–64 regs),softcap_ce_fwd_rows_v3b_kernel(54 regs), andsoftcap_ce_bwd_128x128_v3b_kernel(40 regs). -bench/bench.py time --paired(/tmp/time-r10c):0.8171s/update (windows[0.8148, 0.8174, 0.8190],320,838tok/s, startup+compile25.2s,peak_memory_allocated_gib: 89.09GiB) vs paired reference0.9969s/update ([0.9915, 0.9990, 1.0002]) —1.2200xvs frozen ref,1.2169xvs paired ref (-5.4 ms/updateover Round 10B). -bench/bench.py check --n1(/tmp/n1-r10c/check.json):PASS(N1,verdict=equivalent) — max endpoint deviation0.5994 sigma([0.2045, 0.5994, 0.5772, 0.4549, 0.3801, 0.3453]sigma <=3.0 sigma). -bench/bench.py profile(/tmp/prof-r10c,from=12, iters=2,806.46 ms/uGPU span =798.75 msactive +7.71 msidle gaps): -GEMM/BMM452.52 ms/u (55.0%)(includingDX 1536->6144missing override1093.2 us/c=52.5 ms/uvsDX 6144->1536925.4 us/c&FWD849.0 us/c, pluslm_headDX/DW heuristic ~4.56 ms/c) -FP8_quant119.57 ms/u (14.5%)(led byrelu_sq_bwd_quant_dualstill on64x64:16.99 + 27.71 = 44.85 ms/u,relu_sq_quant_dual28.75 ms/u,145serial per-update weight misses2.95 ms/u) -FA3114.60 ms/u (13.9%),RMSNorm50.39 ms/u,NCCL27.78 ms/u,RoPE_QKNorm24.56 ms/u,VE_or_Sort9.23 ms/u,Softcap_CE7.70 ms/u,Opt_CUDA6.01 ms/u,AccumulateGrad add_3.28 ms/u,Memset1.61 ms/u(954x/u), inter-kernel GPU idle gaps7.71 ms/u. ---