Repository navigation
Reduce native packed decode tile and FC2 loader overhead - #34003
Rui Ren (rui-ren) wants to merge 4 commits into
Conversation
Use bounded aligned record windows for eligible IQ2 expert projections, retaining the existing unaligned and odd-block fallbacks. Specialize complete aligned NVFP4 R8 tiles without changing their operands or reduction order. Cover the minimum eligible FC2 window width in the existing precision regression. This commit is a local qualification candidate, not an end-to-end performance claim. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: rui-ren <ruiren1225@gmail.com>
The aligned IQ2 record window is correct, but shared-expert FC1 cases regress in the isolated matrix and every live production FC1 width is slower. Retain the original byte-code FC1 path while keeping the independently eligible FC2 window and complete NVFP4 tile optimization. Qualify this narrower candidate separately before publication. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: rui-ren <ruiren1225@gmail.com>
Single-row replay previously reduced two partial readouts while multi-row verification reduced four. Identical state updates could therefore produce different token activations. Retain four readout partitions for multi-slot caches; leave single-slot execution and the R8 path unchanged. Add an exact nonzero-state replay regression covering readout, normalized activation, convolution and SSM snapshots. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: rui-ren <ruiren1225@gmail.com>
Qualified opt-in ordinary decode: about 27% fasterUpdated the actual stack33967 tip The ordinary decoder was computing eight target rows while committing only the first. R1 also exposed a real Mamba inconsistency: its readout reduced two partials while R8 Unprofiled frozen real30, six H100s, two reversed same-GPU passes, 240 complete measured
Ordinary TTFT medians: short 357.35→359.00ms, medium 826.97→831.29ms, Separate same-GPU synthetic-2048 CUDA profiles, 64 captured target passes: Correctness: all240 exact same-mode sequences and complete counters match; Scope: hybrid is ordinary-only. Both speculative arms use the original R8 package. Reproduce the exact tested graph/config with: python examples/python/nemotron-bolt-hybrid.py --input <packed-r8> --output <fresh-same-filesystem-hybrid>Requires onnx-ir/numpy/ml-dtypes and both updated runtimes. External-data validation Pins:
Full commands, per-case exact tokens/counters, raw kernel traces, provider maps, |
Reduce live FC1 accumulators for aligned eight-row inputs by computing sixteen independent output columns per CTA. Preserve the existing four warp K partitions, reconstruction, BF16 casts and FC2 path. Leave one-token decode and offset bindings on their existing dispatch. Exercise the row-count and route-count boundaries at both 1024- and 4096-wide hidden inputs using independent expected values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: rui-ren <ruiren1225@gmail.com>
Latest qualified update: exact R8 FC1 tiling
Adds commit
a51424a8f3f78b3c57a9ce1dc99096380e5b87e0above the previously accepted0357a7dfe47d3c383bf36be62015162b6a612d5e, in place on native stack #33967. No stack members or PR bases change.Aligned eight-row IQ2 FC1 now computes 16 rather than 32 independent output columns per CTA, reducing registers from 71 to 64. The original four K partitions, reconstruction, BF16 casts, MMA and FP32 reduction order remain unchanged. FC2, one-token decoding, and offset bindings retain their existing paths.
Fresh H100 real30 comparison against
0357, with unchanged GenAIdb6ffd29fc96e319f645ff461efa05c643235f29from native stack microsoft/onnxruntime-genai#2924:Rates are pooled decoded tokens / decode time, excluding TTFT, over two reversed same-physical-GPU passes and 240 complete measured generations. Both arms use the same previously qualified hybrid ordinary graph and the same original R8 k7 graph. Original prompts, warmups, mode order, EOS/512 cap, complete token IDs, and entire speculative counter dictionaries are preserved. Other sessions occupied the remaining GPUs; this comparison ran serially on idle GPU1 under the unchanged foreign-client/VRAM guards.
Both passes improve every k7 bucket. Long-bucket improvement is 0.95%; ordinary performance is preserved. Actual longest-prompt CUDA profiles show about 4% lower FC1 device work, unchanged FC2 dispatch, and identical work counts/tokens/counters. This is an incremental gain, not resolution of the remaining speculative throughput gap.
Qualification:
CUDA provider SHA-256:
567960ed30c6135f146fe8ff8b8216e3975ec382cbc36eaa757f8cb23c5e0a49.Durable evidence:
/opt/bolt-runtime-fixes-20261108-v1/evidence/k7-fc1-tiling-v1/FINAL.json, SHA-256eec6bc6c45472c9ac056777c4520c14d113ca366b0dcdf062a446a4d7e31a0f5.Limitations: incremental production-flag rebuild, not a clean full build, hosted CI, new independent HF comparison, or rebase onto the advanced lowest stack head. No merge is requested. No experimental Q8/scheduling changes are included.
Earlier layer qualification (historical)
Description
Extend #34002 on the actual native merge stack #33967 with two guarded loader/tile optimizations:
Motivation and Context
The actual loaded CUDA profiles attribute remaining latency to packed projection/weight reconstruction. A broader FC1 window was rejected after production profiling; no repacking or precision change is included.
Same native model package and corrected GenAI
c0fd01914265d5157d6da1376c38b4df521a76c5in both arms. H100 unprofiled real30 acceptance, six GPUs, 240 complete measured generations, same physical GPU per pair and two reversed passes:Rates are pooled decoded tokens / decode time, excluding TTFT; exact same-mode token IDs and all speculative counters are unchanged. This is a small additional gain, not resolution of the remaining public-reference gap.
Validation on the exact candidate head:
Candidate:
f0a529d9fd4f7a134701e908130b2dfaac66810a; baseline:1b5063c4af651e12bf955bc978c9312e2734a9f9.CUDA provider SHA-256:
7da68e2302f0bab39d980cdc7d880c0d9e1ddea170aab60343a4b5a997d9eefd.Packed weights SHA-256:
06d3d508e8d11235d0b770484b6b59764c2f297c3383b6d0de75648d26c11867.Local checksummed evidence:
/opt/bolt-runtime-fixes-20261108-v1/evidence/merge-stack-kernel-gap-v1/production-v2/FINAL.json(SHA-2560d0617eb1df8f93960416b857c71f181a1fb9eb37b63310cd7ab3033668a83ec). Complete commands, outputs, token IDs, state hashes, provider maps and profiles are preserved in its gates.Limitations: incremental production-flag provider/test rebuild, not a clean full build, hosted CI, fresh independent HF comparison, or rebase onto the advanced lowest stack head. No merge is requested.