Skip to content

build: pin flashinfer-python to 6aff33c4 for Qwen4-35B-A3B GDN geometry - #731

Open
avifenesh wants to merge 1 commit into
NVIDIA:mainfrom
avifenesh:flashinfer-qwen4-gdn-ratio
Open

avifenesh wants to merge 1 commit into
NVIDIA:mainfrom
avifenesh:flashinfer-qwen4-gdn-ratio

Conversation

@avifenesh

@avifenesh avifenesh commented Dec 4, 2026 •

Copy link
Copy Markdown

Why: ignition export of the Qwen4-35B-A3B recipe (qwen4-35b-a3b in
local-inference-lab/hyperflare-recipes) cannot complete on SM120 with the
flashinfer-python revision this repository pins. Qwen4-35B-A3B has two Gated
DeltaNet value heads per key head (16 key heads, 32 value heads). At the pinned
revision 1441ce86 the b12x GDN prefill capability check accepts only three, so
decoder preparation raises "GDN prefill requires three value heads per key
head" before any graph is captured. FlashInfer added the 2:1 ratio and the
H=2048 hyper-connection and MTP feedback shapes this model needs in adb09a82
(local-inference-lab/flashinfer#215). ignition[prepare] resolves flashinfer-python from this pin, so recipe
environments inherit the older revision even when they track FlashInfer main.

What changed: pyproject.toml pins flashinfer-python at
local-inference-lab/flashinfer 6aff33c4a6500a10c32916f3c2e6987e708cec92 instead
of 1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e. The new revision is two commits
ahead: adb09a82 (local-inference-lab/flashinfer#215, Qwen4-35B-A3B shapes) and
6aff33c4 (local-inference-lab/flashinfer#217, cooperative SM budget and
green-context grid-stride safety for b12x MoE). Both are on FlashInfer main.
Neither changes flashinfer/experimental/b12x/comm/roce/_roce_proxy.c, the
source vendored in helios/native/roce_proxy.c, so no re-vendoring is needed.

Result: with the new pin, a Qwen4-35B-A3B export on an RTX 5090 Laptop GPU
(GB203, SM120) completes and the exported core serves requests. This is an
observed result for that one model and device; behavior of the other recipes
at the new revision is expected to be unchanged for shapes they already used
but was not measured.

Evidence: on an RTX 5090 Laptop GPU (GB203, SM120, 24 GiB), with ignition and
flare-heliopause built from f705086 and hyperflare-recipes at d248db6, I ran
ignition export CHECKPOINT --gpus 0 --tiered-moe-offload --offload-predictor direct --offload-extents-dir DIR --max-concurrency 4 --prefill-chunk-size 2048 --speculative-method mtp --mtp-draft-tokens 5 --speculative-token-capacity 128 --image-concurrency 4 --autotune-effort off --compile-workers 1, where
CHECKPOINT is a local Qwen4-35B-A3B directory in the recipe's NVFP4 layout
(trunk experts W4A4, MTP experts W4A16) that the recipe resolves to
qwen4-35b-a3b. With flashinfer-python 1441ce86 it fails in
gdn_prefill.Caps with the error quoted above. With 6aff33c4 it prepares 72
graphs and exports the native core, and flare run on that core answers
chat completions at concurrency 1, 2 and 4, including a 120,000-token prompt.

CPU checks at this commit, following .github/workflows/python-cpu.yml on an
x86-64 Linux host without a GPU: after BUILD_NVEP=0 FLASHINFER_BUILD_NO_PIP=1 uv sync --extra prepare --extra test the installed flashinfer-python is
6aff33c4; tests/preparation/test_roce_proxy_parity.py passes (2 passed), so
the vendored proxy is byte-identical to the pinned FlashInfer source; and
CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest tests/ -q gives 2621
passed, 480 skipped. cargo test --locked --release --manifest-path heliopause/Cargo.toml --lib gives 233 passed, 1 failed, 6 ignored. The failing
test is export::blob::tests::verified_inode_mutation_is_rejected_before_link.
Run alone three times per revision on the same host, it fails 3 of 3 times on
main at 22d2ac9 (pin 1441ce86) and 1 of 3 times at this commit. The two trees
differ only in this pin and the test does not use FlashInfer, so the failure
is intermittent on that host and does not depend on the pin.

Not run: the other Rust crate suites, the simulator, TLA+ and Kani checks
(this commit changes no Rust source or protocol), any GPU test (the 480
skipped tests), any other recipe, SM103 and SM121 devices, and the export
with commits after f705086 (those change flare-winui, packaging and CI files
only). 6aff33c4 also brings the b12x MoE change of
local-inference-lab/flashinfer#217 to every recipe; its effect was measured
only through the Qwen4-35B-A3B export above. Pinning adb09a82 instead would
limit this change to the Qwen4-35B-A3B shapes.

Follow-up outside this PR: uv.lock in local-inference-lab/hyperflare-recipes pins ignition at c513e46 and flashinfer-python at 5a8ceed. A fresh uv sync there fails the tiered MoE offload export earlier, on ImportError: cannot import name 'AsyncTransferChannel' from 'ignition.preparation.execution', so that lock needs an update once this pin is merged.

Discord: avi7066

@flare-autobot

Copy link
Copy Markdown
Collaborator

A case file has been opened for 731.
Case File Intake Report

Future reviews will auto-run 90 minutes after code updates are pushed.

  • Re-review sooner: Call @flare-autobot after push.
  • Opt-out: Include #autobot:ignore in the PR or any comment.

@flare-autobot flare-autobot added area:preparation Ignition checkpoint loading, tuning, compilation, capture, and export. triage:review Proposed change needs code review; this does not imply merge readiness. labels Dec 4, 2026
@flare-autobot

Copy link
Copy Markdown
Collaborator

Autobot Review

Full Review · Value Proposition · Case File

Recommendation: Changes Requested

This one-line pin bump in pyproject.toml:47 is cleanly scoped, charter-aligned ("pin dependencies to exact versions or commits"), and fixes the Qwen4-35B-A3B 2:1 GDN head-ratio check in the right layer (upstream FlashInfer rather than per-model runtime code), with zero verified code defects and full backward compatibility for existing exported cores. However, merge is blocked by one hard verification gate: the PR explicitly skips this repository's runnable CPU test suites, leaving its load-bearing claim that helios/native/roce_proxy.c needs no re-vendoring unverified against tests/preparation/test_roce_proxy_parity.py, which docs/design-review.md:247-251 makes non-waivable.

  • Blockers: 1 · Should fix: 0 · Subtract/Simplify: 2 · Nits: 2
Walkthrough
  • pyproject.toml:47 ([tool.uv.sources]): updates the flashinfer-python git rev for the prepare extra (pyproject.toml:25) from 1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e (set by merged #707, confirmed present in this branch's post-#707 tree via helios/native/roce_proxy.c:223 RING_WINDOW 16 and tests/preparation/test_roce_proxy_parity.py) to 6aff33c4a6500a10c32916f3c2e6987e708cec92.
  • In-repo pin consumers verified unaffected: ignition/preparation/source_identity.py:103-105 hashes flashinfer.python, flashinfer.include, and flashinfer.csrc into the preparation identity; ignition/preparation/aot.py:890-900 hashes properties.multi_processor_count and all *.py files under ignition and flashinfer into the forward cache key, cleanly partitioning cached forwards across both upstream commits.
  • No local GDN check or proxy change: helios/native/roce_proxy.c:160 (ROCE_ABI_VERSION 14) and helios/src/execution/roce.rs:23,131 (PROXY_ABI = 14, accepting 9 | 10 | 11 | 14) are untouched; tests/preparation/test_roce_proxy_parity.py:43 checks the provenance path substring rather than a hardcoded commit SHA.
Merge Risk: Medium · up to e015d55
  • Unverified vendored-proxy parity: tests/preparation/test_roce_proxy_parity.py:35-65 runs on every PR via .github/workflows/python-cpu.yml:29-33 and hard-fails on any byte divergence between helios/native/roce_proxy.c (lines 10..EOF) and the pinned FlashInfer's _roce_proxy.c; if 6aff33c4 touched _roce_proxy.c, main CI breaks immediately and preparation/serving proxies diverge.
  • Bundled shared-kernel commit: 6aff33c4 also brings in FlashInfer local-inference-lab/flashinfer#217 (cooperative SM budget and green-context grid-stride safety for b12x MoE, companion to open #723), which affects b12x MoE preparation across all recipes while only one Qwen4-35B-A3B SM120 export was measured.
  • Low runtime blast radius: No Rust, ABI (PROXY_ABI = 14), manifest, or core-format code changes (helios/src/execution/roce.rs:23,131), so previously exported cores continue loading unmodified and the 1-line pin is trivially revertible.
Pre-merge checks: ✅ 2 passed · ⚠️ 2 warnings
  • ✅ Security / malicious screen: Single-line commit SHA update on existing trusted repo https://github.com/local-inference-lab/flashinfer.git (pyproject.toml:47); no new endpoints, scripts, credentials, or prompt-injection content. Confirm 6aff33c4a6500a10c32916f3c2e6987e708cec92 is a merged commit on FlashInfer main before merging (per #707 precedent).
  • ✅ Charter & value fit: Keeps an exact dependency pin (Charter "Be explicit and pin everything" / roadmap #215) and fixes the GDN geometry check upstream in FlashInfer rather than adding per-model branches in Helios.
  • ⚠️ Related / duplicate / conflict check: Genuinely additive over merged #707 (first pin bump since 1441ce86); note semantic coupling with open #723 (which depends on the bundled local-inference-lab/flashinfer#217 commit) and textual overlap on pyproject.toml:47 with open RoCE PRs #712 and #725 (informational only; whichever lands second will rebase).
  • ⚠️ Tests & verification evidence: Export and flare run serving of Qwen4-35B-A3B on SM120 (up to 120k tokens, C=1/2/4) are well-documented, but the PR explicitly skips this repository's runnable CPU pytest suite, leaving the vendored RoCE proxy parity gate (tests/preparation/test_roce_proxy_parity.py) unverified (Blocker 1).

Have your agent review the Full Review for complete verified findings, file:line citations, and suggested changes.

To opt out, include #autobot:ignore in your post or comment.

Why: `ignition export` of the Qwen4-35B-A3B recipe (`qwen4-35b-a3b` in
local-inference-lab/hyperflare-recipes) cannot complete on SM120 with the
flashinfer-python revision this repository pins. Qwen4-35B-A3B has two Gated
DeltaNet value heads per key head (16 key heads, 32 value heads). At the pinned
revision 1441ce86 the b12x GDN prefill capability check accepts only three, so
decoder preparation raises "GDN prefill requires three value heads per key
head" before any graph is captured. FlashInfer added the 2:1 ratio and the
H=2048 hyper-connection and MTP feedback shapes this model needs in adb09a82
(local-inference-lab/flashinfer#215). `ignition[prepare]` resolves flashinfer-python from this pin, so recipe
environments inherit the older revision even when they track FlashInfer main.

What changed: `pyproject.toml` pins flashinfer-python at
local-inference-lab/flashinfer 6aff33c4a6500a10c32916f3c2e6987e708cec92 instead
of 1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e. The new revision is two commits
ahead: adb09a82 (local-inference-lab/flashinfer#215, Qwen4-35B-A3B shapes) and
6aff33c4 (local-inference-lab/flashinfer#217, cooperative SM budget and
green-context grid-stride safety for b12x MoE). Both are on FlashInfer main.
Neither changes `flashinfer/experimental/b12x/comm/roce/_roce_proxy.c`, the
source vendored in `helios/native/roce_proxy.c`, so no re-vendoring is needed.

Result: with the new pin, a Qwen4-35B-A3B export on an RTX 5090 Laptop GPU
(GB203, SM120) completes and the exported core serves requests. This is an
observed result for that one model and device; behavior of the other recipes
at the new revision is expected to be unchanged for shapes they already used
but was not measured.

Evidence: on an RTX 5090 Laptop GPU (GB203, SM120, 24 GiB), with ignition and
flare-heliopause built from f705086 and hyperflare-recipes at d248db6, I ran
`ignition export CHECKPOINT --gpus 0 --tiered-moe-offload --offload-predictor
direct --offload-extents-dir DIR --max-concurrency 4 --prefill-chunk-size 2048
--speculative-method mtp --mtp-draft-tokens 5 --speculative-token-capacity 128
--image-concurrency 4 --autotune-effort off --compile-workers 1`, where
CHECKPOINT is a local Qwen4-35B-A3B directory in the recipe's NVFP4 layout
(trunk experts W4A4, MTP experts W4A16) that the recipe resolves to
`qwen4-35b-a3b`. With flashinfer-python 1441ce86 it fails in
`gdn_prefill.Caps` with the error quoted above. With 6aff33c4 it prepares 72
graphs and exports the native core, and `flare run` on that core answers
chat completions at concurrency 1, 2 and 4, including a 120,000-token prompt.

CPU checks at this commit, following `.github/workflows/python-cpu.yml` on an
x86-64 Linux host without a GPU: after `BUILD_NVEP=0 FLASHINFER_BUILD_NO_PIP=1
uv sync --extra prepare --extra test` the installed flashinfer-python is
6aff33c4; `tests/preparation/test_roce_proxy_parity.py` passes (2 passed), so
the vendored proxy is byte-identical to the pinned FlashInfer source; and
`CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest tests/ -q` gives 2621
passed, 480 skipped. `cargo test --locked --release --manifest-path
heliopause/Cargo.toml --lib` gives 233 passed, 1 failed, 6 ignored. The failing
test is `export::blob::tests::verified_inode_mutation_is_rejected_before_link`.
Run alone three times per revision on the same host, it fails 3 of 3 times on
main at 22d2ac9 (pin 1441ce86) and 1 of 3 times at this commit. The two trees
differ only in this pin and the test does not use FlashInfer, so the failure
is intermittent on that host and does not depend on the pin.

Not run: the other Rust crate suites, the simulator, TLA+ and Kani checks
(this commit changes no Rust source or protocol), any GPU test (the 480
skipped tests), any other recipe, SM103 and SM121 devices, and the export
with commits after f705086 (those change flare-winui, packaging and CI files
only). 6aff33c4 also brings the b12x MoE change of
local-inference-lab/flashinfer#217 to every recipe; its effect was measured
only through the Qwen4-35B-A3B export above. Pinning adb09a82 instead would
limit this change to the Qwen4-35B-A3B shapes.

Design-Signed-Off-By: Claude Code (Claude Fable 5.2); design-review=2e5b
Signed-off-by: Avi Fenesh <aviarchi1994@gmail.com>
@flare-autobot

Copy link
Copy Markdown
Collaborator

Autobot Review

Full Review · Value Proposition · Case File

Recommendation: Ready To Merge

The prior blocker from e015d55 is resolved at a558dcd: the author ran the exact CPU workflow commands against 6aff33c4, confirming tests/preparation/test_roce_proxy_parity.py passes as does the full CPU pytest suite, alongside qualified FlashInfer PR links and disclosure of the bundled local-inference-lab/flashinfer#217 MoE scope.
The one-line pin bump in pyproject.toml:47 is minimal, charter-aligned, fixes the Qwen4-35B-A3B 2:1 GDN head-ratio check upstream in FlashInfer, and introduces zero code defects or ABI/core-format regressions.

  • Blockers: 0 · Should fix: 0 · Subtract/Simplify: 3 · Nits: 2
Walkthrough
  • pyproject.toml:47 ([tool.uv.sources]): cleanly advances the flashinfer-python git rev backing the prepare extra (pyproject.toml:25) on top of merged #707 (67ad1215) from 1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e to 6aff33c4a6500a10c32916f3c2e6987e708cec92 (+1 / -1, 1 file).
  • Vendored RoCE proxy & ABI invariants untouched: helios/native/roce_proxy.c:1-9,157,160,223 (ROCE_RESERVE_OPS 48u, ROCE_ABI_VERSION 14, RING_WINDOW 16) and helios/src/execution/roce.rs:23,131 (PROXY_ABI: u32 = 14, accepting 9 | 10 | 11 | 14) are unchanged; tests/preparation/test_roce_proxy_parity.py:17,35-68 checks byte-for-byte parity below the 9-line provenance header (matching the path substring at :43, not a hardcoded SHA) and passes (2 passed) at 6aff33c4.
  • Cache & identity partitioning verified sound: ignition/preparation/source_identity.py:103-105 hashes flashinfer.python, flashinfer.include, and flashinfer.csrc; ignition/preparation/aot.py:890-900 hashes properties.multi_processor_count and every *.py file under ignition and flashinfer; and ignition/cli/environment.py:25-34 isolates FLASHINFER_WORKSPACE_BASE per resolved install path—so neither export identities nor cached forwards/JIT artifacts alias across the pin bump.
  • Reported Heliopause test failure confirmed unrelated: export::blob::tests::verified_inode_mutation_is_rejected_before_link (heliopause/src/export/blob.rs:605-633) does not touch FlashInfer and fails 3/3 times on main (22d2ac97) vs. 1/3 at a558dcd, confirming it is a pre-existing host flake rather than a regression from this pin.
Merge Risk: Medium · up to a558dcd
  • Shared kernel dependency scope: Moving pyproject.toml:47 to 6aff33c4 also brings in local-inference-lab/flashinfer#217 (cooperative SM budget and green-context grid-stride safety for b12x MoE) for every ignition[prepare] recipe environment, while GPU export/serving was measured only on one Qwen4-35B-A3B SM120 export (not other recipes or SM103/SM121).
  • Zero runtime/ABI blast radius & trivial rollback: No Rust, C, ABI (PROXY_ABI = 14), manifest, or core-format code changes (helios/native/roce_proxy.c:160, helios/src/execution/roce.rs:23,131), RoCE proxy byte-parity is verified passing at 6aff33c4, and the single-line pin is trivially revertible.
Pre-merge checks: ✅ 4 passed
  • ✅ Security / malicious screen: Single-line commit SHA update on existing trusted upstream https://github.com/local-inference-lab/flashinfer.git (pyproject.toml:47); no new scripts, endpoints, credentials, or prompt-injection content.
  • ✅ Charter & value fit: Preserves an exact dependency pin (Charter "Be explicit and pin everything" / roadmap #215) and fixes Qwen4-35B-A3B 2:1 GDN geometry upstream in FlashInfer rather than adding per-model branches in Helios.
  • ✅ Related / duplicate / conflict check: Genuinely additive over merged #707 and unblocks downstream Qwen4-35B-A3B work (#732); note informational coupling with open #723 (consumes bundled local-inference-lab/flashinfer#217) and ordinary textual rebase overlap on pyproject.toml:47 with open #712/#725.
  • ✅ Tests & verification evidence: Applicable CPU checks matching .github/workflows/python-cpu.yml:25-41 were run at a558dcd (test_roce_proxy_parity.py: 2 passed; pytest tests/ -q: 2621 passed, 480 skipped), alongside SM120 Qwen4-35B-A3B export (72 graphs) and flare run serving up to 120k tokens at C=1/2/4; the lone Heliopause failure (heliopause/src/export/blob.rs:605-633) is reproduced as pre-existing on main.

Have your agent review the Full Review for complete verified findings, file:line citations, and suggested changes.

To opt out, include #autobot:ignore in your post or comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:preparation Ignition checkpoint loading, tuning, compilation, capture, and export. bug Something isn't working triage:review Proposed change needs code review; this does not imply merge readiness.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants