Skip to content

spark-model: gate the Ripple-only kernel lookups so other DFlash targets boot - #341

Merged
AzeezIsh merged 1 commit into
mainfrom
fix/dflash-ripple-lookups-gated
Nov 10, 2026
Merged

AzeezIsh merged 1 commit into
mainfrom
fix/dflash-ripple-lookups-gated

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

Summary

Main is broken for every non-Ripple DFlash target since #334. #334 merged #328's Ripple commits, which look up two Ripple-only kernels with a plain try_kernel in the shared DFlash drafter init (dflash_head/from_weights.rs:186-187). The startup kernel audit then refuses to boot any target that doesn't ship them. On main 4e239ae6 (and the gb10 image built from it), Qwen3.8-27B + DFlash2 fails with:

Error: 2 unresolved kernel lookup(s) for (qwen3.8-27b, sm_121, nvfp4)
  1. bf16_gemv_m32::bf16_gemv_m32  at crates/spark-model/src/layers/dflash_head/from_weights.rs:186
  2. fp8_gemv_m32::fp8_gemv_m32  at crates/spark-model/src/layers/dflash_head/from_weights.rs:187

These are the DFlash-enabled gb10 targets that don't ship these kernels: holo-3.1-35b-a3b, longcat-flash-lite, nemotron-3.5-lightning-30b-a3b, nemotron-3.5-super-vl-120b-a12b, qwen3.6-27b, qwen3.6-35b-a3b and qwen3.8-27b. rms_norm_vanilla_strided in qwen3_attention/init.rs has the same problem on the other vanilla-norm models (deepseek_v4 / glm5_next / laguna).

The fix uses the existing audit-invisible gate, try_kernel_gated, with the condition model type == ricursive. Handle 0 keeps the existing fallbacks, so Ripple is unchanged. This was flagged, with this fix, on #328.

Test plan

Generated with Devin

…ets boot

Main (4e239ae, Merge #334) carries #328's Ripple commits, whose shared
DFlash head and attention init issue plain try_kernel lookups of kernels that
compile only into the ricursive-ripple-65b target: bf16_gemv_m32,
fp8_gemv_m32 (dflash_head/from_weights.rs) and rms_norm_vanilla_strided
(qwen3_attention/init.rs). Every non-ricursive target that reaches those
constructors then fails the boot kernel-audit with unresolved lookups —
confirmed on the 4e239ae build: 2 unresolved for (qwen3.8-27b, sm_121,
nvfp4). Affected: every DFlash target but ricursive (qwen3.8-27b,
qwen3.6-27b, qwen3.6-35b-a3b, holo-3.1-35b-a3b, longcat-flash-lite,
nemotron-3.5-*) plus every vanilla-norm attention model for the strided arm.

Gate the lookups on model identity with try_kernel_gated, so the lookup is
never issued where the kernel cannot exist: a lookup that is never issued
leaves no failed row in the boot audit (kernel_pick.rs contract). Handle 0
keeps the existing fallbacks (per-row Q/K-norm loop; small-M GEMV pipelined
tier; fp8_m32 only activates under ATLAS_DFLASH_DRAFTER_FP8_M32=1, which is
a ricursive lever).

Verified on GB10: qwen3.8-27b + DFlash2 boots to /health and serves chat
(was refused at audit); ricursive-ripple-65b boots and still builds its
37 FP8 GEMV mirrors. fmt/clippy/dflash_head(197)/pdl(6) clean.

Generated-with: Devin
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@AzeezIsh
AzeezIsh merged commit 0e6e5ba into main Nov 10, 2026
21 of 26 checks passed
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.

1 participant