Repository navigation
spark-model: gate the Ripple-only kernel lookups so other DFlash targets boot - #341
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_kernelin 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 main4e239ae6(and the gb10 image built from it), Qwen3.8-27B + DFlash2 fails with: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_stridedinqwen3_attention/init.rshas 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
cargo fmt --check;cargo clippy --workspace --testsclean;dflash_head197/197; spark-runtimepdl6/6DFlash drafter: 37 FP8 GEMV mirrors. The same fix on the rebased ricursive: Ripple-65B Preview, Strict, single Spark (prefill +49%, DFlash2 decode +7% vs SGLang) #328 tree gave token-identical Ripple output and unchanged speed.Generated with Devin