mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
Add clean-room MIT Blackwell (sm_120) and Ampere (sm_86) speedups for Qwen3.8-Flash-Next across IQ3_S, UD-Q4_K_XL, and NVFP4 with zero quality loss (STRATA_ROUTE_TAIL_SKIP=0; force_check.py PASS -0.042 pts, 0 events): - Prefill pipeline & CPU pool: - Warm CUDA GEMM libraries at init to remove cold cuBLAS stall (2.4-3.8x faster TTFT). - Pre-pin cpu_x/cpu_rows/cpu_ones + dedicated async cpu_x_stream D2H and ExpertPool::run_range parallel native_quant_act (host grouping 81->7 ms on RTX 5090, 114->16 ms on RTX 3090). - Parallelize in-memory PleTable::gather_batch across up to 8 threads and skip per-row madvise syscalls when --ple-io ram already faulted pages (eliminates ~40 ms FP8 PLE stall on NVFP4). - Upgrade x86 AVX-512 VNNI dot_nvfp4_q8_0 to mul_sum_i8_pairs_float and register ENTRY(NVFP4, Q8_0, nvfp4_q8_0) (138-147 GB/s CPU pool BW; quant_selftest PASS). - Optimize sm_120a/sm_121a mxf4nvf4 MoE prefill v3 (NT=256, single-pass TR=64, coalesced loads, 0 spills, 1.37x at T=8192). - Decode & DFlash2 verification: - Add clean-room sm_80+ BF16 Tensor Core DFlash2 attention (2.1x faster attention, -0.10 to -0.20 ms/round drafting). - Fix native_mmvq launch_multi chunking (>8 cols, 0 cuda_spill_guard spills) and keep interleaved native_mmvq_il for ncols 1..8 while routing ncols 9..16 to dense_i8_tc (with WARPS=1 small-N specialization). - Hoist Split<TG>::load outside NTC loop in native_gu_fused_kernel and extend to Q4_K, Q5_K, and NVFP4; add opt-in coalesced sm_120a nvfp4_decode_sm120 (STRATA_NVFP4_DEC_SM120=1) and opt-in vhead_bitplane (STRATA_VHEAD_BITPLANE=1) with out_nonfinite support. - Default sm_80+ Q8_0 HC to exact-FP32-activation gr_down_q8_fast + gr_up_q8_fast (0 KLD loss; opt-in INT8 TC via STRATA_HC_Q8_TC=1/2). - Defaults & tests: - Enable verified sm_120 and sm_86 defaults in nv_defaults.cpp (with STRATA_VERIFY_DEVICE_HITS=1 + auto pcie_frac=0 on >16 GiB single-GPU cards, preserving ADAPT_FETCH=2 on <=16 GiB cards) and update nv_defaults_test.cpp.