Whole-workspace rustfmt pass picked up while iterating on Mamba GPU backward work. Verified formatting-only via diff sampling; no logic changed. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Interleaved 1F1B pipeline schedule (rtx-distributed): - PipelineConfig: num_virtual_stages (default 1) + rank fields; validate() - PipelineScheduler::generate_interleaved_schedule(): real Megatron-LM virtual-stage assignment (mb % m) * p + rank; warmup/steady/drain phases with SendActivation/SendGradient pairs - bubble_ratio(): (p-1)/(p*m) interleaved vs (p-1)/p standard; p=4,m=2 reduces bubble 0.750 → 0.375; 4 new tests, 24 total pass Attention-selective activation checkpointing (rtx-distributed): - CheckpointPolicy::AttentionSelective { attention_patterns } — name-match on attn/attention/self_attn/cross_attn/mha; ~40% memory savings - CheckpointPolicy::Adaptive: replaced layer%2 stub with 3-tier heuristic (>4096MB→sqrt(n), >1024MB→every-other, ≤1024MB→all) - MemoryAwareCheckpointer: AtomicUsize pressure tracking, fallback-to-all when over target; re-exported from crate root; 14 new tests, 29 total pass Flash decoding (rtx-flash-attention): - flash_decode_cpu(): split-K attention with log-sum-exp chunk reduction; matches naive attention within 1e-4 for all tested configs - FlashDecodeKernel wrapper; num_splits_for_seq_len heuristic (256 tok/chunk) - flash_decode_forward.cu: 2-phase CUDA (per-chunk partial + reduce kernel) - SdpaBackend::FlashDecode: score 0.97 for seq_q=1 && kv>=1024; up to 50× speedup at 32K tokens; selected over other backends for long-context decode - 10 unit tests + 3 doctests + 1 backend selector test; all pass Co-Authored-By: Claude Sonnet 4.6 <[email protected]>