Skip to content

spark-model: stop issuing Strix-only kernel lookups on NVIDIA builds; unblock Nemotron/Qwen3.6 boots (#87) - #89

Merged
AzeezIsh merged 3 commits into
mainfrom
fix/nemotron-lightning-kernel-gate
Sep 26, 2026
Merged

AzeezIsh merged 3 commits into
mainfrom
fix/nemotron-lightning-kernel-gate

Conversation

@AzeezIsh

@AzeezIsh AzeezIsh commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #87, fleet-wide. On current main the GB10 boot kernel gate refuses every target that doesn't declare the Strix-only lookups absent. Only qwen3.8-27b and qwen3.8-flash-next did, so shipped recipes such as Nemotron-3.5-Lightning and Qwen3.6-35B-A3B didn't boot (reiner jobs 297 and 306, identical on main66).

Root cause and changes

  1. Strix-only lookups are no longer issued on NVIDIA builds. The shared qwen3_attention / qwen3_ssm constructors issued lookups for w4a16_gemv_dp4a (×3) and w8a16_gemm_n_m128 on every model. Both modules exist only in kernels/strix-hip/common/. The lookups are now gated on cfg!(atlas_hip), and the call sites return handle 0 without a lookup, like init_arch_gates::gated.
    • atlas_hip is ATLAS_TARGET_HW == "strix-hip", which is the build that compiles strix-hip/common.
    • atlas_scale would be too wide: the strix SCALE tree lacks these modules too.
  2. rms_norm_offset_warp_row is gated on real per-head Q/K norms. Its only dispatch sites (prefill/cache_skip.rs) require a non-null q_norm / k_norm. Nemotron-H has none, and its loader passes a dummy.
  3. Probe spelling fix. The qwen3_ssm probe asked for module dense_gemv_fp8w, but every common KERNEL.toml names that module gemv_fp8w; mtp_head and dflash_head already look it up correctly. The probe never resolved on any target. It now does, which makes the opt-in ATLAS_GDN_FP8_DECODE arm live as documented. Default behaviour is unchanged.
  4. The earlier per-target Nemotron declarations are reverted; the Lightning contract test pins the exact set.

The existing declarations for these lookups in qwen3.8-27b and flash-next are now unreachable but harmless. They're left as-is to keep the diff minimal.

Validation

)

The shipped Lightning recipe no longer booted on GB10: five shared
qwen3_attention lookups added after the port resolved to handle 0 for this
target, and the gate refuses unresolved lookups (reiner job 297, main and
merge train alike).

- rms_norm_offset_warp_row: its only dispatch sites need a non-null per-head
  Q/K norm weight, and Nemotron-H has none (the loader passes a dummy). The
  lookup is now gated on that, so norm-less models never issue it; models
  with Q/K norms probe exactly as before.
- w4a16_gemv_dp4a (3) and w8a16_gemm_n_m128: these modules exist only under
  kernels/strix-hip/common, and every dispatch is gated on the handle, with
  resolved fallbacks. They are declared expected_absent for this target, as
  qwen3.8-27b already does. The Lightning contract test pins the new set.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…87)

Fleet version of the Nemotron fix. The shared qwen3_attention and
qwen3_ssm constructors issued lookups for w4a16_gemv_dp4a (3 kernels) and
w8a16_gemm_n_m128 on every model. Both modules exist only in
kernels/strix-hip/common, so on GB10 they resolved to handle 0 and the
boot kernel gate refused every target that did not declare them absent.
Only qwen3.8-27b and qwen3.8-flash-next did, so Nemotron-3.5-Lightning and
Qwen3.6-35B-A3B were unservable on main (reiner jobs 297/306). These
lookups are now gated on cfg!(atlas_hip), the build that compiles
strix-hip/common, so NVIDIA never issues them. The earlier per-target
Nemotron declarations are reverted.

Also:
- rms_norm_offset_warp_row stays gated on real per-head Q/K norms.
- The qwen3_ssm probe asked for module "dense_gemv_fp8w", but every
  common KERNEL.toml names the module gemv_fp8w (mtp_head and dflash_head
  already use the correct name). It never resolved on any target. It is
  now spelled correctly, which also makes the opt-in ATLAS_GDN_FP8_DECODE
  arm live as documented. Default behaviour is unchanged.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@AzeezIsh AzeezIsh changed the title spark-model: unblock Nemotron-3.5-Lightning at the boot kernel gate (#87) spark-model: stop issuing Strix-only kernel lookups on NVIDIA builds; unblock Nemotron/Qwen3.6 boots (#87) Sep 26, 2026
…87)

The fleet fix missed two lookup sites. Reiner job 324 still refused
Nemotron-3.5-Lightning and Qwen3.6-35B-A3B with 2 unresolved lookups at
model/impl_a1.rs:128-129 (the DP4A LM-head pair). DenseFfnLayer also
issues eight w4a16_gemv_dp4a lookups on dense-FFN models. All ten are now
gated on cfg!(atlas_hip), like the layer sites, so no NVIDIA build issues
them. No w4a16_gemv_dp4a or w8a16_gemm_n_m128 lookup is left ungated in
spark-model/src; the microtest examples look them up on purpose.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Merged as part of the GB10 merge train (main 1ab38536b). The train was #78, #67, #68, #82, #83, then #89 and #90.

Gates on the combined tree:

  • ST-995 (job 280): PASS, 84.72 / 84.68 against bars of 82.72 / 81.65.
  • Agentic perf leg (job 298): VALID. 1007 of 1007 turns, 0 failed, 0 missing, 89 min.
  • Support matrix (job 346): green. Nemotron-3.5-Lightning NVFP4, Qwen3.6-35B-A3B NVFP4 and Qwen3.6-35B-A3B FP8 each boot with 0 unresolved lookups on main66 + fixes and on the train tree. Greedy probes are identical between the two trees (mean |Δlogprob| 0.0000), and 10k TTFT is equal or slightly faster.

Tree check: main has the same tree as the job-346 build (f8a04db1f): git diff is empty. main also differs from the tree the gates ran on (53f4a3d3a) only by the marker [expected_absent] declarations (f261446bd), which are TOML and tests only.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GB10: Nemotron-3.5-Lightning-30B-A3B NVFP4 refused at boot on main (5 unresolved qwen3_attention kernel lookups)

1 participant