Verdict: worth it with changes — but most of this PR belongs in the other repository
The measured work is real and points at a genuine bottleneck on the hardware the charter names (DGX Spark). What is wrong is not the idea, it is the placement and the evidence. Land the ignition/preparation/tuning.py hunk here (with one fix and one doc update); move the BF16 BMM component, the linear.py wiring and the component tests to local-inference-lab/hyperflare-recipes, as the maintainer triage comment of 2026-11-24 already said.
Why it is worth doing
- It matches the charter's hardware focus. The vision says Flare exists to "squeeze the most out of workstation and compact hardware—specifically SM120/SM121 workstations and DGX Spark." The change is specifically about GB10, where cuBLAS picks a 32x32 WMMA kernel for every layout of these strided head-stack batches and lands at roughly half of the device's copy bandwidth. That is a real, attributable kernel-selection gap, not a hypothetical one.
- The benefit is measurable and attributable at the operator level. On one GB10 at 8,192 rows: TP2 absorption 3.53 → 2.02 ms against a 1.84 ms plain-copy floor; TP2 expansion 2.62 → 2.02; TP4 absorption 1.77 → 1.00; TP4 expansion 1.27 → 1.01. The Triton tile is close to the byte floor, which is the honest way to show the remaining headroom is small.
- It is the right layer inside the recipe.
BatchedUnquantizedProjectionis a prepared, declared operator, it races through the existingnative_contract/native_planmachinery inignition/components/native_operator.py, uses no scratch, writes the caller's strided view, and exports its tuned choice. No runtime/Helios change, no per-model branch in shared code —flare.bf16_bmmis a general BF16 BMM, consumed by exactly one recipe geometry. That is consistent with "Python prepares; Rust serves prepared graphs." - The apparent b12x private-API risk is overstated. Touching
compile_plan._NATIVE_JITS,_lib.compile_poolandprogram_cachelooks like a new coupling, but it is already the house pattern:ignition/components/moe_sm103.py:31-33 (not opened),357,387,gated_norm_preparation.py:10-12(not opened),qk_norm_rope.py:11-17(not opened),region_selection.py:10-12(not opened),selected_attention.py:9-11(not opened),window_attention.py:9-11(not opened),window_staging.py:6-8(not opened),msa_attention.py:11-13(not opened) all do exactly this. It is not a reason to decline. - The
tuning.pychange fixes a defect the repo already knows about.docs/TODO.txton main (lines 185-187) records: "Invalidate b12x preparation discovery's cached compiler context when Inductor selects a different libdevice in the same process. Repeated GPU test preparation can restore program keys for the preceding library." Moving_set_triton_libdevice_path()to module import (PRignition/preparation/tuning.py:66, deleting the two deferred calls at the constructor and indeclare()) addresses that entry at its root, exactly as the charter's "address the root cause; don't just swallow, skip, or retry" asks.
Why it cannot merge as it stands
- Wrong repository for 5 of the 6 files. The repo has been split.
mainhas noignition/components/linear.py, noignition/recipes/, andignition/components/is restricted to the 14 Helios-ABI modules (AGENTS.md:385-392, enforced bytests/preparation/test_core_boundary.py:11-26,62-64). Addingignition/components/bf16_bmm.pyand editinglinear.pyfails that test on rebase.docs/model-development.md:276(not opened) already pointsUnquantizedProjectionathyperflare_recipes/components/linear.py(not opened). The PR body's own "no package metadata or Helios code changes" confirms none of it is runtime-ABI work. - The served-workload evidence the charter requires (#210) is not in this PR. The only end-to-end figure is 2945 tok/s vs 2620–2631 for packages that also contain other prefill changes, and the PR itself says that difference "is not attributed to this PR alone." My own arithmetic from the microbenchmarks: absorption saves 1.51 ms/layer × 45 layers ≈ 68 ms and expansion 0.60 × 45 ≈ 27 ms, so ≈ 95 ms per 8,192-token prefill pass — about 3.4% of a 2.78 s prefill at 2945 tok/s, and near zero in decode where row counts are tiny and cuBLAS may well win the race anyway. A 3½% prefill win is worth having; it is not worth merging on an unattributed combined-package number.
- Coverage holes on the hardware the charter cares about. GB10 tests, the GLM MLA checkpoint test, and SM103 were not run on this branch (PR Limitations). SM103 is named in the charter's goals. The branch is also stale and conflicted (
ignition/components/linear.py, reported 2026-11-13 for head0ba78ebevs main97cfeb0), and main'stuning.pyhas since growncollective_tuning/collective_ladder/tuning_shardsthat this branch lacks. - The import-time toolchain call may resolve the wrong libdevice — this is the one concrete defect I would block on. In the CLI path the CUDA toolkit location is installed by
ignition.cli.environment.apply()from[paths] cuda(ignition/cli/environment.py:36-61,config.py:161-164), called fromserve.py:211/322/476/587. But recipe modules that importignition.preparation.tuning(e.g.ignition/recipes/glm53/bootstrap.py:47(not opened)) are imported during model resolution, beforeenvironment.applyruns. Moving_set_triton_libdevice_path()to import time means the toolkit libdevice can be selected beforeos.environ["CUDA_HOME"]is set from configuration — the very identity mismatch the change is meant to remove, now possibly permanent. Before merging, confirm the import-time resolution sees the sameCUDA_HOMEthe session would have seen, or split the two concerns: patch install at import, libdevice selection still after environment configuration. - A smaller cost of the same move:
runtime_patches.apply()raisesPreparationErroron a torch/triton version mismatch (ignition/runtime_patches/__init__.py:81-82,103-106). Hundreds of test modules and tools importignition.preparation.tuning, so that failure now surfaces at import rather than at session construction. The new"import"subprocess mode intests/preparation/test_toolchain.py:46-49is the right shape of test; it should be joined by a case proving the CLI path still selects the configured toolkit. - Dead code left behind.
flare::bmm_outat PR-headignition/components/linear.py:89-96stays defined and registered but has no callers after the rewiring (flare::sm103_bmm_outat line 452 is the one still used). Delete it in the moved version.
Simpler way to the same end
- Ask b12x first. The MXFP8 sibling
BatchedQuantizedProjectionalready runs through b12x's owngemm.plan_bmm/gemm.bmmwitha_dtype="bfloat16"(ignition/components/linear.py:406-458). If b12x's BMM accepts a BF16-by-BF16 pair (b_dtype="bfloat16"), then one prepared b12x BMM replaces both this new Triton kernel and the_NATIVE_JITSregistration, and the two projection classes converge onto one mechanism. Charter principle 4 ("use FlashInfer/b12x directly, avoid interchangeable backends") makes this the first thing to rule out, and it costs an afternoon. - Do not duplicate the tile search. b12x coalesces equivalent declarations across layers (
docs/core-design.md:770-778), so the added compile-and-race cost is bounded by distinct shapes rather than by 45 layers; the_TILESfilter and the_tacticsrow-tile windowing (bf16_bmm.py:43-58) should be justified against b12x's existing autotuner menus rather than grown in-tree. raze the smallest tactic set that still wins on both GB10 and SM120, and let the race pick cuBLAS where the Triton tile loses (decode rows). - No new captured-graph operation contract is needed. The op is a shape/capacity variant behind the existing prepared-projection interface, so owner approval under
AGENTS.md:373-378is not triggered — worth stating explicitly in the description so reviewers do not have to derive it.
Costs
- Maintenance: ~184 lines of Triton plus a tuning contract, on a private b12x registry, for a single recipe's two projections. Acceptable if it lives in
hyperflare-recipes, where reusable b12x components belong; not acceptable in coreignition. - Risk: the import-time toolchain move changes process-wide bootstrap for every entry point, including tools and test fixtures that never construct a session. That is the largest blast radius in the PR for a few lines of diff, and it is why item 4 above must be resolved with a test before merge.
- Performance: no regression path identified — cuBLAS remains a raced tactic and is still selected wherever it wins, and the change adds no scratch and no allocation in the captured graph (the CUDA test asserts memory counters are unchanged across replay).
What would make me say plain "worth merging"
- Split as the 2026-11-24 triage directs: this repo keeps only the
ignition/preparation/tuning.pychange plustests/preparation/test_toolchain.py; the component, wiring and tests move to a linkedhyperflare-recipesPR with the validation evidence carried over. - Fix the
CUDA_HOMEordering in thetuning.pychange and add a test that the CLI configuration path still selects the toolkit libdevice; updatedocs/TODO.txt:185-187rather than leaving the fixed defect listed as open. - Re-run the affected checks after rebasing onto main (the branch is conflicted and behind on
collective_tuning/tuning_shards) and record GB10, RTX PRO 6000 and SM103 results on the rebased branch, not on the integration branch. - Add one served-workload measurement that isolates this change — same checkpoint, same package, this component on vs off — through an exported core per
docs/performance-work.md, replacing the unattributed 2945 vs 2620–2631 comparison.