Gemini 4 Hydrogen 1.97×
Harness: Antigravity · switches: PYTORCH_CUDA_ALLOC_CONF=roundup_power2_divisions:16,garbage_collection_threshold:0.85 (VAE encoder channels_last: round 5's vae_model.encoder.to(memory_format=torch.channels_last) failed the interleaved-layout gate (2b), found by reverting changes one at a time; scored without that line, 1.97×)
- Judged
- 1.97×
- Tier
- N1
- Self-best
- 2.15×
- Rounds
- 10
- Hours
- 10.0
- API cost
- $53.0
- Input tokens · 94.3% cached
- 224 M
- Output tokens
- 2.4 M
- Requests
- 1,396
§ 02Key levers
- Attention kernel swap (split by mask structure)
- ✓ hand-written Triton block-sparse GQA attention (blocks from span metadata), 2.630 → 2.13 s; mid-window recompiles (window spread 0.1946) fixed with
do_not_specialize; round 10 bounding-box schedule + heaviest blocks first, attention microbenchmark 185.93 → 177.00 ms/step. No FlashAttention / FA3 in the log - Drop activation recompute (28 decoder layers)
- partial: ViT removed; the decoder's last setting (round 5) still recomputes the first 8 layers. Round 3 kept 12 layers, 2.13 → 1.900 s, 133.84 GiB reserved; round 4 kept 6, round 5 back to 8 for allocator headroom.
expandable_segmentsunavailable,cudaMallocAsyncOOM - Intra-layer MoT fusion (routing / RMSNorm / RoPE / SwiGLU)
- ✓ round 4 permute-once MoT layout + Triton RMSNorm / SwiGLU / QK norm + RoPE + scatter / linear CE (with recompute at 6 layers, 1.900 → 1.464 s); round 5 the two token types passed as a tuple through 28 layers; round 6 unmasked vectorized SwiGLU (forward 0.785 → 0.263 ms, bitwise); round 8 gate+up in one GEMM
- Optimizer, EMA, step start / end
- ✓ round 5 fused AdamW,
.item()/nonzerosyncs removed (~94 + 37 ms); EMA via lerp blocked by gate 3 in round 6 (−53.2σ), round 7 back to upstream and passed (2.0147×), round 8 a Triton EMA. Round 5'schannels_laston the VAE encoder is not in the scored config (failed gate 2b; the score is a re-judge without that line); a VAE side-stream prototype hit a race with FSDP's input cast, reverted - Other main levers
- FSDP forward prefetch + allocator settings (
roundup_power2_divisions:16, GC threshold 0.85), with SwiGLU vectorization 1.3625 → 1.2858 s, 2.6 s spikes gone; ViT as one FSDP unit (round 8 full check 2.1361×); reduce-scatter averaging directly,_foreach_norm(round 9 1.2140 s)
§ ARaw trace
Raw work log10 sections
0.0 hRound 1: Baseline Profiling
- Start time: 2026-11-19T18:16:00Z - Action: Profile unchanged reference (/submission/bagel_sft) withbench.py profile --from 8 --iters 3->/tmp/r1/profile- Results (profile.json& Chrome trace analysis on rank 0, steps 8..10): - Step wall times on rank 0: Step 8 =2.7498 s(2684.7 mstrace span), Step 9 =3.0138 s, Step 10 =2.4052 s(2318.5 msbefore post-opt exit). Peak allocated =82.13 GiB(~58 GiBheadroom), DataLoader__next__ = 0.11 ms(not IO bound), GPU active =93.2%. - True NV18 NCCL time on the bottleneck rank (Step 9/10): ~70 msReduceScatter +84 msAllGather (mostly overlapped). Step 8 shows1482.4 msReduceScatter wait because rank 0 had a lighter batch (6602tokens) and stalled waiting for a peer rank running heavy attention. - Step 9 Breakdown (3013.8 msspan): -PostOpt+Data+VAE: span46.6 ms(launches128.4 msof GPU kernels:cudnn_convolution48.2 ms,native_group_norm39.3 ms, EMAMT19.1 ms);aten::iteminsideBagel.forwardblocks115 mswaiting on VAE completion. -Forward: span893.4 ms, compute673.1 ms(GEMM 224.9,fmha_cutlassF 188.1,faF 3.2,IdxCat 66.7,Elem 169.3). -Backward: span1969.2 ms, compute1819.6 ms(GEMM 593.2,fmha_cutlassFrecompute181.5,fmha_cutlassB 505.4,faF 3.2,faB 10.0,IdxCat 163.9,Elem 380.9). -ClipGrad:9.4 ms;Opt.step:85.8 ms(MultiTensor 69.3,Elem 10.3,Red 3.3). - Key Optimization Plan: 1. Hotspot #1 (LLM Attention & Masking): Replace per-sample SM80EFFICIENT_ATTENTION+ 7x K/V repeat + per-layer float32->bf16 dense mask casts with a Hopper/Triton native-GQA block-sparse attention kernel + compact mask metadata derived inSimpleCustomBatch.cuda()(zero dense mask H2D transfer for fast path, zero straggler skew, exact on all interleaved layouts for Gate 2b). 2. Hotspot #2 (Full Activation Checkpointing): Disable unnecessarycheckpoint_wrapperlayers using the ~58+ GiBfree VRAM headroom (ViT, MLPconnector, most/all LLM decoder layers) to eliminate ~600-700 ms/steprecompute + 58 backward AllGathers while preserving N0 exactness. 3. Hotspot #3 (MoT Scatter/Gather & Elementwise Overhead): Eliminate repeated per-layernew_zeros/[idx]scatter/gather inQwen2MoTDecoderLayer&PackedAttentionMoT, and fuseQwen2RMSNorm, RoPE, and SwiGLU in Triton (plus check CrossEntropy). 4. Hotspot #4 (VAE, Syncs, Collectives, Optimizer/EMA): Removeaten::item&aten::nonzeroGPU syncs, fuse/coalesce logging syncs & collectives, useAdamW(fused=True), single-pass EMA update, andFSDPprefetch / VAE optimizations.
0.8 hRound 2: O(S) Span Attention Metadata + Triton Block-Sparse GQA FlashAttention
- Changes in/submission/bagel_sft: -data/data_utils.py(build_span_metadata_cpu),data/dataset_base.py(SimpleCustomBatch.cuda()post-digest metadata conversion +non_blocking=Truetransfers). -modeling/bagel/triton_attn.py(SpanAttnSchedule,_classify_grid_kernel,_pack_rows_kernel,_pack_cols_kernel,_fwd_kernel,_bwd_preprocess,_bwd_dq_kernel,_bwd_dkdv_perhead_kernel,_reduce_gqa_LHD_kernelwithdo_not_specialize+ 16-alignedspan_metarows guaranteeing 1 compile per kernel for all sequence lengths). -modeling/bagel/bagel.py,modeling/bagel/qwen2_navit.py: single per-stepbuild_span_scheduleand native-GQAspan_flash_attndispatch. - Catch & fix during benchmark: Initialtimerun hit 4 mid-run Triton recompilations (steps 5, 7, 11, 14) from varyingL/nb_ndivisibility and unalignedspan_meta[1..3]row pointers (window_range 0.1946). Fixed withdo_not_specializeon variable dims and 16-element row padding ofspan_meta(cache_entries == 1verified across 15 diverseLvalues). - Timing (bench.py time->/tmp/r2_time): -s_per_step = 2.13(windows[2.1101, 2.1499],window_range = 0.0187),speedup_vs_frozen_reference = 1.2346x,tokens_per_s = 19230,peak_memory_allocated_gib = 81.94. - Quick Check (bench.py check --quick->/tmp/r2_quick): -exact_items_ok = true,problems = [],status = NOT_BITWISE,layout_differs = false,peak_memory_allocated_gib = 81.92. - Git commit onoptrecorded.
1.0 hRound 3: Selective Activation Checkpointing Removal
- Change:train/fsdp_utils.py:grad_checkpoint_check_fnremovesCheckpointWrapperfrom all 26SiglipEncoderLayerblocks,MLPconnector, andQwen2MoTDecoderLayerlayers 12–27 (layer_idx < 12retained temporarily prior to Round 4 memory reductions). - Timing (bench.py time->/tmp/r3_time): -s_per_step = 1.9004(windows[1.9174, 1.8834],window_range = 0.0179),speedup_vs_frozen_reference = 1.3837x,tokens_per_s = 21553,peak_memory_allocated_gib = 111.05,peak_memory_reserved_gib = 133.84. - Observation:+29.11 GiBallocated for 16 LLM layers + ViT + connector (~1.6-1.8 GiB/layer), plus~22.8 GiBreserved allocator fragmentation (133.84 - 111.05), proving that Round 4 fused ops + chunked linear CE +expandable_segments:Trueare needed to reachK=0cleanly.
1.6 hRound 4: Permute-Once MoT + Fused Triton Norms/RoPE/SwiGLU/LinearCE + Partial AC (`K=6`)
- Changes in/submission/bagel_sft: -modeling/bagel/triton_ops.py: Added single-compile deterministic (do_not_specialize, chunkedBWD_CHUNKS=128non-atomic backward reductions) Triton kernels:invert_perm,permute_rows_nograd,bijective_permute,fused_rmsnorm,fused_add_rmsnorm,fused_swiglu,fused_cat_add,fused_mot_qk_norm_rope_scatter, andfused_linear_cross_entropy(single pass forN<=2048, chunkedchunk_size=2048above2048, returningfloat32matchingF.cross_entropy). -modeling/bagel/qwen2_navit.py: Permute-once MoT execution insideQwen2Model.forward_train,Qwen2MoTDecoderLayer.forward_train, andPackedAttentionMoT.forward_train(falls back cleanly ifmot_info is None). -modeling/bagel/bagel.py: Wiredfused_linear_cross_entropywhenlast_hidden_stateis CUDA bf16 andlm_head.bias is None. -train/fsdp_utils.py: Partial activation checkpointing (layer_idx < 6) balancing compute against allocator headroom (expandable_segments:Trueunsupported on this host;backend:cudaMallocAsyncOOMed at step 15 under FSDP multi-streamrecord_stream). - Timing (bench.py time->/tmp/r4_time3,switches.json = {"environment": {}}): -s_per_step = 1.4637(windows[1.4496, 1.4778],window_range = 0.0193),speedup_vs_frozen_reference = 1.7965x,tokens_per_s = 27985,peak_memory_allocated_gib = 107.50,peak_memory_reserved_gib = 133.79(one late retry spike at step 52 =2.6114 s). - Quick Check (bench.py check --quick->/tmp/r4_quick): -exact_items_ok = true,problems = [],status = NOT_BITWISE,layout_differs = false,peak_memory_allocated_gib = 106.75.
2.8 hRound 5: Tuple-Mode MoT + NHWC Triton-GN VAE + Async Coalesced Collectives + Sync Removal + Fused AdamW + Foreach EMA
- Changes in/submission/bagel_sft: -modeling/bagel/triton_ops.py: Hardened_FusedAddRMSNormFunc.backward(dh=None/dy=Nonesafety), addedbijective_permute_split,bijective_permute_cat,fused_dual_add, and coalesced NHWCtriton_nhwc_group_norm(Chan parallel stats + swish fusion, single compile per(C, swish)). -modeling/bagel/qwen2_navit.py: Passed 2-tuple(x_u, x_g)through all 28Qwen2MoTDecoderLayerlayers inQwen2Model.forward_train, avoiding per-layer cat/permute copies and 112SliceBackward0zero-fills. -data/dataset_base.py,modeling/bagel/bagel.py,modeling/bagel/modeling_utils.py: Precomputedvit_cu_seqlens,vit_max_seqlen, andmse_select_idxinsideSimpleCustomBatch.cuda()post-digest, eliminating per-stepaten::item(~94 ms) andaten::nonzero(~37 ms) GPU sync stalls; cached CPUTimestepEmbedderfrequencies (torch.equal). -modeling/autoencoder.py: Switched no-grad inferenceAutoEncoder.encodetochannels_lastNHWC conv +triton_nhwc_group_norm+ zero-copy NHWCAttnBlock+ direct paddedDownsample. -train/fsdp_utils.py,train/pretrain_unified_navit.py: Tuned partial AC tolayer_idx < 8(K=8) for allocator headroom, cached FSDP EMA flat-param pairs +torch._foreach_lerp_, enabledAdamW(..., fused=True), coalesced token counts into 1 asyncint64AllReduceoverlapped behind VAE+forward, coalesced logging/memory asyncAllReduces and removed redundant pre-logtorch.cuda.synchronize(). - Quick Check (bench.py check --quick->/tmp/r5_quick): -exact_items_ok = true,problems = [],status = NOT_BITWISE,layout_differs = false,optimizer = "torch.optim.adamw.AdamW". - Timing (bench.py time->/tmp/r5_time2): -s_per_step = 1.3625(windows = [1.3622, 1.3629],window_range = 0.0006),speedup_vs_frozen_reference = 1.9300x,tokens_per_s = 30062,peak_memory_allocated_gib = 103.92,peak_memory_reserved_gib = 133.84(still shows 2 isolated ~2.6s single-step spikes at steps 10 & 39; diagnosing in Round 6).
3.6 hRound 6: Vectorized Unmasked SwiGLU/DualAdd + FSDP `forward_prefetch` + CUDA Allocator Tuning
- Root causes diagnosed from Round 5 Chrome trace (/tmp/r5_prof,1353.5 msspan): -34.87 msexposedcudaFree/GC stalls at133.69 GiBreserved (30 GiBfragmentation gap over103.92 GiBallocated). -91.11 ms/stepexposedAllGather(forward_prefetch=False). - Maskedtl.load/tl.storein_swiglu_*(61.07 ms/step) and_dual_add_kerneldisabled 128-bit vector loads. - Changes: -modeling/bagel/triton_ops.py: AddedN_FULLunmasked vectorized fast path to_swiglu_fwd_kernel(0.785 ms -> 0.263 ms, bitwise identical) &_swiglu_bwd_kernel(1.608 ms -> 0.481 ms, bitwise identical), and combined_dual_add_combined_kernel(0.254 ms -> 0.097 ms, bitwise identical). Verified compile cache count =1each. -train/fsdp_utils.py: Enabledforward_prefetch=Trueinfsdp_wrapper(...). -/submission/switches.json: SetPYTORCH_CUDA_ALLOC_CONF="roundup_power2_divisions:16,garbage_collection_threshold:0.85". - Timing (bench.py time->/tmp/r6_time): -s_per_step = 1.2858(windows = [1.2949, 1.2766],window_range = 0.0142),speedup_vs_frozen_reference = 2.0451x,tokens_per_s = 31856,peak_memory_allocated_gib = 105.66,peak_memory_reserved_gib = 133.79(zero2.6sspikes across all 65 steps). - Full Judge Verification (bench.py check->/tmp/r6_check, stopped after Seed 1 report): - Gate 1 (timing):s_per_step = 1.2972(windows = [1.3144, 1.2800],window_range = 0.0265 <= 0.06,~2.027x),peak_alloc = 105.66 GiB,peak_res = 133.40 GiB. - Gate 2 (record):exact_items_ok = true. - Gate 2b (conformdet & prod): BOTHPASS(verdict = "conforming";R_N = 0.0317 <= 0.0420,R_J = 0.0261 <= 0.0420,R_B = 0.0140). - Gate 3 (trajSeed 1): 12/14 endpointswithin(|z| <= 1.21 sigma; losses within0.04 sigma!), ONLYdisp_ema_s050_100(-53.2 sigma) anddisp_ema_s100_140(-39.5 sigma) failed due totorch._foreach_lerp_vs upstreamtorch._foreach_mul_ + _foreach_add_fp32 rounding drift (measured2.38e-5per 10M weights over 10 identical steps withmul_+add_vs0.0withlerp_, matching0.0027on 14.6B params againstsigma_seed = 3.96e-5).
4.2 hRound 7: Restore Exact Upstream EMA Numerics (`_foreach_mul_` + `_foreach_add_`) & Full Check PASS
- Change:train/fsdp_utils.py:fsdp_ema_updatekeeps_EMA_PAIR_CACHEand avoids redundant.to(dtype=...)copies when dtypes already match, while executing exact upstreamtorch._foreach_mul_(ema_params, decay); torch._foreach_add_(ema_params, new_params, alpha=1 - decay)instead of_foreach_lerp_. - Full Judge Verification (bench.py check --tree /submission/bagel_sft --config /submission/switches.json --out /tmp/r7_check): - Overall Status:PASS(TierN1) - Gate 1 (benefit):s_per_step = 1.3052 svs2.6296 sref (windows = [1.2985, 1.3119],window_range = 0.0103 <= 0.06),speedup = 2.0147x,tokens_per_s = 31382,peak_memory_allocated_gib = 105.66,peak_memory_reserved_gib = 133.76. - Gate 2 (record):exact_items_ok = true,problems = [],layout_differs = false,other_optimizer_steps = 0. - Gate 2b (conformance, det & prod): BOTHPASS(verdict = "conforming"; detR_N=0.0317, R_J=0.0261 <= 0.0420; prodR_N=0.0318, R_J=0.0261 <= 0.0417). - Gate 3 (trajectory, 150 steps, Seed 1):PASS(verdict = "equivalent"on Seed 1 alone — all 14/14 endpointswithin,|z| <= 0.934 sigma;disp_ema_s050_100 = -0.012 sigma,disp_ema_s100_140 = -0.325 sigma).
6.9 hRound 8: Fused Stacked SwiGLU + SigLIP 2D RoPE + Fused VAE NHWC Kernels + Coalesced FSDP Wrapping + Triton FMA EMA
- Root causes diagnosed from Round 7 & intermediate trace analysis: -mlp.gate_proj.weightandmlp.up_proj.weightlie adjacent in FSDPFlatParameter(bias=False), permitting a single(N, 3584) x (3584, 37888)GEMM + strided SwiGLU forward/backward. - 26SiglipEncoderLayer+MLPconnector+TimestepEmbedderFSDP units added ~28 extra AllGather/ReduceScatter/reshard boundaries in ViT+head. - VAEResnetBlock&AttnBlockhad separate conv bias adds, residual adds,nn.functional.pad, and 3 separate QKV convs;SigLIP2D RoPE ran 10+ tensor ops per layer × 27 layers;foreachEMA launched 60 kernels. - Note: An initial Round 8 prototype adding an asyncvae_streamhit a race withFSDP._root_pre_forward._to_kwargscasting fp32padded_latent-> bf16 beforewait_event(mseblowup + allocator fragmentation);vae_streamwas diagnosed via unit checks and reverted (vae_model.encodetakes only ~17 ms/step synchronously). - Changes in/submission/bagel_sft: -modeling/bagel/triton_ops.py:_reduce_partial_dw_kernelcasts in-kernel (OutW.dtype.element_ty); removed.clone()in_FusedAddRMSNormFunc.backward; replacedzeros_likewithemptyfor active shards in_FusedMotQKNormRoPEScatterFunc.backward; addedtriton_nhwc_group_norm(..., conv_bias=None),triton_nhwc_bias_add_inplace,triton_nhwc_res_add_bias,triton_nhwc_pad_br1; added_FusedStackedSwiGLUFunc(_strided_swiglu_fwd_kernel,_strided_swiglu_bwd_kernel,fused_mlp_gate_up_swiglu); added_FusedSiglip2DRoPEFunc(fused_siglip_2d_rope); addedtriton_ema_update_pairs(_ema_update_sep_kernelmatchingdecay*e + (1-decay)*nnumerically). -modeling/bagel/qwen2_navit.py,modeling/bagel/bagel.py: AddedFusedLMHead(nn.Linear)delegatingfused_linear_cross_entropy; wiredfused_mlp_gate_up_swigluinQwen2MoTDecoderLayer.forward_train. -modeling/autoencoder.py: NHWC fusedAttnBlock(w_qkvlinear + SDPA +proj_outlinear),ResnetBlock(fusedconv_biasGN +triton_nhwc_res_add_bias),Downsample(triton_nhwc_pad_br1+bias_add_inplace),Encoder.conv_in. -modeling/bagel/siglip_navit.py: Wiredfused_siglip_2d_rope+ guarded.to(torch.bfloat16)inSiglipFlashAttention2.forward. -train/fsdp_utils.py: Wrapped ViT atSiglipVisionTransformergranularity ({Qwen2DecoderLayer, Qwen2MoEDecoderLayer, Qwen2MoTDecoderLayer, SiglipVisionTransformer, PositionEmbedding, FusedLMHead}), removing 26 per-layer ViT FSDP units; switched EMA updates on CUDA fp32 flat params totriton_ema_update_pairs. -data/dataset_base.py:.pin_memory().to(device, non_blocking=True)forspan_metaandmse_select_idx; GPUcumsumforvit_cu_seqlens. - Full Judge Verification (bench.py check --tree /submission/bagel_sft --config /submission/switches.json --out /tmp/r8_check): - Overall Status:PASS(TierN1) - Gate 1 (benefit):s_per_step = 1.2310 svs2.6296 sref (windows = [1.2407, 1.2214],window_range = 0.0157 <= 0.06),speedup = 2.1361x,tokens_per_s = 33274,peak_memory_allocated_gib = 106.01. - Gate 2 (record):exact_items_ok = true,problems = [],other_optimizer_steps = 0. - Gate 2b (conformance, det & prod): BOTHPASS(verdict = "conforming"; detR_N=0.0549, R_J=0.0454 <= 0.0697, ratio_n=2.360 <= 3.0; prodR_N=0.0549, R_J=0.0454 <= 0.0696, ratio_n=2.365 <= 3.0). - Gate 3 (trajectory, 150 steps, Seed 1):PASS(verdict = "equivalent"on Seed 1 alone — 14/14 endpointswithin, max|z| = 0.988 sigma;disp_ema_s050_100 = -0.004 sigma,disp_ema_s100_140 = -0.136 sigma).
7.7 hRound 9: FSDP `FULL_SHARD`+`ReduceOp.AVG`, Split/Cat Stream Decoupling, and `torch._foreach_norm`
- Root causes diagnosed from Round 8 FSDP microbenchmarks: - Withnum_replicate=1, num_shard=4across 4 GPUs,HYBRID_SHARDstill launchesReduceOp.SUM+ explicit per-shardtorch.div_(world_size)kernels in_post_backward_hook. Switching toFULL_SHARD(device_mesh=None) with aReduceOp.AVGcomm hook eliminates explicit post-reduction division kernels while preserving exact per-step gradient scaling. - DefaultFlatParamHandle._use_unsharded_views(as_params=False)bindsSplitWithSizesBackward0(CatArrayBatchedCopy) to_unshard_stream, serializing gradient concatenation against previous-layer backwardAllGathers and stalling the default compute stream (364 ms -> 262 msin 12-block FSDP microbenchmark). Routingas_params=Falseviews ontoroot_state._post_backward_streameliminates the stall without extra cross-stream autograd waits or extra peak VRAM. -fsdp_mod._get_grad_normlaunched per-shardlinalg.vector_normkernels sequentially insideclip_grad_norm_; overriding_get_grad_norm(while preservingFSDP.clip_grad_norm_itself for judgetrajhook capture) uses single multi-tensortorch._foreach_norm(..., 2.0, dtype=torch.float32)(0.0diff verified deterministically). - Changes in/submission/bagel_sft: -train/fsdp_utils.py: Added_install_fsdp_runtime_optimizations(),_avg_reduce_scatter_hook, and updatedfsdp_wrapper(...)(FULL_SHARD+ReduceOp.AVGwhenHYBRID_SHARDspans1 x world_size). - Timing (bench.py time->/tmp/r9_time): -s_per_step = 1.2140 svs2.6296 sref (windows = [1.2267, 1.2013],window_range = 0.0209 <= 0.06),speedup_vs_frozen_reference = 2.1661x,tokens_per_s = 33739,peak_memory_allocated_gib = 106.0,peak_memory_reserved_gib = 135.76. - Gate Verification (bench.py check --n1->/tmp/r9_check): - Overall Status:PASS(TierN1, Gates 0, 2b, 3). - Gate 2b (conformance, det & prod): BOTHPASS(verdict = "conforming"; detR_N=0.0549, R_J=0.0454 <= 0.0697, ratio_n=2.361 <= 3.0; prodR_N=0.0549, R_J=0.0454 <= 0.0698, ratio_n=2.359 <= 3.0). - Gate 3 (trajectory, 150 steps, Seed 1):PASS(verdict = "equivalent"on Seed 1 alone — 14/14 endpointswithin, max|z| = 0.910 sigma;disp_ema_s050_100 = +0.018 sigma,disp_ema_s100_140 = -0.197 sigma).
9.0 hRound 10: Hierarchical Bounding-Box Span Schedule + Longest-Row/Col Work Scheduling (`triton_attn.py`)
- Changes in/submission/bagel_sft/modeling/bagel/triton_attn.py: - Added_block_bounds_kernel(min/maxq_min/q_max/q_nid/k_nidper block) + hierarchical fast-accept/reject inside_classify_grid_kernel, avoiding full64x64mask evaluation on empty or uniform-span full tiles. - Emittedrow_work/col_workin_pack_rows_kernel/_pack_cols_kerneland sortedrow_order/col_orderdescending so heaviest blocks launch first across CTAs (_fwd_kernel,_bwd_dq_kernelwithmaxnreg=216,_bwd_dkdv_perhead_kernelwithtl.dot(..., acc=...)live-range tightening). - Paddedbndinner dimension to 16-element alignment and splitrwork/cworkso all 9 span attention kernels compile strictly once (cache_entries == 1) across arbitrary sequence lengths (det == 0.0). - Benchmarks: - Controlled A/B single-step attention microbenchmark (L=10097real packed layout,28 bwd + 36 fwd + sched):185.93 ms/step -> 177.00 ms/step(-8.93 ms/step;SCHED 0.328 -> 0.115 ms,FWD 1.057 -> 0.960 ms,BWD 5.269 -> 5.083 ms). - Pre-alignmentbench.py time --paired(/tmp/r10_time):1.2184 s/step(windows=[1.2315, 1.2053],2.1544xvs paired ref2.6249 s/step,peak_alloc=105.99 GiB). Gate check deferred to follow Round 11 FSDP + SigLIP/VAE optimizations.