Gemini 4 Carbon 2.22×
Harness: Antigravity · switches: OPT_FAST_OPTIM=1 OPT_FUSED_ADAM_BF16=1 OPT_FAST_DDP=1 OPT_DDP_BUCKET_MB=128 OPT_FUSED_RMSNORM=1 OPT_FUSED_SUBLN_SWIGLU=1 OPT_FUSED_LOSS=1 OPT_FUSED_RETENTION=1 OPT_FAST_GRAD_SYNC=1 OPT_MERGED_PROJ=1 OPT_PIPELINED_TAIL=1 OPT_OSS_PIPE_CHUNKS=8 TORCH_NCCL_HIGH_PRIORITY=1 OPT_FAST_KERNELS_V2=1 OPT_DIRECT_DDP_BUCKETS=1 OPT_OSS_IPC_DMA=1 OPT_OSS_IPC_SLICES=28 OPT_IPC_TAPERED=1 OPT_SPARSE_EMB_SYNC=1 OPT_FAST_CUBLASLT=1 OPT_FAST_CUBLASLT_V2=1 OPT_FAST_RMS_BWD_V3=1 OPT_IPC_ALLREDUCE=1 OPT_IPC_AR_CTAS=528 OPT_FUSED_CROSS_QKV=1 OPT_ADAM_READ_G16=1 OPT_SM90_FLASH_RETENTION=1 OPT_VEC_U4_ROPE_PREP=1 OPT_FUSED_CROSS_ATTN=1 OPT_SHARDED_L2NORM=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 (105 min); the judged result is the continuation's. The time axis leaves out the held time of both segments.
- Judged
- 2.22×
- Tier
- N1
- Self-best
- 2.25×
- Rounds
- 14
- Hours
- 10.0
- API cost
- $113
- Input tokens · 95.3% cached
- 225 M
- Output tokens
- 1.4 M
- Requests
- 760
- Cross-GPU exchange via CUDA IPC + copy engine (no SMs)
- ✓ round 10
OPT_OSS_IPC_DMA, weight exchange as 24 copy-engine slices, optimizer tail 31.65 → 18.25 ms, 1.895× → 2.058×; round 12OPT_IPC_ALLREDUCEdoes grad ReduceScatter + AllGather on the copy engine (backward + reduction standalone 54.39 → 46.66 ms), that round with cuBLASLt 2.087× → 2.206× (both full check); still exchanges fp32 master weights - Forward / backward CUDA graph
- ✗ not in the log; fusion cut main-stream kernels per step from 3,233 (round 4 profile) to 1,017 (round 14)
- Newer cuBLAS
- ✗ no library swap, still PyTorch 2.3.1's bundled cuBLAS 12.1; round 12
OPT_FAST_CUBLASLTbypassestorch.mmto call cuBLASLt with per-shape preselected algorithms, with RMSNorm backward 2.085× → 2.100×; round 13 2×1 cluster for ffn2 forward (4.09 → 3.82 ms) - Retention / attention kernel swap
- ✓ round 4
OPT_FUSED_RETENTIONhand-written CUDA retention (13 layers fwd + bwd standalone 38.90 → 5.76 ms), full check 1.578× → 1.680×; round 14OPT_SM90_FLASH_RETENTIONhand-written sm_90a WGMMA flash retention (standalone 3.91 → 2.68 ms, 624 MB fewer saved activations), that round (four items) full check 2.194× → 2.225×; attention kernel not swapped, only projections and RoPE folded into one autograd node with it - Other main levers
- round 1
OPT_FAST_OPTIM(dead zeroing removed, norm on bf16, bidirectional exchange, merged stat sync) → 1.28× (N0); round 2 inline-PTX Adam bitwise-equal to Apex, also writing bf16 → 1.37× (N0); round 3 hand-written CUDA residual + RMSNorm, subln + SwiGLU, cross-entropy, 1.37× → 1.58×; round 6OPT_MERGED_PROJshared-storage merged projections, 1.70× → 1.78×; round 9 C++ comm hook + dW written straight into DDP buckets, 1.84× → 1.89×; round 11 embedding grads exchange only the used 12.6 MB (−2.15 ms); round 13 Adam reads bf16 grads
Raw work log16 sections
-8.0 hRound 1: Baseline Profiling & Post-Backward Optimizer / OSS Broadcast Pipeline (`OPT_FAST_OPTIM`)
- Start time: 2026-11-19T19:30:24Z (resumed 2026-11-20T03:12:56Z) - Baseline Profile (/tmp/r1/profile): - Steady-state instrumented step: ~260.2 ms(1.47 sover 5 updates; GPU busy74.6%, kernel sum1256.4 ms/ 5 updates =251.3 ms/update). - Kernel categories (5 updates):nccl380.6 ms(30.3%),gemm327.5 ms(26.1%),memcpy/cast218.9 ms(17.4%),elementwise153.5 ms(12.2%),optimizer (multi_tensor)91.5 ms(7.3%),flash-attention29.7 ms(2.4%),reduce19.3 ms(1.5%),triton13.8 ms(1.1%),jiterator (swiglu)11.2 ms(0.9%),loss8.8 ms(0.7%). - Single-step GPU timeline (train_step-6,260.2 ms): -zero_grad(p32.grad.zero_()):4.8 ms(dead store: overwritten before read — *missed fast path*). -forward:59.3 ms(self_decoder40.1 ms[of whichself.mixerGateRetention26.8 ms,self.ffn6.5 ms],cross_decoder15.8 ms[cross.mixer4.5 ms,cross.ffn6.4 ms],output_projection1.6 ms,criterion1.5 ms). -backward+ overlapped DDPall_reduce:103.6 ms. - Post-backwardclip-grads+optimizer+OSS broadcast+fp32->bf16 sync:90.9 ms(34.9%of step;95.7 ms=36.8%incl.zero_grad): -clip-grads(_sync_fp16_grads_to_fp32240 loop copies + fp32 L2 norm +_check_grad_normsall_reduce/sync):15.5 ms. -_unscale_grads(240 loopmul_kernels):12.7 ms. -FusedAdamV2.step:14.5 ms. -OSS._broadcast_params(cuda.synchronize()+ 2 serialdist.broadcastcalls over NV18):37.1 ms(*configuration/backend bottleneck: half-duplex serial broadcasts*). -_sync_fp32_params_to_fp16(240 loopcopy_kernels + end-of-step.item()metric syncs):12.2 ms. - Change (OPT_FAST_OPTIM=1): - Eliminate deadp32.grad.zero_()inFP16Optimizer.zero_grad(). - Compute L2 grad norm directly onbf16gradients viamulti_tensor_total_norm(verified bitwise identical tofp32), fusebf16 -> fp32copy + unscale/clip multiply into a singleamp_C.multi_tensor_scalecall. - ReplaceOSS._broadcast_params(cuda.synchronize()+ 2 serialdist.broadcast) with non-blocking full-duplexdist.batch_isend_irecvover bidirectional NV18, overlapping local shardtorch._foreach_copy_(my_p16, my_p32)with P2P transfer, followed bytorch._foreach_copy_(peer_p16, peer_p32). - PackTrainer._fast_stat_sync_suminto 1all_reducereturning Python floats and skip redundant_check_grad_normsall_reducewhen finite, removing end-of-step GPU syncs and fp64 meter kernels. - Expected numerics tier: N0 (bitwise identical). - Timing result (/tmp/r1/time/time.json): -s_per_update:0.1847s (vs frozen reference0.2357s; windows[1.850, 1.844]s, range0.003). -speedup_vs_frozen_reference:1.2803x(beyond_reference_noise: true). -peak_memory_allocated_gib:61.75GiB. - Quick check result (/tmp/r1/quick/check.json): -status:PASS,measured_tier:N0,bitwise_identical:9616 / 9616,exact_failures:0. - Commit: promotedOPT_FAST_OPTIM=1to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T03:40:15Z ---
0.1 hRound 2: Profile `OPT_FAST_OPTIM=1` & Eliminate Remaining Copy/DDP/Optimizer Memory Traffic (`OPT_FAST_DDP` + `OPT_FUSED_ADAM_BF16`)
- Start time: 2026-11-20T03:40:20Z - Profile (/tmp/r2/profile): - Instrumented steady-state cycle:188.64 ms(GPU busyrose from74.6%->81.1%;phase:clip-grads54.4 ms->3.7 ms,phase:optimizer243.4 ms->53.8 ms; all CPU stalls inside forward removed). - Kernel categories (5 updates,1040.9 mstotal):gemm327.3 ms(31.4%),nccl259.9 ms(25.0%),memcpy/cast181.9 ms(17.5%),optimizer (multi_tensor)116.6 ms(11.2%),elementwise70.2 ms(6.7%),flash-attention30.0 ms(2.9%),reduce19.3 ms(1.9%),triton13.8 ms(1.3%),swiglu11.4 ms(1.1%),loss8.8 ms(0.8%). - Stream 7 (compute) 1-cycle breakdown (188.64 mswall): -forward+loss:37.51 mswall (33.76 mskernels across1460launches; GEMM~21.4 ms, FlashAttn1.64 ms, non-GEMM norms/retention/swiglu/loss~14.5 ms). -backward:98.59 mswall (85.99 mskernels across3459launches; GEMM~43.6 ms, FlashAttn~4.4 ms,Memcpy DtoD5.21 ms[*missed fast path: DDPgradient_as_bucket_view=False+25 MBbuckets = 119all_reduces*], non-GEMM elementwise/norms/retention~45 ms). -clip-grads:3.88 mswall (2.86 msL2NormFunctor<bf16>). -optimizer+sync:48.67 mswall (14.23 msFusedAdam[82 launches],12.78 msdirect_copy_kernel[*missed fast path:torch._foreach_copy_(bf16, fp32)falls back to a 240-kernel loop for mixed dtypes, and contends with NVLink P2P*],6.20 msScaleFunctor[165 launches],21.19 msP2P SendRecv). - Action: Builtyoco_cuda_ext(sm_90) single-launch vectorizedfused_adam_bf16(inline-PTX matching ApexAdamFunctorSASS bit-for-bit, verifiedmax_diff=0.0, writesmy_p16inside Adam eliminating6.9 GBHBM re-read + P2P bandwidth contention) + single-launchfp32->bf16copy forpeer_p16+ single-launchbf16->fp32grad scale, plus DDPgradient_as_bucket_view=TrueandOPT_DDP_BUCKET_MB=100(OPT_FAST_DDP=1). - Timing result (/tmp/r2/time/time.json): -s_per_update:0.1729s (windows[1.728, 1.729]s, range0.0006). -speedup_vs_frozen_reference:1.3677x(beyond_reference_noise: true). -peak_memory_allocated_gib:61.75GiB (reserved:62.24GiB, down from63.31GiB). - Full check verdict (/tmp/r2/check/check.json): -status:PASS,performance.speedup:1.37x(0.1726s/update vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (1.37 > 1.0398). Gate 2: PASS (N0,9616 / 9616tensors bitwise identical). Gate 3: PASS (equivalent, all 6 trajectory endpoints within3σ). - Commit:85c7af2— promotedOPT_FUSED_ADAM_BF16=1,OPT_FAST_DDP=1,OPT_DDP_BUCKET_MB=100to/submission/switches.json. - End time: 2026-11-20T04:06:57Z ---
0.6 hRound 3: Profile `1.37x` Tree & Fuse Norms + Residuals + SubLN-SwiGLU + Cross-Entropy (`OPT_FUSED_RMSNORM`, `OPT_FUSED_SUBLN_SWIGLU`, `OPT_FUSED_LOSS`)
- Start time: 2026-11-20T04:06:57Z - Profile (/tmp/r3/profile): - Host time per update:0.174 s(GPU busy79.2%, kernel sum916.7 msover 5 updates =183.3 ms/update). - Kernel categories (5 updates):gemm322.3 ms(35.2%),nccl230.8 ms(25.2%),memcpy/cast129.0 ms(14.1%),optimizer78.3 ms(8.5%),elementwise70.1 ms(7.6%),flash-attention31.7 ms(3.5%),reduce18.7 ms(2.0%),triton13.8 ms(1.5%),swiglu10.7 ms(1.2%),loss8.9 ms(1.0%). - Top remaining hotspot class: ~1,550memory-bound forward/backward kernels per update across 54 affineRMSNorms + 52 residual adds (~25+ ms/upd), 13GateRetention(cross + inner) + subln + transpose + swigluchains (~5 ms/upd), andCrossEntropyCriterionfp32log_softmax+nll_loss(~3 ms/upd+2.46 GBtraffic). - Action: - Added deterministicsm_90CUDA kernels incsrc_ext/model_kernels.cu(compiled without--use_fast_mathfor IEEE-754 fp32 accuracy; verified against fp64 gold): 1.OPT_FUSED_RMSNORM=1:fused_rms_norm_fwd/_bwd(fuses pre-norm residual add +RMSNorm, plus parallelkv_layer_norm+layers[0].mixer_layer_normatCrossDecoderentry, deterministic 2-stagedwreduction without atomics, cachedrel_pos). Microbenchmark: 53× fwd+bwd =2.95 ms. 2.OPT_FUSED_SUBLN_SWIGLU=1:fused_add_subln_swiglu_fwd/_bwd(warp-shuffle register kernel fusingcross + inner,subln(128),.transpose(1, 2), andswiglu(g, o)). Microbenchmark: 13× fwd+bwd =0.50 ms. 3.OPT_FUSED_LOSS=1:fused_cross_entropy_fwd/_bwd(online-softmax directly on[2048, 100288]bf16logits without materializingfp32lprobs). Microbenchmark: 1× fwd+bwd =0.42 ms. - Expected numerics tier: N1 (deterministic, unchanged dtypes/accumulation precision). - Timing result (/tmp/r3/time/time.json): -s_per_update:0.1494s (windows[1.494, 1.494]s, range0.0003). -speedup_vs_frozen_reference:1.5828x(beyond_reference_noise: true). -peak_memory_allocated_gib:58.84GiB (down from61.75GiB!). - Full check verdict (/tmp/r3/check/check.json): -status:PASS,performance.speedup:1.5775x(0.1499s/update vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (1.5775 > 1.0398). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0). Gate 3: PASS (equivalent, max endpoint drift0.405σ<=3.0σ). - Commit: promotedOPT_FUSED_RMSNORM=1,OPT_FUSED_SUBLN_SWIGLU=1,OPT_FUSED_LOSS=1to/submission/switches.jsonand committed to/submission/yoco. - End time: 2026-11-20T04:29:30Z ---
1.0 hRound 4: Profile `1.58x` Tree & Full CUDA Fusion of `GateRetention` + Interleaved RoPE (`OPT_FUSED_RETENTION`)
- Start time: 2026-11-20T04:29:40Z - Profile (/tmp/r4/profile): - Host time per update:0.150 s(GPU busy70%, kernel sum832.1 msover 5 updates =166.4 ms/update). - Kernel categories (5 updates):gemm333.0 ms(40.0%),nccl244.3 ms(29.4%),optimizer78.3 ms(9.4%),memcpy/cast60.4 ms(7.3%),elementwise35.3 ms(4.2%),flash-attention32.8 ms(3.9%),other16.9 ms(2.0%),triton14.1 ms(1.7%),swiglu11.3 ms(1.4%),reduce5.7 ms(0.7%). - Single-step timeline (train_step-6,149.67 msGPU cycle): -forward + loss:28.61 ms(self_decoder15.62 ms[self.mixerGateRetention9.37 msGPU,32.33 msCPU vscross.mixerFlashAttn3.65 msGPU],cross_decoder10.06 ms,output_projection + loss1.86 ms). -backward + DDP:75.92 ms(~47.1 msGEMMs,~4.9 msFlashAttn bwd,~21.8 msunfusedGateRetentionelementwise/strided-copy/RoPE/cumsum/Triton ops + norms/SwiGLU). -post-backward:45.14 ms(1.57 msCPU-sync/launch gap +3.30 msL2NormFunctor[165 launches] +0.69 ms.item()sync +5.19 msbf16->fp32grad scale +12.79 msfused_adam_bf16+19.14 msOSSP2P +2.44 msfp32->bf16peer copy). - Screened multi-chunk pipelining ofAdam + OSS P2P(K = 2..12chunks,TORCH_NCCL_HIGH_PRIORITY=1, and CUDA IPC CE DMA):fused_adam_bf16already sustains4,013 GB/s(95%of Hopper's4,242 GB/sHBM bandwidth), so overlappingP2PwithAdamsaves only1.2–1.9 msdue to HBM bandwidth contention; deferred in favor ofGateRetentionfusion (33.1 msmicrobenchmark savings). - Action (OPT_FUSED_RETENTION=1): - Implemented deterministicsm_90CUDA kernels incsrc_ext/model_kernels.cuandFusedGateRetentionFn/FusedInterleavedRoPEFninfused_ops.py: 1.fused_gt_cumsum_fwd/bwd: fusesgttranspose +logsigmoid(gt)/16+fp32prefix/suffix scan +cross_decay. 2.fused_qkv_rope_scale_fwd/bwd: single warp-per-headuint2vectorized kernel fusingq, kinterleaved RoPE,k * 128**-0.5, transpose to contiguous[B, H, N_c, 256, 128], andq_scaled/v_scaledexponential decay scaling (plus deterministicdg_qvwarp reduction in bwd). 3.fused_chunk_recurrent_fwd/bwd&fused_inner_mask_fwd/bwd: replaces Triton recurrence +@torch.compileinner_chunkcausal decay mask (zero cold-compile overhead, zero atomics via 4-strip register column accumulation + warp row reduction). 4.fused_rope_interleaved: replaces Tritonrotary_kernelinCrossAttentionandCrossDecoder(max_diff = 0.0bitwise identical). - Standalone check (test_fused_retention.py): 100% bitwise deterministic across runs;dk/dgtcloser tofp64gold than upstream; 13×GateRetentioncore fwd+bwd dropped from38.90 ms->5.76 ms(-33.14 ms). - Expected numerics tier: N1 (deterministic, unchanged dtypes/accumulation precision). - Timing result (/tmp/r4/time/time.json): -s_per_update:0.1415s (windows[1.415, 1.415]s, range0.0006;checkcand run:0.1408s, windows[1.406, 1.409]s). -speedup_vs_frozen_reference:1.6712x(check:1.6795x,beyond_reference_noise: true). -peak_memory_allocated_gib:58.38GiB (down from58.84GiB;3.37GiB below reference61.75GiB). - Full check verdict (/tmp/r4/check/check.json): -status:PASS,performance.speedup:1.6795x(0.1408s/update vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (1.6795 > 1.0398). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true). Gate 3: PASS (equivalent, max endpoint drift0.124σ<=3.0σ). - Commit: promotedOPT_FUSED_RETENTION=1to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T05:05:30Z ---
1.6 hRound 5: Profile `1.68x` Tree & Optimize DDP Gradient Reduction / Single-Launch L2Norm / Deferred Stat Sync (`OPT_FAST_GRAD_SYNC`)
- Start time: 2026-11-20T05:05:35Z - Profile (/tmp/r5/profile): - Host time per update:0.143 s(GPU busyrose from70%->79%; Stream 7 kernel launches/update dropped from3,233->2,258;CPU forwarddropped from43.97 ms->21.83 ms;self_decoderGPU fwd dropped from15.62 ms->12.95 ms). - Kernel categories (5 updates):gemm334.6 ms(42.0%),nccl238.3 ms(29.9%),optimizer78.9 ms(9.9%),memcpy/cast39.6 ms(5.0%),flash-attention33.1 ms(4.2%),elementwise30.3 ms(3.8%),other27.6 ms(3.5%),swiglu11.4 ms(1.4%),reduce3.3 ms(0.4%). - Top remaining gradient-sync / norm waste identified from trace: 1. **DDP post-AllReduce/ world_size(* 0.5) loop**:240AUnaryFunctor<bf16, Mul>launches per update (22.89 ms / 5 = 4.58 ms/update,13.8 GBHBM traffic during backward) dividing every parameter'sbf16gradient by2, immediately undone byTrainer.train_stepmultiplying by2.0 / sample_size. 2. Post-backward host sync + 165-launchmulti_tensor_l2norm:_fast_stat_sync_sum.cpu()blocked CPU until GPU finished backward + DDP, leaving GPU idle for1.22 mswhile CPU launched165L2NormFunctorkernels (3.42 ms), followed by a second.item()sync (0.68 msidle gap). - Action (OPT_FAST_GRAD_SYNC=1): - Registered a DDPSUMcommunication hook (dist.ReduceOp.SUMwithout/ world_size) and folded/ world_sizeintoFP16Optimizer.multiply_grads((2.0 / 4096) / 2.0 = 1.0 / 4096), eliminating all240AUnaryFunctorkernels (4.6 ms/update). - Added deterministicuint4-vectorizedl2norm_bf16_part_kernel+fp64l2norm_final_reduce_kernel(run_l2norm_bf16_planinyoco_cuda_ext, reusing_opt_scale_plan) replacing Fairseq's165-launchmulti_tensor_l2norm. - Deferred_fast_stat_sync_sum.cpu()via_PendingSyncState/_DeferredValsorun_l2norm_bf16_planis enqueued onto Stream 7 ~42 ms ahead of backward completion, mergingstat_buf+norm_out_f64into a single.cpu()transfer. - Expected numerics tier: N1 (N0 relative to Round 4 exceptfp64final sum in L2 norm, which is closer tofp64gold than Apexfp32sum). - Timing result (/tmp/r5/time/time.json): -s_per_update:0.1389s (windows[1.389, 1.388]s, range0.0008,29,498.9tokens/s). -speedup_vs_frozen_reference:1.7024x(beyond_reference_noise: true). -peak_memory_allocated_gib:58.38GiB. - Gate 0 + Gate 3 check (/tmp/r5/n1/check.json): -status:PASS,verdict:equivalent(all 6 trajectory endpoints within3σ;loss_u005_015 = 0.0055σ, max1.42σ). - Commit: promotedOPT_FAST_GRAD_SYNC=1to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T05:21:40Z ---
1.8 hRound 6: Profile `1.70x` Tree & Shared-Storage Merged Projections + Fused Packed SwiGLU (`OPT_MERGED_PROJ`)
- Start time: 2026-11-20T05:21:45Z - Profile (/tmp/r6/profile): - Host time per update:0.140 s(GPU busy78%;l2norm_bf16_part_kerneldropped to7.51 ms / 5 = 1.50 ms/updatein 1 launch vs14.99 ms / 5 = 3.00 msacross 165 launches). - Trace finding on Pythonregister_comm_hook: PyTorch DDP's Python comm-hook path copiedfut.value()[0]back into all 240.gradtensors (Memcpy DtoDjumped from0.11 ms->18.32 ms / 5 = 3.66 ms/update) and madeloss.backward()wait on CPU until the lastnccl:all_reduce(1.28 msidle gap). Gated Pythonregister_comm_hookoff (OPT_DDP_SUM_HOOK) while keepingl2norm_bf16_plan+_PendingSyncState. - Top remaining compute/launch bottleneck class: -gemm:333.8 ms / 5 = 66.76 ms/updateacross529GEMM launches/update (2split GEMMs[fc1, gate]in all 26 FFN layers,5split GEMMs[q, k, v, g, gt]in all 13GateRetentionlayers,2split GEMMs[k_proj, v_proj]inCrossDecoder), plus79CUDAFunctor_add(aten::add_) launches summingdxacross split projections,52jiteratorswiglulaunches (1.82 ms/upd), and394dummy Megatronmp_size=1autograd nodes. - Action (OPT_MERGED_PROJ=1): - Addedpack_shared_projection_buffersinopt_runtime.py(invoked aftermodel.to(device)and beforeDistributedDataParallel), backing(fc1.weight, gate.weight)with contiguous[16384, 3072]storage,(q, k, v, g, gt)weights with contiguous[12312, 3072]storage, andCrossDecoder(k_proj, v_proj)weights with contiguous[2048, 3072]storage while keeping everynn.Parametername, shape, dtype, alignment, andYocoAdapter._trainable_sha100% unchanged. - Addeduint4-vectorizedfused_packed_swiglu_fwd/_bwdand packed-rowfused_retention_packed_prep_fwd/fused_add_subln_swiglu_packed_bwd/fused_retention_packed_prep_bwdincsrc_ext/model_kernels.cu(eliminating237GEMM launches,79dxadd_kernels,52jiterator SwiGLU launches, alltorch.cat/splitcopies, and394Megatronmp=1autograd nodes per update). - Verified on 4-layer YOCO model (out rel_L2 = 3.04e-3, worst param gradrel_L2 = 7.23e-3). Expected numerics tier: N1. - Timing result (/tmp/r6/time/time.json): -s_per_update:0.1335s (windows[1.335, 1.334]s, range0.001;checkcand run:0.1330s, windows[1.331, 1.330]s,30,791.8tokens/s). -speedup_vs_frozen_reference:1.7713x(check:1.7780x,beyond_reference_noise: true). -peak_memory_allocated_gib:58.38GiB. - Full check verdict (/tmp/r6/check/check.json): -status:PASS,performance.speedup:1.7780x(0.1330s/update vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (1.778 > 1.0398). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true). Gate 3: PASS (equivalent,loss_u005_015 = 0.003σ,loss_u100_200 = 0.194σ, max0.72σ<=3.0σ). - Commit: promotedOPT_MERGED_PROJ=1to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T05:44:30Z ---
2.2 hRound 7: Profile `1.78x` Tree & Pipelined Post-Backward Tail (`OPT_PIPELINED_TAIL`)
- Start time: 2026-11-20T05:44:35Z - Profile (/tmp/r7/profile): - Host time per update:0.133–0.135 s(GPU busy79%; Stream 7 launches/update down to1,542;gemmdropped from333.8 ms->312.1 ms[aten::mm2,775->1,590],CUDAFunctor_add5.46 ms->0.71 ms,CPU forward22.26 ms->15.56 ms,CPU backward65.88 ms->51.41 ms). - Trace findings on the exposed43.1 mspost-backward tail ([126.4, 169.5] ms): 1.torch.tensor(cpu_vals, dtype=torch.float64, device=self.device)infast_stat_sync_sumperformed a pageable HtoD copy callingcudaStreamSynchronize(55.9 msCPU block!), causing a1.22 msGPU idle gap ([126.61, 127.82] ms) beforel2norm_bf16_part_kernel. 2. Syncingnorm_out_f64to CPU before launchingbf16_to_fp32_scale_vec_kernelcaused a0.71 msGPU idle gap ([129.34, 130.05] ms). 3.fused_adam_bf16(12.78 ms) ->OSS P2P(19.05 ms) ->fp32_to_bf16peer copy (2.44 ms) ran sequentially (34.27 ms). - Action (OPT_PIPELINED_TAIL=1,OPT_OSS_PIPE_CHUNKS=8,TORCH_NCCL_HIGH_PRIORITY=1): - Replaced pageabletorch.tensor(cpu_vals, device=...)with a 2-slot pinned-memory HtoD ring buffer (non_blocking=True), removing the55.9 mscudaStreamSynchronizeCPU block and1.22 msidle gap. - Addedrun_l2norm_and_scale_bf16_plan(l2norm_final_reduce_and_scale_kernel+bf16_to_fp32_scale_gpu_kernel, verified0.0bit difference vs separate CPU-scaled plan) sol2norm+ clip-scale +bf16->fp32grad cast are all enqueued onto Stream 7 ~56 ms ahead of backward completion, before.cpu()runs (0.71 msidle gap eliminated). - Implemented 8-chunk pipelinedAdam + OSS P2P + PeerCopy, overlappingP2P[0..6]withAdam[1..7]and overlappingpeer_copy[0..6](2.14 ms) withP2P[7]. - Expected numerics tier: N1 (N00.0-bit difference relative to Round 6). - Timing result (/tmp/r7/time/time.json): -s_per_update:0.1307s (windows[1.307, 1.306]s, range0.0006;checkcand run:0.1299s, windows[1.298, 1.300]s,31,534.1tokens/s). -speedup_vs_frozen_reference:1.8093x(check:1.8204x,beyond_reference_noise: true). -peak_memory_allocated_gib:58.38GiB. - Full check verdict (/tmp/r7/check/check.json): -status:PASS,performance.speedup:1.8204x(0.1299s/update vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (1.8204 > 1.0398). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true,1268 / 9616identical — exact same tensor sketches as Round 6). Gate 3: PASS (equivalent,loss_u005_015 = 0.0016σ, max1.11σ<=3.0σ). - Commit: promotedOPT_PIPELINED_TAIL=1,OPT_OSS_PIPE_CHUNKS=8,TORCH_NCCL_HIGH_PRIORITY=1to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T06:06:30Z ---
2.6 hRound 8: Profile `1.82x` Tree, Async Early DtoH Sync & Occupancy/Vectorized Bwd Kernels (`OPT_FAST_KERNELS_V2`)
- Start time: 2026-11-20T06:06:35Z - Profile (/tmp/r8/profile): - Steady-state step:130.18 ms(forward+loss23.5 ms,backward+DDP67.7 ms,clip+scale+Adam+OSS+PeerCopy35.7 ms). - Concrete bottlenecks identified in/tmp/r8/profile: 1.1.61 msGPU idle gap ([126.34, 127.96] ms) beforefused_adam_bf16_kernel:torch.cat([pending.buf, norm_out_f64]).cpu()was enqueued on Stream 7 *after*bf16_to_fp32_scale_gpu_kernel(5.19 ms), delaying CPU wakeup untilbf16_to_fp32_scalefinished. 2. Low SM occupancy infused_rms_norm_bwd(10.96 + 1.59 = 12.55 ms / 5 = 2.51 ms/update):G = 128blocks on132SMs left 4 SMs idle at12.5%occupancy (1block/SM), andreduce_dw_rows_kernellaunched only12blocks (2launches for parallelw, w1). 3. Scalarbf16loads/stores infused_inner_mask_bwd_kernel(4.77 ms / 5 = 0.95 ms/updatevs0.20 ms/updatefwd). - Action (OPT_FAST_KERNELS_V2=1): - Splitrun_l2norm_reduce_for_scale_plan+run_bf16_to_fp32_scale_gpu_planincsrc_ext/yoco_cuda_ext.cuand recordednorm_ready_evon Stream 7 inyoco/opt_runtime.pyso a high-prioritydtoh_streamcopiespending.buf+norm_out_f64to pinned host memory whilebf16_to_fp32_scale_gpu_kernelexecutes concurrently (0.0-bit diff vsrun_l2norm_and_scale_bf16_plan, waking CPU5.2 msearlier and eliminating the1.61 msidle gap). - Raisedfused_rms_norm_bwdgrid capG = 128 -> 512(4blocks/SM on 132 SMs) and added 192-blockfloat4/uint2reduce_dw_rows_vec4_kernelfusing(dw, dw1)reduction (39.9 us -> 29.4 usin standalone microbench, 100% deterministic). - Addeduint2-vectorizedfused_inner_mask_bwd_vec_kernel(75.2 us -> 36.3 us,2.07xfaster,0.0diff ond_attn, 100% deterministic). - Expected numerics tier: N1. - Timing result (/tmp/r8/time/time.json): -s_per_update:0.1277s (windows[1.274, 1.280]s,32,067.1tokens/s). -speedup_vs_frozen_reference:1.8518x(beyond_reference_noise: true). -peak_memory_allocated_gib:58.38GiB. - Full check verdict (/tmp/r8/check/check.json): -status:PASS,performance.speedup:1.8417x(0.1284s/update,31,905.8tokens/s vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (1.8417 > 1.0398). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true,1272 / 9616identical). Gate 3: PASS (equivalent,loss_u005_015 = -0.010σ,loss_u025_035 = 0.005σ, max0.99σ<=3.0σ). - Commit: promotedOPT_FAST_KERNELS_V2=1to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T06:37:00Z ---
4.3 hRound 9: Profile `1.85x` Tree, C++ `NoDivAllReduceCommHook`, Zero-Copy Direct-to-DDP-Bucket `dW` & Deterministic Scaled Embedding (`OPT_DIRECT_DDP_BUCKETS`)
- Start time: 2026-11-20T06:39:35Z - Profile (/tmp/r9/profile): - Steady-state step:127.82 ms(GPU clip-grads -> Optimizer.stepidle gap reduced to0.00 msby Round 8'sdtoh_stream). - Concrete bottlenecks identified in/tmp/r9/profile: 1.4.80 ms/update(242calls/step =24.03 ms / 5on Stream 7 +1.11 msCPU) inAUnaryFunctor(torch::distributed::reducer::mul_out): DDP'smark_variable_ready_densemultiplied all 240 freshly-allocatedbf16parameter gradients by0.5(1 / world_size) while copying them into DDP buckets, right on the 100%-busy Stream 7 critical path. 2.0.91 ms/update(4.55 ms / 5) inVocabParallelEmbedding(mp=1redundant<0/>=Vmasks +masked_fill+0.36 msFillFunctorzeroing a temporary616 MBembed_tokensgrad tensor +0.37 msmul_outright before the final2.07 msembed_tokensAllReduce). - Action (OPT_DIRECT_DDP_BUCKETS=1,OPT_DDP_BUCKET_MB=128): - Addedcsrc_ext/ddp_ext.cpp: pure C++NoDivAllReduceCommHook(c10d::CppCommHookInterface, zero Python/GIL overhead) +align_and_get_ddp_bucket_viewsordering DDP buckets by Rank-0-syncedreducer.get_backward_stats()(sooutput_projection616 MBstays in Bucket 0 at the start of backward) while keeping merged groups ([fc1, gate],[q, k, v, g, gt],[k, v]) contiguous inside128 MiBbuckets. - UpdatedFusedMergedFFNFn,FusedMergedGateRetentionFn,FusedMergedKVFn,FusedRMSNormFn(fused_rms_norm_bwd_out), and newFusedDirectLinearFn(CrossAttention,output_projection) to writedWdirectly intoout=bucket_view, assignp.grad = bucket_view, and returnNoneto autograd (eliminating all240reducer::mul_outkernels,0Memcpy DtoD,0AccumulateGradclones, and saving0.77 GiBreserved memory). - Added deterministic zero-atomicfused_scaled_embedding_fwd+fused_scaled_embedding_bwd(shared-memory bitonic sort of2048(token, pos)pairs +fp32unique-run scatter directly intoembed_tokensDDP bucket view). - Expected numerics tier: N1. - Timing result (/tmp/r9/time/time.json): -s_per_update:0.1252s (windows[1.246, 1.257]s,32,728.0tokens/s). -speedup_vs_frozen_reference:1.8887x(beyond_reference_noise: true). -peak_memory_allocated_gib:58.17GiB (peak_memory_reserved_gib:58.66GiB). - Full check verdict (/tmp/r9/check/check.json): -status:PASS,performance.speedup:1.8948x(0.1248s/update, windows[1.245, 1.251]s,32,831.7tokens/s vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (1.8948 > 1.0398). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true,1269 / 9616identical). Gate 3: PASS (equivalent,loss_u005_015 = -0.031σ,loss_u015_025 = 0.052σ, max0.74σ<=3.0σ). - Commit: promotedOPT_DIRECT_DDP_BUCKETS=1,OPT_DDP_BUCKET_MB=128to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T07:52:00Z ---
4.9 hRound 10: Profile `1.895x` Tree & 24-Slice NVLink Hardware Copy Engine IPC DMA Pipeline (`OPT_OSS_IPC_DMA`)
- Start time: 2026-11-20T07:53:00Z - Profile (/tmp/r10/profile): - Steady-state step:124.92 ms(backwardfinished at119.41 mswith0reducer::mul_outand0Memcpy DtoD). - Concrete bottleneck identified in/tmp/r10/profile: -31.65 ms/update([126.15, 157.80] ms) inAdam + NCCL SendRecv + PeerCopytail: 1. SM Contention: NCCLSendRecvkernels occupied streaming multiprocessors concurrently with memory-boundfused_adam_bf16_kernel(41 GBHBM traffic) andfp32_to_bf16_kernel(10.3 GBHBM traffic), stretchingfused_adam_bf16from~13.5 mssolo to24.85 ms(124.25 ms / 5). 2. Whole-Parameter Tail Skew:output_projection(308Melems =1.23 GB) could not split across OSS chunks, creating a single479M-element final chunk (6.8 msunoverlapped tail after Adam finished). - Action (OPT_OSS_IPC_DMA=1,OPT_OSS_IPC_SLICES=24): - Replaced NCCL SM-basedSendRecvin the OSS tail with 24 equal-element (~72Mfp32elems =287 MB) NVLink Hardware Copy Engine DMA slices (cudaMemcpyPeerAsyncon dedicateddma_stream+ interprocesscudaIpcEventHandle_tring synchronization incsrc_ext/yoco_cuda_ext.cu, usingcuMemGetAddressRange_v2vialibcuda.so.1+cudaIpcGetMemHandleandatexitoss_ipc_cleanupfor zero PyTorch IPC destructor warnings): 1. All 132 Hopper SMs stay 100% dedicated tofused_adam_bf16_kernel+fp32_to_bf16_kernelon Stream 7 while NVLink Copy Engines push updatedfp32master slices directly into the peer'speer_bufin parallel (0SMs used for communication). 2. Arbitrary contiguous sub-slice boundaries split308M-element embeddings/LM-head cleanly across slices (287 MBtail instead of1.92 GB), cutting standalone 2-GPU tail wall time from31.65 ms->18.25 ms/step(-13.40 ms/update) with0.0-bit difference vs Round 9. - Expected numerics tier: N1 (0.0-bit diff relative to Round 9). - Timing result (/tmp/r10/time/time.json): -s_per_update:0.1157s (windows[1.157, 1.157]s, range0.0005,35,399.3tokens/s). -speedup_vs_frozen_reference:2.0438x(beyond_reference_noise: true). -peak_memory_allocated_gib:58.17GiB (peak_memory_reserved_gib:58.66GiB). - Full check verdict (/tmp/r10/check/check.json): -status:PASS,performance.speedup:2.0581x(0.1149s/update, windows[1.149, 1.148]s, median0.1146s,35,660.3tokens/s vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (2.0581 > 1.0398). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true,1269 / 9616identical — exact same tensor sketches as Round 9). Gate 3: PASS (equivalent,loss_u005_015 = -0.038σ,loss_u015_025 = +0.0016σ, max0.50σ<=3.0σ). - Commit: promotedOPT_OSS_IPC_DMA=1,OPT_OSS_IPC_SLICES=24to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T08:28:00Z ---
5.5 hRound 11: Profile `2.058x` Tree, Bitwise-Exact 2-Rank NVLink IPC Sparse Embedding Sync & Tapered IPC Schedule (`OPT_SPARSE_EMB_SYNC`, `OPT_IPC_TAPERED`)
- Start time: 2026-11-20T08:30:10Z - Profile (/tmp/r11/profile): - Steady-state GPU step ([emb_fwd[1] -> emb_fwd[2]]):113.98 ms(Stream 7busy106.64 ms, non-S7 / wait7.35 ms). - Concrete bottlenecks identified in/tmp/r11/profile: 1.2.35 ms/updateunoverlapped critical path at the end of backward (+60.24..+62.78 ms):FillFunctor<BFloat16>zeroed all616 MB(100,288 × 3,072) ofembed_tokens.weight._opt_bucket_view(0.363 ms), followed bysort+scatter(0.183 ms), and then Stream 7 stalled completely idle for1.992 mswaiting forncclDevKernel_AllReduce_Sum_bf16onembed_tokens.weight's616 MBDDP bucket (1.979 mson Stream 18) even though at most2 × 2,048 = 4,096rows (<= 25 MB) are active per update. 2.0.65 ms/updatestartup + tail drain bubbles in uniform 24-slice OSS IPC DMA (+69.53..+89.31 ms):dma_streamwaited0.521 msfor Slice 0 (287 MB) of Adam to finish before starting NVLink DMA, and Stream 7 waited0.12 msat the end for Slice 23fp32_to_bf16. - Action (OPT_SPARSE_EMB_SYNC=1,OPT_IPC_TAPERED=1,OPT_OSS_IPC_SLICES=28): - ImplementedEmbIpcEngine(csrc_ext/yoco_cuda_ext.cu+csrc_ext/model_kernels.cu+csrc_ext/ddp_ext.cpp): 1.zero_dirty_embedding_rows_kernelzeros only the previous step's<= 4,096dirty rows (~0.01 msvs0.363 ms), andpack_emb_ipc_kernel+ NVLink Copy EnginecudaMemcpyAsyncexchanges each rank's(indices [2048], dy [2048, 3072])(12.60 MB=0.034 msvs616 MB=1.98 ms) concurrently withSelfDecoder[0]'sAllReduce. 2.sort_tokens_bitonic_2rank_kernel(4096pairs in shared memory) +scatter_sorted_embedding_2rank_bwd_kernelcomputesbf16(acc_rank0) + bf16(acc_rank1)directly intoembed_tokens.weight._opt_bucket_view(0-bit difference vs 2-rankbf16AllReduceverified across 5 steps in standalone 2-GPU test;2.648 ms -> 0.494 ms,-2.15 ms/step), andarm_nodiv_skip_bucketmakesNoDivAllReduceCommHook::runHookreturn a pre-completedFuture(buf)skipping the616 MBAllReduce. - AddedOPT_IPC_TAPERED=1(28slices with[0.22 .. 0.84, 1.0 x 18, 0.22]ramp) sodma_streamstarts NVLink P2P0.40 msearlier with zero mid-stream underflow (0.0-bit diff; alone improvedtimefrom0.1157->0.1149s, and withOPT_SPARSE_EMB_SYNC=1bound toYOCO.embed_tokens.weightreached0.1134s). - Expected numerics tier: N1 (0.0-bit diff relative to Round 10). - Timing result (/tmp/r11/time/time.json): -s_per_update:0.1134s (windows[1.132, 1.136]s, median0.1132s,36,112.8tokens/s). -speedup_vs_frozen_reference:2.0853x(beyond_reference_noise: true). -peak_memory_allocated_gib:58.22GiB (peak_memory_reserved_gib:58.71GiB). - Full check verdict (/tmp/r11/check/check.json): -status:PASS,performance.speedup:2.0871x(0.1133s/update, windows[1.130, 1.135]s,36,161.4tokens/s vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (2.0871 > 1.0398). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true,1269 / 9616identical — exact same tensor sketches as Round 10). Gate 3: PASS (equivalent,loss_u005_015 = +0.0024σ,loss_u015_025 = +0.029σ, max0.67σ<=3.0σ). - Commit: promotedOPT_SPARSE_EMB_SYNC=1,OPT_IPC_TAPERED=1,OPT_OSS_IPC_SLICES=28to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T09:03:30Z ---
7.1 hRound 12: Profile `2.087x` Tree, Direct Tuned `cuBLASLt` GEMM/BMM Dispatch, 384-Thread `RMSNorm` Bwd & Zero-SM NVLink Copy-Engine DDP `AllReduce` (`OPT_FAST_CUBLASLT`, `OPT_FAST_RMS_BWD_V3`, `OPT_IPC_ALLREDUCE`)
- Start time: 2026-11-20T09:04:00Z - Profile (/tmp/r12/profile): - Steady-state GPU step ([emb_fwd[1] -> emb_fwd[2]]):111.26 ms(Stream 7busy106.39 ms = 95.62%). - Concrete bottlenecks identified in/tmp/r12/profile: 1.40.23 ms/update(54x,grid=[24,1,1]) high-priorityncclDevKernel_AllReduce_Sum_bf16SM contention with backward Stream-K GEMMs:24high-priority NCCL CTAs occupied18.2%of the 132 Hopper SMs throughout backward, stalling132-CTA persistent/Stream-Ksm90_xmma_gemmkernels (14.67 msconcurrent vs9.31 mssolo onret_dx + ffn1_dxalone, and54.39 msvs40.07 mssolo across all 212 backward GEMMs). 2.65.16 ms/update(318x2D GEMMs) +3.18 ms/update(156xcutlass_80BMMs): PyTorch 2.3.1'storch.mmused a32 MiBworkspace with heuristic#0and ATen.t()dispatch, andtorch.bmmdispatchedsm80cutlass_80kernels instead of Hoppersm90strided-batchedcuBLASLtkernels. 3.1.51 ms/update(53x)fused_rms_norm_bwd_kernel:512-thread loop overN=3072. - Action (OPT_FAST_CUBLASLT=1,OPT_FAST_RMS_BWD_V3=1,OPT_IPC_ALLREDUCE=1): - Createdcsrc_ext/cublaslt_ext.cpp(cublaslt_mm&cublaslt_bmm) with persistent per-device128 MiBworkspace, cachedcublasLtMatmuldescriptors, and pre-verified deterministic Hoppersm90heuristic indices across all 18 2D GEMM shapes and 6 strided-batchedGateRetentionBMM shapes (23/24shapes bitwise identicalmax_err=0.0vstorch.mm/torch.bmm,1/24lm_dx1bf16 ULP &det_diff=0). - Added templated384-thread (1 × uint4per thread forN=3072)fused_rms_norm_bwd_3072_v3_kernel(OPT_FAST_RMS_BWD_V3=1,-0.20 ms). Together withOPT_FAST_CUBLASLT=1,bench.py timeimproved from0.1134->0.1126s/update (2.1001x). - ImplementedDdpIpcArEngine(OPT_IPC_ALLREDUCE=1incsrc_ext/yoco_cuda_ext.cu+csrc_ext/ddp_ext.cpp+yoco/opt_runtime.py): 16-slot NVLink Copy EngineReduceScatter + AllGatherpipeline usingcudaMemcpyAsyncon two dedicated DMA streams (0SMs used for data movement),cuStreamWriteValue32_v2/cuStreamWaitValue32_v2GPU-side synchronization (0host barriers), and a single-wave132-CTAddp_add_bf16_u4_kernelcomputingrank0 + rank1in identical order on both ranks (0-bit diff vs NCCL verified across 53 × 118 MB buckets and 20 E2E DDP steps; standalone concurrent backward + AllReduce dropped from54.39->46.66 ms,-7.73 ms/step). - Also tested and discarded in Round 12 exploration: Hopper__stcscache-streaming stores (5.21 -> 7.77 msregression due to bypassing L2 write-combining) and customnvcuda::wmmacausal inner-retention kernels (5.18 msvs2.43 mscuBLASLtstrided-batched BMM). - Expected numerics tier: N1. - Timing result (/tmp/r12/time_v2/time.json): -s_per_update:0.1070s (windows[1.067, 1.073]s, median0.10665s, range0.0058,38,277.4tokens/s). -speedup_vs_frozen_reference:2.2100x(beyond_reference_noise: true). -peak_memory_allocated_gib:62.88GiB (peak_memory_reserved_gib:63.36GiB). - Full check verdict (/tmp/r12/check/check.json): -status:PASS,performance.speedup:2.2059x(0.1072s/update, windows[1.074, 1.071]s, median0.10675s, range0.0025,38,196.8tokens/s vs0.23647s/update frozen mean). - Gate 0: PASS. Gate 1: PASS (2.2059 > 1.0398). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true,1267 / 9616identical). Gate 3: PASS (equivalent,loss_u005_015 = +0.0028σ,loss_u015_025 = +0.067σ, max0.78σ<=3.0σ). - Commit: promotedOPT_FAST_CUBLASLT=1,OPT_FAST_RMS_BWD_V3=1,OPT_IPC_ALLREDUCE=1to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T10:37:00Z ---
7.1 hCurrent Summary (Updated after Round 12)
- Current/submission/switches.json:{"environment": {"OPT_FAST_OPTIM": "1", "OPT_FUSED_ADAM_BF16": "1", "OPT_FAST_DDP": "1", "OPT_DDP_BUCKET_MB": "128", "OPT_FUSED_RMSNORM": "1", "OPT_FUSED_SUBLN_SWIGLU": "1", "OPT_FUSED_LOSS": "1", "OPT_FUSED_RETENTION": "1", "OPT_FAST_GRAD_SYNC": "1", "OPT_MERGED_PROJ": "1", "OPT_PIPELINED_TAIL": "1", "OPT_OSS_PIPE_CHUNKS": "8", "TORCH_NCCL_HIGH_PRIORITY": "1", "OPT_FAST_KERNELS_V2": "1", "OPT_DIRECT_DDP_BUCKETS": "1", "OPT_OSS_IPC_DMA": "1", "OPT_OSS_IPC_SLICES": "28", "OPT_IPC_TAPERED": "1", "OPT_SPARSE_EMB_SYNC": "1", "OPT_FAST_CUBLASLT": "1", "OPT_FAST_RMS_BWD_V3": "1", "OPT_IPC_ALLREDUCE": "1"}}- Latest full check (/tmp/r12/check/check.json):PASS—2.2059xspeedup (0.1072s/update,38,196.8tokens/s;time:2.2100x,0.1070s/update), TierN1(0exact failures, Gate 3 trajectoryequivalentwith max|d| = 0.78σvs3σlimit), peak memory62.88GiB (63.36GiB reserved) - Breakdown of gains by change: - Round 1 —OPT_FAST_OPTIM=1(Tier N0):0.2357->0.1847s/update (1.2803x,-51.0ms/update) — eliminated deadp32.grad.zero_(),bf16grad L2 norm, fusedbf16->fp32grad cast+scale, full-duplex NVLinkbatch_isend_irecvOSS exchange, removed end-of-step GPU metric syncs. - Round 2 —OPT_FUSED_ADAM_BF16=1+OPT_FAST_DDP=1+OPT_DDP_BUCKET_MB=100(Tier N0):0.1847->0.1726s/update (1.3700x,-12.1ms/update) —yoco_cuda_ext(sm_90) single-launch inline-PTXfused_adam_bf16writing localbf16weights inside Adam, single-launch vectorizedfp32->bf16peer copy &bf16->fp32grad scale, DDPgradient_as_bucket_view=True(100MB buckets). - Round 3 —OPT_FUSED_RMSNORM=1+OPT_FUSED_SUBLN_SWIGLU=1+OPT_FUSED_LOSS=1(Tier N1):0.1726->0.1494s/update (1.5828x,-23.2ms/update,-2.91GiB peak memory) —yoco_cuda_extdeterministicfused_rms_norm(fusing all 52 residual adds + 54 affineRMSNorms incl. parallelCrossDecoderentry + cachedrel_pos), warp-shufflefused_add_subln_swiglu, and online-softmaxfused_cross_entropy. - Round 4 —OPT_FUSED_RETENTION=1(Tier N1):0.1494->0.1408s/update (1.6795x,-8.6ms/update,-0.46GiB peak memory,-15scold startup) —yoco_cuda_extdeterministicFusedGateRetentionFn+FusedInterleavedRoPEFn(max_diff=0.0). - Round 5 —OPT_FAST_GRAD_SYNC=1(Tier N1):0.1408->0.1389s/update (1.7024x,-1.9ms/update) — single-launchuint4l2norm_bf16_plan(fp64final sum) and deferred single-sync stat/norm resolution. - Round 6 —OPT_MERGED_PROJ=1(Tier N1):0.1389->0.1330s/update (1.7780x,-5.9ms/update) — shared-storage merged projections ([fc1; gate],[q; k; v; g; gt],[k; v]),uint4packed SwiGLU & packedGateRetentionprep/bwd kernels, bypassing Megatronmp=1dummy autograd nodes, and disabling DDP Python comm-hookMemcpy DtoD. - Round 7 —OPT_PIPELINED_TAIL=1+OPT_OSS_PIPE_CHUNKS=8+TORCH_NCCL_HIGH_PRIORITY=1(Tier N1,0.0-bit diff vs Round 6):0.1330->0.1299s/update (1.8204x,-3.1ms/update) — pinned non-blocking HtoD stat ring buffer (-1.22mscudaStreamSynchronizeidle gap), GPU-fusedrun_l2norm_and_scale_bf16_planenqueued ahead of host sync (-0.71ms idle gap), and 8-chunk pipelinedAdam + OSS P2P + PeerCopy. - Round 8 —OPT_FAST_KERNELS_V2=1(Tier N1):0.1299->0.1284s/update (check1.8417x;time0.1277s/update1.8518x,-2.2to-3.0ms/update) — asyncdtoh_streamearly norm/stat sync eliminating1.61ms GPU idle gap before Adam,G=512+float4fused_rms_norm_bwd, anduint2-vectorizedfused_inner_mask_bwd_vec_kernel. - Round 9 —OPT_DIRECT_DDP_BUCKETS=1+OPT_DDP_BUCKET_MB=128(Tier N1):0.1284->0.1248s/update (check1.8948x;time0.1252s/update1.8887x,-3.6ms/update,-0.21GiB peak /-0.77GiB reserved memory) — C++NoDivAllReduceCommHook, backward-stats-aligned zero-copy direct-to-DDP-bucketdWGEMMs/RMSNorm (0reducer::mul_out,0Memcpy DtoD), and deterministic bitonic-sortfused_scaled_embedding. - Round 10 —OPT_OSS_IPC_DMA=1+OPT_OSS_IPC_SLICES=24(Tier N1,0.0-bit diff vs Round 9):0.1248->0.1149s/update (check2.0581x;time0.1157s/update2.0438x,-9.9ms/update) — 24-slice NVLink Hardware Copy EnginecudaMemcpyPeerAsync+cudaIpcEventHandle_tOSS pipeline eliminating NCCL SM contention with Adam and cutting tail skew (31.65->18.25ms). - Round 11 —OPT_SPARSE_EMB_SYNC=1+OPT_IPC_TAPERED=1+OPT_OSS_IPC_SLICES=28(Tier N1,0.0-bit diff vs Round 10):0.1149->0.1133s/update (check2.0871x;time0.1134s/update2.0853x,-1.6to-2.3ms/update) — 2-rank NVLink IPC12.6 MBsparse embedding sync + dirty-row zeroing skipping616 MBembed_tokensAllReduce, and 28-slice tapered OSS IPC schedule. - Round 12 —OPT_FAST_CUBLASLT=1+OPT_FAST_RMS_BWD_V3=1+OPT_IPC_ALLREDUCE=1(Tier N1):0.1133->0.1072s/update (check2.2059x;time0.1070s/update2.2100x,-6.1to-6.4ms/update) — directcuBLASLt128 MiBtuned Hoppersm90GEMM/BMM dispatch, 384-threadRMSNormbwd, and zero-SM NVLink Copy-Engine +cuStreamMemOpsDDPAllReduceeliminating 24-CTA NCCL SM contention during backward Stream-K GEMMs. - Directions that did not work: - Hopper__stcs(st.global.cs) cache-streaming stores &K > 28OSS IPC slices in Round 12 exploration: bypassed L2 write-combining and slowedbf16_to_fp32_scale_gpu(5.21->7.77ms) and OSS IPC tail (19.27->19.90+ms); reverted. - Customnvcuda::wmma(m16n16k16) causal inner-retention kernels in Round 12 exploration:5.18ms vs2.43mscuBLASLtstrided-batchedsm90BMM; removed. -torch._foreach_copy_(bf16_list, fp32_list)in Round 1: fell back to a 240-kernel unrolled loop (12.78ms/update) due to mixed dtypes; replaced in Round 2 withyoco_cuda_extsingle-launch vectorizedfp32->bf16+ fused Adambf16write. - PyTorch DDP Pythonregister_comm_hook(SUMwithout/ world_size) in Round 5/6 trace: triggered240Memcpy DtoDcopies (3.66ms/update) and madeloss.backward()wait on CPU (1.28ms idle gap); solved in Round 9 via pure C++NoDivAllReduceCommHook+ direct-to-bucketout=writes. - Naive reverse-definition bucket ordering in Round 9 prototype: placedoutput_projection(616 MB, index 1 inYOCO.__init__) at Bucket N-2 instead of Bucket 0, costing2.5 ms; fixed immediately by sorting via Rank-0-syncedreducer.get_backward_stats(). - Using PyTorchUntypedStorage._share_cuda_()for IPC export in early Round 10 prototype: emitted aProducer process has been terminatedwarning at process exit due to PyTorch's internal IPC refcounter; solved cleanly inoss_ipc_get_mem_handleusingcuMemGetAddressRange_v2+cudaIpcGetMemHandle+atexitoss_ipc_cleanup.
8.7 hRound 13: Profile `2.206x` Tree, Compact `big_slot` DDP Scratch (`-3.37 GiB`), `528`-CTA DDP Reduction, `Adam` `bf16`-Grad Read, Fused `CrossAttention` Q/KV+RoPE & `ffn2_fwd` Cluster Kernel (`OPT_FAST_CUBLASLT_V2`, `OPT_FUSED_CROSS_QKV`, `OPT_ADAM_READ_G16`, `OPT_IPC_AR_CTAS=528`) · continuation
- Start time: 2026-11-20T10:39:15Z (continued across machine migration at11:47:16Zto host32483aa277f5, where frozen reference mean is0.23367s/update with0.30%spread and Round 12 baseline measured0.1083s/update =2.1576x) - Profile (/tmp/r13/profile): - Steady-state GPU step:105.32 ms(host8e3bd42d831a) /107.90 ms(host32483aa277f5beforebig_slotfix). - Concrete bottlenecks identified in/tmp/r13/profile: 1. Scratch Memory &output_projection(616 MB) Bucket Handling: sizing all 16 ring slots to308 MBused4.93 GiB(62.88 GiBpeak >61.75 GiBref), and an initial((bbytes + 15) / 2)check rejectedoutput_projectionby 7 bytes (3.41 msNCCLRING_LLfallback caught immediately in new-host profile). Furthermore,132-CTA persistent stridedddp_add_bf16_u4_kernelheld SMs for ~40 us (45.11 msvs44.51 msat528CTAs). 2.Adamfp32-Grad HBM Traffic (6.89 GB):fused_adam_bf16_kernelre-read6.89 GBofp32.grad(fp32) concurrently with18.70 msNVLink P2P DMA even thoughfloat(g16) * (*scale_ptr)(3.445 GBbf16) is bit-for-bit identical (13.87 -> 13.05 mssolo). 3.CrossDecoder/CrossAttentionUnfusedRoPE&KVSplit/Cat:28xfused_rope_interleaved_kernel(0.27 ms) +26 × 12 MBqcopies (624 MBHBM) +kv.contiguous()/torch.catcopies. 4.ffn2_fwd(26x(2048, 3072, 8192, F, T)): exhaustive 499-configcuBLASLtsearch found(algo=39, tile=23, stage=35, cluster=2x1x1, sp=-1)(4.09 -> 3.82 ms,-0.27 ms,det=1). - Action (OPT_FAST_CUBLASLT_V2=1,OPT_FUSED_CROSS_QKV=1,OPT_ADAM_READ_G16=1,OPT_IPC_AR_CTAS=528): - Added dedicated308 MBbig_slotalongside16 × 64 MBregular ring slots inDdpIpcArEngine(with exacthalf1_b = bbytes - ((bbytes / 2) & ~15LL)check) andOPT_IPC_AR_CTAS=528, cutting peak allocated memory from62.88->59.51GiB (-3.37 GiB, below61.75GiB ref) and eliminatingoutput_projectionNCCL fallback. - Addedbuild_adam_plan_g16+OPT_ADAM_READ_G16=1sofused_adam_bf16_kernelloadsuint2(bf16) gradients and multiplies byscale_out_f32in registers (0-bit diff vsg32,-3.445 GBHBM reads). - Addedfused_rope_interleaved_inplace,fused_split_kv_rope_fwd,fused_pack_dkv_rope_bwd,FusedCrossAttnQFn, andFusedMergedKVRopeFn(0-bit diff verified in standalone test), plusOPT_FAST_CUBLASLT_V2=12x1x1cluster override onffn2_fwd. - Also tested and discarded:OPT_IPC_TAPERED_V2(0.10start slice starved DMA), direct-SM NVLink P2P load without Copy Engine (49.79 msvs46.66 ms), anduint4shared-memorybf16->fp32scale (5.70 msvs5.49 ms). - Timing result (/tmp/r13/time/time.json, host32483aa277f5, ref0.2335s): - Baseline Round 12 on host32483aa277f5:0.1083s/update (2.1576x). - Round 13s_per_update:0.1067s (-1.6 ms/update, windows[1.063, 1.072]s,38,372.3tokens/s,2.1900xvs0.2335s). -peak_memory_allocated_gib:59.51GiB (peak_memory_reserved_gib:59.99GiB). - Full check verdict (/tmp/r13/check/check.json, host32483aa277f5, ref0.23367s): -status:PASS,performance.speedup:2.1941x(0.1065s/update, windows[1.064, 1.066]s,38,457.4tokens/s vs0.23367s frozen check ref;-1.8 ms/updatefaster than Round 12 baseline0.1083s on this host). - Gate 0: PASS. Gate 1: PASS (2.1941 > 1.006). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true,1264 / 9616identical). Gate 3: PASS (equivalent,loss_u005_015 = -0.018σ,loss_u015_025 = +0.062σ, max0.88σ<=3.0σ). - Commit: promoted Round 13 switches to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T12:15:45Z ---
9.9 hRound 14: Profile `2.194x` Tree, Native Hopper `sm_90a` WGMMA Causal Flash-Retention (`-624 MB`), 2-Rank NVLink IPC Sharded `L2Norm`, `uint4` RoPE/RMS/Retention Prep & Fused `CrossAttention` (`OPT_SM90_FLASH_RETENTION`, `OPT_SHARDED_L2NORM`, `OPT_VEC_U4_ROPE_PREP`, `OPT_FUSED_CROSS_ATTN`) · continuation
- Start time: 2026-11-20T12:18:00Z - Profile (/tmp/r14/profile): - Steady-state GPU step ([emb_fwd[1] -> emb_fwd[2]]):104.494 ms(Stream 71,017launches,98.30 mskernel duration;Stream 1585.87 msddp_add_bf16_u4_kernel;0.000 msbf16NCCL). - Concrete bottlenecks identified in/tmp/r14/profile: 1.GateRetentionInner & Cross-Chunk BMMs + Mask + SubLN (~2.85 ms+104launches +624 MBsaved tensors): across 13 SelfDecoder layers, inner chunk retention materialized[192, 256, 256]attn_3dandattn_masked_3d(624 MBsaved for backward) across 8 BMMs + 2 mask kernels +add_subln_swiglu_fwdper layer, with78xBMMs (1.138 ms) falling back tosm_80cutlass_80_tensorop_bf16_s16816gemmkernels and computing masked upper-triangular tiles needlessly. 2. Duplicated Full-Modell2norm_bf16_part_kernel(1.501 ms): both ranks independently read all6.89 GB(52,575blocks) of already-AllReduced identicalbf16gradients to compute the identicaltotal_norm. 3.uint2(8B) Memory Transactions inRoPE,GateRetentionPacked Prep/Bwd, &RMSNormFwd (~1.85 ms+53dw_partallocations):fused_rope_interleaved_inplace(0.251 ms),fused_qkv_rope_scale_packed(0.912 msfwd+bwd), andfused_add_subln_swiglu_packed_bwd(0.300 ms) used32threads/head (8Bloads/stores), whilefused_rms_norm_fwd(0.641 ms) used3 × uint2/thread andfused_rms_norm_bwd_outallocated freshdw_parttensors53x/step. 4.CrossDecoderPer-Layer Autograd & Shared-KVdk/dvSum (24xCUDAFunctor_add+39autograd nodes):13CrossDecoder layers sharing(key, value)spawned3autograd nodes per layer and24separate elementwiseaddkernels + tensor allocations to sumdkanddv. - Action (OPT_SM90_FLASH_RETENTION=1,OPT_SHARDED_L2NORM=1,OPT_VEC_U4_ROPE_PREP=1,OPT_FUSED_CROSS_ATTN=1): - Createdcsrc_ext/sm90_retention.cucompiled with-gencode=arch=compute_90a,code=sm_90a: -sm90_retention_fwd_kernel: 1-warpgroup (128-thread) Hopperwgmma.mma_async(ssm64n128k16,ssm64n64k16, and register-Arsm64n128k16with128B-swizzledcp.asyncshared memory and LPT wave scheduling) fusingcross = qs @ S(skippingn_c = 0) + causalinner = mask(qr @ kr^T) @ vt(10/16causal tiles) + in-registerSubLN+SwiGLU(0register spills,0-bit run-to-run diff). -sm90_retention_bwd_dq_kernel&sm90_retention_bwd_dkv_kernel: Hoppersm_90aWGMMA backward kernels fusingd_q_scaled = do @ S^T,d_kr_cross = vs @ d_kv^T,d_v_scaled = kr @ d_kv, and causal innerd_qr_inner,d_kr_inner,d_vt_inner, and in-placedg_in = dg_in_row - dg_in_col(0spills, eliminating all78xcutlass_80BMMs,104launches, and624 MBsaved activations;3.91 -> 2.68 msstandalone GPU kernel time). - Implementedtry_sharded_l2norm_part(OPT_SHARDED_L2NORM=1incsrc_ext/yoco_cuda_ext.cu+yoco/opt_runtime.py): shards52,575l2norm_bf16blocks50/50across the 2 ranks, exchanges105 KBof partial float sums viaDdpIpcArEngineNVLink IPC +cuStreamWriteValue32_v2/cuStreamWaitValue32_v2, and reduces0 .. 52,574in identical order on both ranks (0-bit diff,~0.73 mssaved). - Addeduint4(16B,16threads/head,8heads/CTA) kernels forRoPE,split_kv_rope,pack_dkv_rope,qkv_rope_scale_packedfwd/bwd,add_subln_swiglu_packed_bwd,384-threaduint4RMSNormfwd (0-bit diff), and persistentdw_partworkspace (OPT_VEC_U4_ROPE_PREP=1). - AddedFusedCrossAttentionFn+ self-countingkv_grad_acc(OPT_FUSED_CROSS_ATTN=1), mergingq_proj + RoPE + FlashAttention + out_projinto 1 autograd node/layer and accumulating(dk, dv)in-place viafused_bf16_add_inplace(0-bit diff in deterministic mode). - Also tested and discarded: single-CTA last-blockdWreduction inRMSNormbwd (2.49 msvs1.38 msdue to 1-SM serialization vs 192-CTAreduce_dw_rows_vec4), and cold-L2cuBLASLt2D GEMM sweep (probe_cold_sm90.cu, confirming current 18 2D shapes are already atcuBLASLt 12.1optimum). - Timing result (/tmp/r14/time1/time.json, host32483aa277f5, ref0.2335s): -s_per_update:0.1046s (-2.1 ms/updatevs0.1067s Round 13time, windows[1.043, 1.050]s,39,144.0tokens/s,2.2339xvs0.2335s). -peak_memory_allocated_gib:58.90GiB (peak_memory_reserved_gib:59.39GiB,-0.61 GiBvs Round 13 and-2.85 GiBbelow61.75 GiBref). - Full check verdict (/tmp/r14/check1/check.json, host32483aa277f5, ref0.23367s): -status:PASS,performance.speedup:2.2254x(0.1050s/update, median0.1048s, windows[1.049, 1.052]s,39,002.6tokens/s;-1.5 ms/updatefaster than Round 130.1065scheck; equivalent to~2.252xon0.23647s ref). - Gate 0: PASS. Gate 1: PASS (2.2254 > 1.02). Gate 2:NOT_BITWISE(N1,exact_failures: 0,dtype_changes: 0,bitwise_trusted: true,1265 / 9616identical). Gate 3: PASS (equivalent,loss_u005_015 = -0.019σ,loss_u015_025 = -0.021σ, max0.41σ<=3.0σ). - Commit: promoted Round 14 switches to/submission/switches.jsonand committed to/submission/yoco(optbranch). - End time: 2026-11-20T13:25:30Z ---
9.9 hCurrent Summary (Updated after Round 14) · continuation
- Current/submission/switches.json:{"environment": {"OPT_FAST_OPTIM": "1", "OPT_FUSED_ADAM_BF16": "1", "OPT_FAST_DDP": "1", "OPT_DDP_BUCKET_MB": "128", "OPT_FUSED_RMSNORM": "1", "OPT_FUSED_SUBLN_SWIGLU": "1", "OPT_FUSED_LOSS": "1", "OPT_FUSED_RETENTION": "1", "OPT_FAST_GRAD_SYNC": "1", "OPT_MERGED_PROJ": "1", "OPT_PIPELINED_TAIL": "1", "OPT_OSS_PIPE_CHUNKS": "8", "TORCH_NCCL_HIGH_PRIORITY": "1", "OPT_FAST_KERNELS_V2": "1", "OPT_DIRECT_DDP_BUCKETS": "1", "OPT_OSS_IPC_DMA": "1", "OPT_OSS_IPC_SLICES": "28", "OPT_IPC_TAPERED": "1", "OPT_SPARSE_EMB_SYNC": "1", "OPT_FAST_CUBLASLT": "1", "OPT_FAST_CUBLASLT_V2": "1", "OPT_FAST_RMS_BWD_V3": "1", "OPT_IPC_ALLREDUCE": "1", "OPT_IPC_AR_CTAS": "528", "OPT_FUSED_CROSS_QKV": "1", "OPT_ADAM_READ_G16": "1", "OPT_SM90_FLASH_RETENTION": "1", "OPT_VEC_U4_ROPE_PREP": "1", "OPT_FUSED_CROSS_ATTN": "1", "OPT_SHARDED_L2NORM": "1"}}- Latest full check (/tmp/r14/check1/check.json, host32483aa277f5, ref0.23367s):PASS—2.2254xspeedup (0.1050s/update, median0.1048s,39,002.6tokens/s;time:0.1046s =2.2339x,39,144.0tokens/s; equivalent to~2.252xagainst the pre-migration0.23647s ref), TierN1(0exact failures, Gate 3 trajectoryequivalentwith max|d| = 0.41σvs3σlimit), peak memory58.90GiB (59.39GiB reserved, vs61.75GiB ref) - Breakdown of gains by change: - Round 1 —OPT_FAST_OPTIM=1(Tier N0):0.2357->0.1847s/update (1.2803x,-51.0ms/update) — eliminated deadp32.grad.zero_(),bf16grad L2 norm, fusedbf16->fp32grad cast+scale, full-duplexbatch_isend_irecvOSS exchange, packed stat sync. - Round 2 —OPT_FUSED_ADAM_BF16=1+OPT_FAST_DDP=1+OPT_DDP_BUCKET_MB=100(Tier N0):0.1847->0.1726s/update (1.3700x,-12.1ms/update) — inline-PTXfused_adam_bf16, vectorizedfp32<->bf16, DDPgradient_as_bucket_view=True. - Round 3 —OPT_FUSED_RMSNORM=1+OPT_FUSED_SUBLN_SWIGLU=1+OPT_FUSED_LOSS=1(Tier N1):0.1726->0.1494s/update (1.5828x,-23.2ms/update) — fused residual+RMSNorm,fused_add_subln_swiglu, online-softmaxfused_cross_entropy. - Round 4 —OPT_FUSED_RETENTION=1(Tier N1):0.1494->0.1408s/update (1.6795x,-8.6ms/update) —FusedGateRetentionFn+FusedInterleavedRoPEFn. - Round 5 —OPT_FAST_GRAD_SYNC=1(Tier N1):0.1408->0.1389s/update (1.7024x,-1.9ms/update) — single-launchuint4l2norm_bf16_plan+ deferred stat sync. - Round 6 —OPT_MERGED_PROJ=1(Tier N1):0.1389->0.1330s/update (1.7780x,-5.9ms/update) — shared-storage merged projections ([fc1; gate],[q; k; v; g; gt],[k; v]) & packed SwiGLU/Retention kernels. - Round 7 —OPT_PIPELINED_TAIL=1+OPT_OSS_PIPE_CHUNKS=8+TORCH_NCCL_HIGH_PRIORITY=1(Tier N1):0.1330->0.1299s/update (1.8204x,-3.1ms/update) — pinned HtoD stat ring, GPU-fusedl2norm_and_scale, 8-chunk pipelined OSS tail. - Round 8 —OPT_FAST_KERNELS_V2=1(Tier N1):0.1299->0.1284s/update (1.8417x,-1.5ms/update) — asyncdtoh_streamearly norm sync,G=512RMSNormbwd,uint2inner_maskbwd. - Round 9 —OPT_DIRECT_DDP_BUCKETS=1+OPT_DDP_BUCKET_MB=128(Tier N1):0.1284->0.1248s/update (1.8948x,-3.6ms/update) — C++NoDivAllReduceCommHook, direct-to-bucketdW, bitonic-sortfused_scaled_embedding. - Round 10 —OPT_OSS_IPC_DMA=1+OPT_OSS_IPC_SLICES=24(Tier N1):0.1248->0.1149s/update (2.0581x,-9.9ms/update) — 24-slice NVLink Copy EnginecudaMemcpyPeerAsyncOSS pipeline. - Round 11 —OPT_SPARSE_EMB_SYNC=1+OPT_IPC_TAPERED=1+OPT_OSS_IPC_SLICES=28(Tier N1):0.1149->0.1133s/update (2.0871x,-1.6ms/update) — 2-rank NVLink IPC12.6 MBsparse embedding sync & 28-slice tapered OSS IPC schedule. - Round 12 —OPT_FAST_CUBLASLT=1+OPT_FAST_RMS_BWD_V3=1+OPT_IPC_ALLREDUCE=1(Tier N1):0.1133->0.1072s/update (2.2059xon pre-migration host;0.1083s /2.1576xon post-migration host,-6.1ms/update) — directcuBLASLt128 MiBtuned Hopper GEMM/BMM dispatch, 384-threadRMSNormbwd, and zero-SM NVLink Copy-Engine DDPAllReduce. - Round 13 —OPT_FAST_CUBLASLT_V2=1+OPT_FUSED_CROSS_QKV=1+OPT_ADAM_READ_G16=1+OPT_IPC_AR_CTAS=528(Tier N1):0.1083->0.1065s/update (2.1941xon post-migration host0.23367s ref,-1.8ms/update,-3.37GiB peak memory) — compactbig_slotDDP scratch +output_projectionIPC fix,528-CTA DDP reduction,bf16-grad read inAdam, fusedCrossAttentionq/kv+RoPE, and2x1x1clusterffn2_fwd. - Round 14 —OPT_SM90_FLASH_RETENTION=1+OPT_SHARDED_L2NORM=1+OPT_VEC_U4_ROPE_PREP=1+OPT_FUSED_CROSS_ATTN=1(Tier N1):0.1065->0.1050s/update (time:0.1046s =2.2339x,check:2.2254x,-1.5to-2.1ms/update,-0.61GiB peak memory) — native Hoppersm_90aWGMMA causal Flash-Retention + fused cross-chunkqs@S/do@S^T/vs@d_kv^T/kr@d_kv+ SubLN + SwiGLU, 2-rank NVLink IPC sharded L2-norm,uint4RoPE/RMS/retention prep, and fusedCrossAttentionwithkv_grad_acc. - Directions that did not work: -torch._foreach_copy_(bf16_list, fp32_list)(Round 1), Python DDP comm hookMemcpy DtoD(Round 5/6), naive reverse-definition bucket ordering (Round 9), PyTorchUntypedStorage._share_cuda_()exit warning (Round 10). - Hopper__stcscache-streaming stores &K > 28OSS IPC slices, andnvcuda::wmma(sm_80m16n16k16) inner-retention kernels (Round 12). - Direct-SM NVLink P2P load without Copy Engine (49.79 msvs46.66 ms),OPT_IPC_TAPERED_V20.10start slice, anduint4shared-memorybf16->fp32scale (Round 13). - Single-CTA last-blockdWreduction inRMSNormbwd (2.49 msvs1.38 ms) (Round 14).