Opened by a workflow run, Nov 25, 2026 11:31 PM EST.
screen malicious
Screen Result: All Clear
Evidence: No prompt injection, hidden instructions, encoded payloads, or other content aimed at causing unwanted agentic behavior was found in PR #231 ("Race a Triton tile kernel against cuBLAS for GLM's BF16 head projections", head 0ba78eb, author original-el8, 6 files, +373/−16).
- PR description and all 3 PR comments reviewed: ordinary author triage notes (kernel-perf categorization, a merge-conflict notice on
ignition/components/linear.py, a repository-split note pointing the recipe portion atlocal-inference-lab/hyperflare-recipes). None addresses or instructs an AI agent, and none asks for credentials, data movement, or unreviewed commands. - All six changed files read at the PR head:
ignition/components/bf16_bmm.py1-184 (new),ignition/components/linear.py1-110,ignition/preparation/tuning.py1-140,tests/components/test_bf16_bmm.py,tests/components/test_bf16_bmm_cuda.py1-123,tests/preparation/test_toolchain.py1-84. Nothing in them reaches the network, shells out, writes files, or evals strings. - Targeted pattern sweeps via
search_codeat refpr/231returned no matches for prompt-injection or exfiltration phrasing (ignore previous|disregard|system prompt|you are an ai/assistant/agent|exfiltrat|base64|os.system|__import__|eval(|exec(|curl|wget|api key|secret), nor for agent-directed words (agent|autobot|claude|copilot|assistant|reviewer|approve|inject|ignore) in the component or its tests. - Non-ASCII/hidden-character sweep
[^ -~]across the changed files found only a pre-existing·middle dot in a display string attuning.py:533, which is not in the diff. No zero-width or bidi characters anywhere. - The only executed string is
subprocess.run([sys.executable, "-c", source])intests/preparation/test_toolchain.py, and the embeddedsourceis a self-contained assertion script (prints CUDAOptionsextern_libs/hash, asserts identity) with no network or filesystem access.
Legitimate review concerns, reported as design/process risk rather than security: tuning.py:66 now runs _prepare_compiler_toolchain() (CPU-side ignition.runtime_patches.apply() monkey-patching plus Inductor's _set_triton_libdevice_path) merely on importing ignition.preparation.tuning, i.e. import-time side effects for every importer including test collection; and bf16_bmm.py:108 adds the kernel to b12x's private compile_plan._NATIVE_JITS registry, which the PR limitations disclose. CI on the head commit fails and a comment reports an unresolved merge conflict in ignition/components/linear.py; neither is an injection signal.
The full report repeats this with file/line citations, then lists open questions and what could not be checked.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: Jason Cook (original-el8, COLLABORATOR, charter "priority contributor"; commits authored as "Jason Cook"/jasonc; no Discord handle given)
Motivation: GLM-5.3-Flash's MLA query absorption and value expansion run BF16 batched matmuls through BatchedUnquantizedProjection, which called torch.bmm; on GB10 cuBLAS picks a 32x32 WMMA kernel that only reaches about half the device's copy bandwidth. The PR races cuBLAS against a Triton tiled kernel during preparation and keeps whichever is faster on the preparing device.
Scale: +373 / −16 lines in 6 files
Proposal:
- New component
ignition/components/bf16_bmm.pydeclaring aflare.bf16_bmmnative plan whose prepared tactic race is cuBLAS versus seven Triton tile shapes, with FP32 accumulation, one BF16 round, no scratch, and the caller's strided output view. - Rewires
BatchedUnquantizedProjectioninignition/components/linear.pyfrom an inlinetorch.bmmcustom op tobf16_bmm.declare_bmm/bf16_bmm.execute. - Makes
_prepare_compiler_toolchain()(runtime patches + CUDA toolkit libdevice) run at import ofignition.preparation.tuninginstead of at session construction, so per-tactic Triton kernels compiled before a session carries the identity native discovery declares. - Registers the kernel in b12x's private
compile_plan._NATIVE_JITSso compile workers evict its deferred planning entries. - Tests: CPU tactic-selection/validation tests, 5 CUDA tests (≤1 ulp per tactic, row-tail masking, prepared race + CUDA-graph replay with zero allocation), and a new "import" case in
tests/preparation/test_toolchain.py. Touches: ignition/components/linear.py— rewrittenBatchedUnquantizedProjectionconstruction path, file deleted on main by the repo split.ignition/components/bf16_bmm.py(new) — new custom opflare::bf16_bmm, new native contract, private b12x imports.ignition/preparation/tuning.py— import-time toolchain preparation, a process-wide side effect for every importer. Related items:- #471 Add GLM 5.3 TP8 recipe and PCIe speculative decode optimizations (open): rewrites the same class with the opposite stride policy (staging copy for interleaved sources) versus #231's stricter rejection.
- #509 Fix Ignition storage lowering, guard pickling, and compiler worker startup (merged): already installed runtime patches in compile workers (
CompilePool.submit_payload), overlapping part of the toolchain story. - #132 Declare benchmark calls and operand alignment for raced b12x tactics (open): same author, edits the same tuning.py/component area, same self-triage.
- #88 Resolve compiler math libraries before native preparation (merged): origin of
_prepare_compiler_toolchainandtest_toolchain.py, which this PR extends to import time. - #312 Shorten Inkling 2 prefill and drafting rounds on DGX Spark TP4 (open): same author, same labels, same triage sweep.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/231
Autobot comments: The description omits three things a reader needs: (1) main's repo split (da037284, 2026-11-22) deleted
ignition/components/linear.pyand all model components, andtests/preparation/test_core_boundary.pynow pinsignition/components/to 14 files, so the component half of this PR no longer has a home in this repository — the author's own 2026-11-24 comment concedes only the tuning.py change can remain; (2)query_from_callnewly rejects operands thattorch.bmmaccepted (requires 16-byte-aligned data pointers, contiguous source/output rows, K- or N-contiguous weight), which is a behavioral regression for existing GLM and Kimi K3/K3.1 callers and directly collides with #471; (3) the import-time move runsruntime_patches.apply()— hard-failing on any torch != 2.14.1+cu132 / triton != 3.8.0 — at import of a module that ~60 component and test modules import, not only in a session. Evidence gaps: the GB10 kernel timings have no attached logs or script, the "bitwise equal to torch.bmm" claim is not enforced by any test (the CUDA contract is ≤1 ulp), the only served-workload number is a combined package that the description itself says is "not attributed to this PR alone", and the headline GB10/full-GLM validation was run on a different branch. The branch has had no code change since 2026-11-07, has an unresolved conflict, and adds a new captured-graph operation contract that perdocs/design-review.mdneeds prior owner approval (Luke Alonso); thetriage:design-reviewlabel has had no review. Head CI is red, but the only pull_request workflow is Rust-only, so that says nothing about the Python claims.
Value Proposition
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.
Full report · Notes Decide Value: yes (85%): This change is worth reviewing: it provides value to the project in line with its charter.
Simplicity
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
ignition/components/linear.py:89-96: the PR deletes the only caller offlare::bmm_outbut leaves the custom op and its fake registration dead in the module; delete the eight lines.ignition/components/bf16_bmm.py:26,108:_NATIVE_JITSis mutated insidecompile_bmmthrough the privatecompile_planmodule, wheresm103_projection.py:33,258andmoe_sm103.py:31,357import the set directly and register once at module scope; move it out and drop the module import.
Nits: 2 — tests/components/test_bf16_bmm.py:21-33 restates the _TILES table and its filter expression instead of a behaviour; bf16_bmm.py:156-162 exposes prepared_state for one test caller (siblings inline the materializer as a closure), and linear.py:70-74 uses the package's only Sphinx :mod: role in a docstring.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/231
Architecture
Verdict: blocking issues
Blocking:
- ignition/components/bf16_bmm.py:1 (and linear.py, tests/components/test_bf16_bmm*.py): five of the six changed files are a reusable BF16 projection block plus its component tests, which AGENTS.md:385-392 and docs/design-review.md:31-37 assign to hyperflare_recipes/components/, not ignition/components/; the PR's own 2026-11-24 triage comment says the same and keeps only the tuning.py change here.
Should fix:
- ignition/preparation/tuning.py:66: the module-level
_prepare_compiler_toolchain()call movesruntime_patches.apply()and the Inductor/Triton libdevice switch to import time of a module ~60 components import at module scope, inverting the "environment before patches" ordering documented in ignition/cli/environment.py:5-11 and turning a torch/triton version mismatch into an import-time PreparationError; it should stay on the paths that actually compile Triton programs (session construction/declare, plus the component's compile entry point).
Nits: 2
Link: https://github.com/NVIDIA/hyperflare-inference/pull/231
Detail: the blocking finding is corroborated three ways — tests/preparation/test_core_boundary.py:11-26,62-64 asserts ignition/components/ holds exactly the 13 Helios-ABI modules (main does; the PR head has ~100, including bf16_bmm.py and linear.py), and docs/model-development.md:276 already points UnquantizedProjection at hyperflare_recipes/components/linear.py (not opened). docs/design-review.md:125-136 forbids waiving the boundary for a performance gain. The second finding rests on reading tuning.py:47-66 against environment.py:36-61 and runtime_patches' version guards; what would settle its severity is a test that imports a component module with non-default CUDA_HOME/TRITON_CACHE_DIR and checks the resulting cache location. Cleared through this lens: scratch-free plans, native_plan/native_contract use, stride/alignment rejection, mutates_args and fake registration, the declared FP32-accumulate/single-rounding numeric contract, and the PR description's separation of measured vs unattributed results. Not investigated: the CI failure on head 0ba78eb, and kernel-quality questions, which the charter reserves for concrete defects only (none found).
Conventions
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- ignition/components/linear.py:89-96:
flare::bmm_outand its fake are now dead — this PR removed their only caller (was_bmm_out(source, self.weight, self.output), nowbf16_bmm.execute(...)at linear.py:85); repo-wide search finds no other reference (sm103_bmm_outat linear.py:463 is unrelated). Delete both. - ignition/components/bf16_bmm.py:174:
input_factory(...)omitssession=session, unlike every sibling caller (linear.py:130, 143, 354; mla_norm_quant.py:46; varlen_attention.py:56), socandidate_inputs(fixtures/resources.py:24-36) never callssession.release_benchmark_cache()before allocating the race fixture. - ignition/components/bf16_bmm.py:176-179: hand-rolls the
PreparedCall(run, produce, output, owners)thatignition/preparation/fixtures/bf16_gemv.py:10-16already provides and that both other BF16 projection paths use (linear.py:129, 142). Reusepartial(bf16_fixtures.benchmark_call, bias=None). - ignition/components/bf16_bmm.py:153 and 102-103: re-implements
tensor_facts/metadata_tensor(selected_attention.py:27-33, reused by qk_norm_rope.py:25,71, window_attention.py:89) as inline(shape, stride)tuples plustorch.empty_strided(..., device="meta"); reuse the shared pair or justify BF16-only facts in the docstring. - ignition/components/bf16_bmm.py:121-123:
State.runre-checks shapes/strides on every invocation, i.e. inside the captured forward on every replay; siblings validate once at declaration (query_from_call; qk_norm_rope.py:80-84, gated_norm_preparation.py:55-57).
Nits: 3 — bare-string "cublas" tactic vs uniform tuple tactics in every sibling contract (bf16_bmm.py:57,158,172,117); _NATIVE_JITS mutated inside compile_bmm (bf16_bmm.py:108) via from b12x._lib import compile_plan (line 26) instead of at module scope with a named import (moe_sm103.py:31 (not opened),357,387; sm103_projection.py:33,258); CUDA test helpers re-derive glm_stacks()/the double-precision reference already in tests/components/test_bf16_bmm.py:13-18 and tests/recipes/test_glm53_bmm_cuda.py:84-86.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/231
Prose
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- ignition/components/bf16_bmm.py:7-9: the module docstring states FP32 accumulation and one BF16 rounding as the operator invariant, but the champion cuBLAS tactic (
torch.bmm, line 125) leaves BF16 reduced-precision reduction enabled, so the claim only holds for the Triton tile; the PR description repeats it. - ignition/preparation/tuning.py:66: moving toolchain preparation to module import contradicts documented ordering (docs/preparation-development.md:59-63, ignition/cli/environment.py:5-10), where
runtime_patches.apply()and the libdevice choice follow dependency environment setup that sets CUDA_HOME; neither the description nor a test establishes where the import-time point sits relative toenvironment.apply. - docs/TODO.txt:185-187: the open entry about a cached compiler context serving program keys for the preceding libdevice is not updated or removed, though this PR addresses that failure class (AGENTS.md:340-343).
Nits: 3 — "forward math libraries" is an unexplained identifier in the tuning.py:48 docstring; the bf16_bmm.py:16-17 claim that RTX PRO 6000 reaches "near its byte floor" has no measurement in the PR description (its tables are GB10 only); a stray print of the selected tactic is left in tests/components/test_bf16_bmm_cuda.py:96.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/231
Correctness
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- ignition/components/bf16_bmm.py:108:
compile_plan._NATIVE_JITS.add(_bmm_kernel)runs inside the body of the@program_cache-decoratedcompile_bmm, so the registry entry exists only after a cache miss; every other component registers at module scope unconditionally (moe_sm103.py:357 (not opened),387; sm103_projection.py:258 (not opened)).
Nits: 2 — the now-dead flare::bmm_out custom op (linear.py:89-96), and the diagnosability change from preparing the compiler toolchain at import (tuning.py:66), where a torch/triton version mismatch now surfaces as a PreparationError raised by importing ignition.components.linear rather than by constructing a session.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/231
Subtractive
Verdict: make it smaller first The change: +373 / −16 lines Could remove: about 349 lines in 1 place (the other-repository scope); a further ~22 lines in 4 places if the component stays here Biggest subtractions:
ignition/components/bf16_bmm.py(184),ignition/components/linear.py(17),tests/components/test_bf16_bmm.py(44),tests/components/test_bf16_bmm_cuda.py(122): recipe-owned model execution; replace with nothing in this repository, moving the work tohyperflare_recipes/components/: about 349 linesignition/components/linear.py:89-96: deadflare::bmm_outcustom_op + fake, deleted by the diff's own call-site removal; replace with nothing (onlysm103_bmm_outsurvives, at :452/:463-470): about 8 linesignition/components/bf16_bmm.py:120-123: per-call shape/stride revalidation thatquery_from_callalready enforced when the plan was declared; replace with nothing: about 5 linesignition/components/bf16_bmm.py:176-179: privatebenchmarkclosure duplicatingignition/preparation/fixtures/bf16_gemv.py:10-16; replace withpartial(bf16_gemv.benchmark_call, ...): about 5 linestests/components/test_bf16_bmm.py:31-33andtest_bf16_bmm_cuda.py:63: a tautological tile-width test and a redundant ULP-fraction threshold; replace with nothing: about 4 lines Left behind:ignition/components/linear.py:89-96(flare::bmm_out+_fake_bmm_out, now with no caller); also, if merged as-is,tests/preparation/test_core_boundary.py:62-64fails against the fixed 13-moduleRETAINED_IGNITION_COMPONENTSset at lines 11-26, andignition/recipes/glm53/mla.py— the only in-repo caller — no longer exists onmainLink: https://github.com/NVIDIA/hyperflare-inference/pull/231
Pre Test Report
Pre-test report — PR #231 "Race a Triton tile kernel against cuBLAS for GLM's BF16 head projections"
Recommendation: DO NOT refer to hardware testing yet. Return to author.
Reason: the change cannot land in its current shape. Four of its six files are out of scope on main after the repository split, one of the two runtime hunks must be re-resolved against a tuning.py that has moved, and several concrete defects (dead custom op, conditional kernel registration, an untested ordering regression in a process-wide side effect) have to be fixed first. Any GPU time spent on 0ba78eb would be spent on code that will be rewritten, rehomed and rebased. A minimal, conditional hardware plan is supplied at the end for when the blockers clear.
1. Verified state of the PR against main
| Check | Result |
|---|---|
ignition/components/*.py on main |
exactly __init__.py (not opened) + 13 modules (capacity, collectives, completion, engram, flashinfer_sampling, logprobs, ngram_delivery, readiness, sampling, state, state_transfer, vision_delivery, vision_state). No linear.py (not opened), no bf16_bmm.py. |
ignition/recipes on main |
does not exist (verified: list_files ignition/recipes → no files). tests/preparation/test_core_boundary.py:40-48 asserts it must not exist. |
tests/preparation/test_core_boundary.py:62-64 (main) |
assert actual == RETAINED_IGNITION_COMPONENTS — exact set equality. Adding bf16_bmm.py fails this test. |
AGENTS.md:385-392 (main) |
"Keep ignition/components/ limited to the 13 Helios-ABI runtime interface modules… Put reusable b12x/Triton model execution mechanisms in hyperflare_recipes/components/." |
PR head 0ba78eb |
18 days old, predates the split; author reports an unresolved conflict in ignition/components/linear.py (not opened); head CI red. |
| Author's own triage comment (2026-11-24) | Concedes only the ignition/preparation/tuning.py change can remain in this repository. |
Blocking items confirmed, not merely review opinion:
- Out of repository scope.
ignition/components/bf16_bmm.py(+184, new),ignition/components/linear.py(not opened) (+8/−9, file deleted onmain),tests/components/test_bf16_bmm.py(not opened) (+44),tests/components/test_bf16_bmm_cuda.py(+122) — 349 of 373 added lines — belong inlocal-inference-lab/hyperflare-recipes.docs/design-review.md(not opened) principle 15 explicitly forbids waiving the boundary for a performance gain. Merging failstest_core_boundary.pyoutright. - The motivating caller no longer exists. The only in-repo user of
BatchedUnquantizedProjectionwasignition/recipes/glm53/mla.py(not opened), whichmainhas removed. Onmainthis PR has zero in-repo behavioural effect on served workloads. - Needs a maintainer placement decision, not just a rebase. Whether a raced BF16 batched matmul is a shared b12x-level mechanism or a recipe component is unanswered in the PR (reviewers flag
b12x.gemm.plan_bmm/bmmalready used by the MXFP8 sibling as a cheaper alternative). Testing cannot settle that. tuning.pyhunks must be re-resolved.main'stuning.pyis 829 lines with_prepare_compiler_toolchainat 53-66, the call in__init__at 108, anddeclareat 799 (call at 804). The PR's deleted hunk lands at different offsets after rebase; the change must be re-reviewed, not assumed mechanical.
2. Substantive defects that must be fixed before any test run
S1 — import-time toolchain preparation inverts the documented ordering (runtime half, high risk). The PR adds a bare _prepare_compiler_toolchain() at ignition/preparation/tuning.py:66, running runtime_patches.apply() and Inductor's _set_triton_libdevice_path() at import of a module ~45 component modules, the fixtures, and every recipe bootstrap import (verified by search). ignition/cli/environment.py:5-11,36-61 documents and implements the opposite order: it sets TRITON_CACHE_DIR (line 47) and CUDA_HOME (line 54) before runtime_patches.apply() (line 61). ignition/cli/serve.py:14 imports ignition.planning at module scope, and every environment.apply(...) call is inside a function (serve.py:211/322/476/587), so the toolchain preparation now runs before the configured environment exists. Consequences:
- The toolkit libdevice can be selected before
CUDA_HOMEis set from configuration — the identity mismatch the change exists to remove. runtime_patches.apply()hard-fails (PreparationError) on a torch/triton version mismatch at import of the components/fixtures tree, i.e. at test collection, not at session construction.- The new test case does not cover this:
tests/preparation/test_toolchain.py:76-77runs withCUDA_VISIBLE_DEVICES=""and popsTRITON_LIBDEVICE_PATH, and never callsenvironment.apply. Theimportparameter (:16,46-49) verifies the identity equals the post-switch identity, not ordering against configuration. In a parent shell that already hasCUDA_HOMEset, the test passes while the CLI path may still be wrong. - I could not read
_set_triton_libdevice_path(torch internals) to prove whether the wrong path is actually latched; that is precisely why a configuration-ordering test, not a GPU kernel test, is the required evidence.
S2 — dead custom op. ignition/components/linear.py:89-96 (not opened): the PR deletes the only caller of flare::bmm_out and leaves the op plus its fake registered. Repo-wide search for bmm_out returns only this pair and the unrelated, still-used flare::sm103_bmm_out (linear.py:452 (not opened),463-469). Dead public operator surface; delete in whichever repository the file ends up in.
S3 — conditional kernel registration. ignition/components/bf16_bmm.py:108 adds _bmm_kernel to b12x's private compile_plan._NATIVE_JITS inside the @program_cache-decorated compile_bmm (line 99), so registration happens only on a program-cache miss. The sibling components register unconditionally at module scope (sm103_projection.py:258 (not opened), moe_sm103.py:357 (not opened)/387 per reviewers). The comment at bf16_bmm.py:105-107 states a requirement that the placement only half-satisfies; the fix is a two-line move and is strictly safer.
S4 — new rejection of layouts torch.bmm accepted. query_from_call (bf16_bmm.py:142-153) now refuses non-16-byte-aligned bases, non-contiguous source/output rows, and weights contiguous in neither K nor N. That is correct for the Triton tile, but it is a behavioural regression for any existing caller and directly collides with open PR #471, which rewrites the same class with the opposite (staging copy) policy. This must be resolved as a decision before the component is rehomed.
Lower-severity, fix while touching the code (not worth their own test cycle): bf16_bmm.py:174 omits session=session, so fixtures/resources.py:30-33 never releases the session's benchmark cache before the race allocates (memory spike only — the owners tuple keeps storage alive, so no correctness break); bf16_bmm.py:176-179 hand-rolls the PreparedCall that fixtures/bf16_gemv.py:10-16 (not opened) already provides; bf16_bmm.py:120-123 re-validates shapes/strides on every captured replay when query_from_call already enforced them (hot-path cost, and inconsistent with siblings); the module docstring at bf16_bmm.py:7-9 and the PR description claim FP32 accumulation with one BF16 rounding as the operator invariant while the champion tactic is torch.bmm (reduced-precision BF16 reduction may be enabled by default); docs/TODO.txt:185-187 on the head records exactly the libdevice failure class this change addresses and is neither updated nor closed; a stray print at test_bf16_bmm_cuda.py:92.
Not defects: kernel code (charter permits concrete defects only — none found), tactic filtering matches the unmasked loads, scratch_bytes=0 holds for both tactics, the mutating-op + fake registration follows house pattern, and the relocated stride/dtype validation is not weakened.
3. Expected value of a hardware test right now: low
- The component half would be tested on code that must move to another repository and, at minimum, change in three places (S2-S4) first. cn5 (RTX PRO 6000 / SM120) results from a stale, conflicting branch would not transfer.
- The runtime half's genuine risk (S1) is CPU/environment-ordering, not GPU compute. It is settled by a subprocess import-order test comparing
CUDAOptions().extern_libs/hash()before and afterenvironment.apply, plus the existing toolchain test — no GPU work, no cn5/cn7 allocation. - The PR's own performance numbers (GB10 8,192 rows: TP2 absorption 3.53 → 2.02 ms vs a 1.84 ms copy floor; TP4 1.77 → 1.00 ms) already answer the "is the kernel viable" question. What is missing is not more GPU time on the kernel; it is an isolated end-to-end (component on vs off) measurement per
docs/performance-work.md(not opened), which only becomes meaningful after the change is rehomed onto a rebased tree. - cn7 (single GB10, 10 CPUs) is the only host here with the architecture the motivation cites; a single GPU also means TP2/TP4 projections cannot be exercised as claimed, and
glm53is not onmain. cn5's four RTX PRO 6000 cards are SM120, already reported as passing five CUDA tests, so re-running them adds almost nothing.
4. Minimal hardware plan — run only after blockers clear
Execute once, after (a) the split is done — component in hyperflare-recipes, runtime change rebased onto main — and (b) S1-S4, the session= omission and the docstring claim are fixed. Budget ~1.5 GPU-hours total; nothing here is worth repeating per-architecture "just in case".
Stage 0 — CPU only, no GPU allocation (gate).
- Rebase check:
pytest tests/preparation/test_core_boundary.pygreen on the rebased runtime branch. - Extended toolchain test (the missing one): subprocess that imports
ignition.preparation.tuning(and one component module) withCUDA_HOME/TRITON_CACHE_DIRunset, then callsignition.cli.environment.apply(...)with a configuration whose[paths] cudais a non-default directory; assert (i) the libdevice recorded inCUDAOptions().extern_libsequalsPath(cuda)/"nvvm/libdevice/libdevice.10.bc"after apply, (ii)CUDAOptions().hash()equality with the post-switch identity, (iii)not torch.cuda.is_initialized(), (iv) the version-mismatch path raises at the documented point. Run against main (A) and the PR (B).- This is the only change that touches every entry point; if it fails, stop — no GPU time.
Stage 1 — kernel correctness on cn7 GB10 (1 × GB10). Run the two CUDA test files once: tests/components/test_bf16_bmm_cuda.py (≤1 BF16 ulp vs torch.bmm for every tactic, row-tail NaN masking, raced selection, captured-graph replay with zero allocation) and the CPU selection tests. Compare A/B only in the sense that A = the same tests against the pre-PR torch.bmm path. Expected: 5 tests pass, allocation counters unchanged across replay.
Stage 2 — A/B throughput on cn7 GB10 (the one measurement that matters). Same checkpoint, same package, projection wired to (A) plain torch.bmm and (B) the raced component, one exported core, the two GLM head-projection geometries the PR cites (8,192-row absorption n-major, 8,192-row expansion k-major), plus a decode-shaped run (~32 rows) to confirm the race does not pick a slower tactic where cuBLAS wins. Record selected tactic per geometry, ms per operator against the plain-copy byte floor, and one end-to-end prefill tok/s pair. Three repetitions, take the median; report the copy floor in the same table. Do not re-measure the other five tile shapes — the race already covers selection.
Stage 3 — cn5 (4 × RTX PRO 6000 / SM120), only if Stage 2 shows the race selecting a non-cuBLAS tactic on GB10. One run of the same CUDA test file plus the Stage-2 geometry table on one card. Skip entirely if the PR description's SM120 claim is replaced by a measurement in the rehomed PR.
Explicitly out of scope for testing: the _TILES table contents, the kernel body, and docstring/prose fixes; SM103 (not covered by this component and named only as an unrun check); TP2/TP4 multi-GPU projections (cn7 has one GPU, and the operator is per-rank).
5. What would change this recommendation
Refer to a test engineer if the author instead splits the PR now and the runtime-only PR (the tuning.py change + test_toolchain.py) arrives rebased with S1 fixed and its ordering test included — that PR is 2 files and is validated by Stage 0 only (no GPU allocation), so it can be verified in minutes. The recipe-repository PR becomes a separate, ordinary review with Stages 1-2 attached.
code review summary
Recommendation: Changes Requested
Thanks — the kernel and the prepared-operator shape are clean: the race is expressed as one declared contract, there is no duplicate kernel, no per-model branch, no fallback flag, and I found no concrete defect in _bmm_kernel. Not ready to merge because of placement, not code quality. Full evidence is in the case file.
Blockers:
- Four of the six changed files belong in
hyperflare-recipes.ignition/components/bf16_bmm.py, theBatchedUnquantizedProjectionrewrite inlinear.py:69-86, and both component test files are reusable BF16 projection mechanisms;AGENTS.md:385-392anddocs/design-review.md:31-37keepignition/components/to the 13 Helios-ABI modules, enforced exactly bytests/preparation/test_core_boundary.py:11-26,62-64, which the new module fails onmain(linear.pyis not onmainat all). Matches your own 2026-11-24 split triage. → Split: this repo keepsignition/preparation/tuning.py+tests/preparation/test_toolchain.py; open a linked PR inlocal-inference-lab/hyperflare-recipeswith the component, the wiring, both test files and their validation evidence. - Rebase before splitting. The head predates the split; the reported conflict is
ignition/components/linear.py— the file whose body changed — so the resolution needs re-review, and CI on the head is red.
Should fix:
tuning.py:66now prepares the toolchain at import of a ~60-module dependency, ahead ofignition.cli.environment.apply(), which setsCUDA_HOME(environment.py:52-57) beforeruntime_patches.apply()(:61) asenvironment.py:5-11anddocs/preparation-development.md:59-63require;environment.applynever re-runs_set_triton_libdevice_path, so the libdevice identity is chosen before the configured toolkit exists. Current CLI paths only avoid it by import order. → Keep the import-time call (it is shorter than the two sites it replaced), state the ordering in the description, and pin it with one assertion in the existing subprocess harness: driveCUDA_HOME/environment.applybefore the import and assert the libdevice comes from that toolkit. The new"import"case only compares identities.bf16_bmm.py:7-9overstates the numerics — "FP32 accumulation and one BF16 rounding" is the Triton tile only (:78,84); the default tactic istorch.bmm(:57,124-126), which followsallow_bf16_reduced_precision_reduction. → Say "the Triton tile accumulates in FP32 and rounds once; the cuBLAS tactic follows PyTorch's BF16 matmul settings; the CUDA test bounds every tactic to one BF16 ulp oftorch.bmm", and use the same sentence in the description instead of "Both accumulate in FP32 and round once to BF16". No new code.bf16_bmm.py:108registers_NATIVE_JITSinside the memoisedcompile_bmm, so it is skipped on everyprogram_cachehit even though the comment at:105-107requires it before planning. → Import_NATIVE_JITSon:27, add_NATIVE_JITS.add(_bmm_kernel)next to the@triton.jitdefinition, drop:108and thecompile_planimport (sm103_projection.py:257-258,moe_sm103.py:357 (not opened),387).bf16_bmm.py:174omitssession=in the onlyinput_factorycall in the repo that does (linear.py:130-131,143,mla_norm_quant.py:46-47all pass it), sorelease_benchmark_cache()never runs before the race allocates (fixtures/resources.py:30-33). →session=session.docs/TODO.txt:185-187is the libdevice/program-key item this work closes and is still open (AGENTS.md:513-515). → Delete it, or restate what remains and its removal criterion.
Subtract / Simplify:
Could remove ~30 of +373 added lines (and ~349 leave the repo with the split):
- Split (≈349 lines):
bf16_bmm.py+linear.py+ both test files leave; the remainingtuning.pychange already deletes two lazy call sites in favour of one. - Dead code (8 lines):
linear.py:89-96,flare::bmm_outand its fake — the diff replaced their only caller withbf16_bmm.execute(:85);torch.bmminto a caller-owned view is nowState.run:124-126. Delete, whereverlinear.pyends up. - Duplicate helpers (≈11 lines): drop
State.run's revalidation (:119-123, already enforced byquery_from_call:142-153and on the launch hot path); replace the privatebenchmarkclosure (:176-179) withfixtures/bf16_gemv.benchmark_call; useselected_attention.tensor_facts/metadata_tensor; inlineprepared_stateintomaterialize=. - Tests that cannot fail (≈6 lines):
test_bf16_bmm.py:31-33is arithmetically guaranteed (256-column output vscolumns % tile[1] == 0) and:21-27transcribes the_TILEStable;test_bf16_bmm_cuda.py:63adds a statistic after:62/:64already bound the error. Keeptest_bf16_bmm.py:36-44and the rest of the CUDA test.
Nits:
4 nits
Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.