Skip to content

ricursive: Ripple-65B Preview, Strict, single Spark (prefill +49%, DFlash2 decode +7% vs SGLang) - #328

Merged
AzeezIsh merged 21 commits into
Atlas-Inf:mainfrom
Enntity:ripple/strict-single-spark
Nov 10, 2026
Merged

AzeezIsh merged 21 commits into
Atlas-Inf:mainfrom
Enntity:ripple/strict-single-spark

Conversation

@data-angel

@data-angel data-angel commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Ricursive Ripple-65B Preview (model_type: ricursive, NVFP4 ModelOpt checkpoint plus its DFlash2 drafter) to Atlas. It uses the new kernel target ricursive-ripple-65b, which takes its kernel sources from laguna-s-2.1. This first pass covers Strict numerics on a single Spark (GB10), single stream. Compared with Ricursive's reference SGLang engine on the same Spark:

  • Prefill: +46% at 1.7K tokens, +49% at 6.6K (892 / 907 tok/s against ~610).
  • Decode, DFlash2 lossless: +6.8% geometric mean. Each verify step is ~7% cheaper than SGLang's.

cc @AzeezIsh: this is ready for a look.

Architecture handled

  • 80 dense layers, hidden 5120, 80 q / 8 kv heads, head_dim 128. Layers repeat as 4 sliding-window layers (window 1024, RoPE θ=10000) then 1 global NoPE layer.
  • PeriNorm: four norms per block, plain x * w weights, per-head QK norm.
  • Elementwise sigmoid gate (g_proj), interleaved into q_proj per head at load. The verify GEMV deinterleaves it as it stores.
  • Value residuals: v = v_proj(lerp(x0, normed, bf16(sigmoid(λ)))), where x0 is the scaled embedding (embed_scale 71.55). Layer 0 snapshots x0, and every V path blends through value_residual_input. Installing value residuals now requires dense BF16 Q/K/V, which keeps every quantized-V arm out of reach.
  • SwiGLU clamp at 20 on the target only. The drafter keeps the unclamped common kernel.
  • DFlash2 drafter: 5 layers (4 SWA-4096 plus 1 full NoPE), conv kernel 4, selector top-k 32, taps [1,20,39,58,77], γ=32. This needed general conv taps and a K=32 selector twin in the shared DFlash2 code.

What "Strict" means here

  • FFN: NVFP4 weights as shipped. Multi-row passes run native W4A4 at the checkpoint's calibrated static input_scale, which is what SGLang modelopt_fp4 runs. Single-token decode stays W4A16.
    • Prefill (M ≥ 64) uses CUTLASS's SM120 block-scaled GEMM, the same kernel family SGLang reaches through flashinfer. Activations are quantized with flashinfer's cvt_warp_fp16_to_fp4 arithmetic.
    • Verify widths (M ≤ 32) use the small-M W4A4 GEMV.
  • Attention, embedding and lm_head: BF16, as shipped.
  • KV cache: BF16.
  • Drafter: BF16 by default. ATLAS_DFLASH_DRAFTER_FP8_M32=1 serves it from FP8 mirrors. Verification is exact, so this can change acceptance but never output.

Prefill work

At 6.6K tokens, Atlas's GPU time per prefill went from 21.4 s to 7.1 s:

before after how
FFN (W4A4) 10.7 s 2.5 s w4a4_gemm_mfast (~62 TFLOPS) replaced by CUTLASS SM120 NVFP4 at ~270 TFLOPS
BF16 attention projections 7.2 s 2.1 s dense_gemm_bf16_pipelined (25 TFLOPS) replaced by tuned CUTLASS tiles at 93 TFLOPS
rope_forward 0.71 s 0.09 s each block amortizes its FP64 frequencies over 16× more positions

New shared pieces:

  • spark-runtime/cuda/cutlass_nvfp4_prequant.cu. A dense NVFP4 GEMM on pre-quantized operands:
    • activations quantized at a static global scale straight into the SFA atom, or fused with the clamped SwiGLU for the down input;
    • weight SFBs packed once at load, from the checkpoint's native [N, K/16] scales;
    • alpha = input_scale × weight_scale_2;
    • a persistent-scheduler tile swizzle (8 for K ≤ 8192, 4 above). This took the long-K down GEMM from 92 to 215 TFLOPS and gate/up from 234 to 309.
    • The existing dense wrapper's types moved to cutlass_nvfp4_types.cuh. Unlike that wrapper, nothing is packed per call, and small activation blocks don't underflow ue4m3.
  • dense_gemm_bf16_pipelined. At M ≥ 256 it takes the tuned CUTLASS BF16 tiles when ATLAS_BF16_GEMM_CUTLASS=1. Those tiles are bit-identical to it at K % 16 == 0. Every model that already sets the flag (SparkGLM) gets this too, with no change in numerics.
  • rope_forward_rows in common/rope.cu, with the same rotation per element. ops::rope prefers it when the target ships it. Targets that shadow rope (Mistral-Small-4) keep rope_forward. Lookup goes through the new OpCache::kernel_or_null.

Other kernels (kernels/gb10/ricursive-ripple-65b/nvfp4/)

  • bf16_gemv_m32, w4a4_gemv_m32 (bn32/bn16) and fp8_gemv_m32: small-M verify GEMVs.
    • They use L1-allocating cp.async.ca, which streams at ~238 GB/s against ~192 for .cg. The pure-read roofline is ~240.
    • Each has a PDL entry that prefetches the first weight stages.
  • ricursive_verify_attn: graph-safe prefill-style attention for one sequence's verify rows.
  • value_residual_lerp, silu_mul_clamp20 and rms_norm_vanilla_strided.
  • PDL target ATLAS_RICURSIVE_PDL.

Benchmarks: one GB10 (spark04), single stream, vs SGLang

Reference: Ricursive's SGLang runner (inference/local/spark.py, speculative=True, 32 draft tokens), using the same NVFP4 checkpoint and DFlash2 drafter on the same Spark. Atlas runs through its OpenAI-compatible server (command below). Both engines get the same prompts and chat template.

Prefill (TTFT with max_tokens 1, unique prompts, 4 reps), tok/s

prompt tokens SGLang Atlas Δ
1674 ~610 (2.46–2.75 s) 892 (1.87–1.90 s) +46%
6618 ~610 (10.6–11.3 s) 907 (7.29–7.31 s) +49%

SGLang's first 1674-token run (45 s) included warmup and is excluded.

Decode (DFlash2, lossless), tok/s

prompt SGLang Atlas (temp 0) Atlas (temp 0.7) Δ (temp 0)
code (1272 tok) 28.05 29.36 / 29.14 29.13 / 20.0* +4%
edit (306 tok) 19.95 21.59 / 21.56 21.58 / 21.11 +8%
prose (281 tok) 7.83 8.44 / 8.45 8.44 / 8.44 +8%
geomean +6.8%
  • Atlas columns show two repetitions each. * That temp-0.7 code run sampled a different 1536-token continuation.
  • A verify step takes ~312 ms on Atlas against ~334 ms on SGLang (+7%).
  • Acceptance tracks the generated text. Before the prefill change, the edit prompt's greedy text was a 295-token answer that accepted better (24.6 tok/s, for a +11.4% geomean). The new prefill numerics are closer to SGLang's (see parity) and produce a 306-token answer. Per-step cost is unchanged.
  • Without speculative decoding, Atlas runs 3.93 tok/s against SGLang's 3.83.

Parity

  • Greedy output, compared character by character against SGLang's reference text, now agrees on the first 495 characters for edit, 259 for code and 33 for prose.
  • Both engines quantize activations with the same arithmetic. The remaining drift comes from GEMM accumulation order.
  • With W4A16 activations, outputs had diverged only at low-margin tokens (logit gaps 0.25–1.5).

Caveats

  • Single Spark only: no TP, and no Ripple recipe in LLooM yet.
  • Validated only at --max-num-seqs 1. The batched-verify graph key includes each slot's row count, so the one-sequence verify attention is chosen per composition. Concurrent DFlash has not been benchmarked.
  • Don't set ATLAS_CUBLAS_GEMM=1 for Ripple. With it, greedy decode stopped mid-answer (an EOS inside a code block). My best guess: cuBLASLt picks a different algorithm for each verify width, so the target's numerics stop being batch-invariant across acceptance patterns. Not root-caused.
  • The prefill FFN path needs a CUTLASS build (CUTLASS_HOME). Without one it logs a warning once and falls back to the tile GEMM.
  • At temp 0.7, sampling is live (see the code row), but these prompts are peaked. Sampling presets are neutral (temp 1, top_p 1, no min_p or top_n_sigma), matching the checkpoint and the reference engine.
  • kernels/strix-hip/common/dflash2_conv.cu gets the same generic-tap change as the GB10 copy, but it has not been built or run on Strix (CI's release matrix compiles strix-hip).
  • Prefill attention (inferspark_prefill_64, 1.1 s at 6.6K) is the next item. The flashinfer hd128 sliding-window prefill only runs on the co-dispatch path today.

Serve command (the one benchmarked)

ATLAS_RICURSIVE_PDL=1 ATLAS_DFLASH_DRAFTER_FP8_M32=1 ATLAS_BF16_GEMM_CUTLASS=1 \
spark serve <Ripple-65B-Preview-NVFP4> --kernel-target ricursive-ripple-65b \
  --max-seq-len 32768 --max-num-seqs 1 --max-batch-size 1 --kv-cache-dtype bf16 \
  --gpu-memory-utilization 0.88 --dflash --draft-model <Ripple-65B-Preview-DFlash2> \
  --dflash-window-size 16384 --request-timeout 600

Tests

  • atlas-core ricursive parser tests (3). spark-runtime: the SF-atom size test, the PDL kernel-list contract and the op-cache tests (7). spark-model: the value-residual blend, dispatch-config, BF16 CUTLASS config and vanilla-norm tests (11; 1 ignored, needs a cuBLASLt GPU run).
  • DFlash2 conv-tap and selector tests: dflash2_conv_taps, dflash2_selector_parity and dflash2_selector_bounds.
  • cargo fmt is clean. cargo clippy --all-targets -D warnings is clean with CUTLASS enabled, on spark-runtime, spark-model and atlas-core. The 500-LoC cap and SPDX headers hold.
  • End to end on spark04: the prefill and decode benches above, full-length greedy completions on all three prompts, and greedy parity against SGLang.

🤖 Generated with Claude Code

data-angel and others added 21 commits November 4, 2026 20:34
The DFlash2 grouped dynamic causal conv hard-coded two taps in the kernel
(delta row stride, output-side offsets) and in its Rust callers, while
Ricursive's Ripple-65B DFlash2 drafter ships conv_kernel_size 4
(base_kernel [2, 4, 5120], kernel_projection [2560, 5120]). A 4-tap
checkpoint would have run with the wrong coefficients and no error.

- dflash2_conv.cu (gb10 + strix-hip): sum `taps` taps (new kernel arg),
  tap 0 first, so a 2-tap launch computes the expression it did before.
- The loader derives (kernel_size, group_size) from the tensor shapes and
  fails when dflash_config.conv_kernel_size / conv_group_size disagree;
  from_weights sizes the delta scratch from that geometry instead of the
  `unwrap_or(16)` / `unwrap_or(2)` / `4 * hidden / 16` defaults, and fails
  when convs ship but the target has no dflash2_conv kernel.
- Dflash2Conv owns the delta-row layout (delta_row_elems,
  output_delta_offset) for every caller.

GPU test (ennspark03, qwen3.8-27b build): dflash2_conv_taps matches a host
replica of SGLang's _grouped_conv bit for bit at 4 taps (gamma 16, 32) and
2 taps (gamma 8).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The on-device DFlash2 candidate selector caps top_k at 16 at compile time
(per-warp candidate scoring, shared lists); Ripple-65B's DFlash2 drafter
ships selector_top_k 32, which Dflash2CandidateSelector::new refused.

- dflash2_candidate_selector_k32.cu: the common selector body under _k32
  entry names with DF2_SEL_MAX_TOP_K 32, 1024 threads (one warp a
  candidate), launch bounds for the 64-register budget, a 1024-entry pool
  for the overflow path's 32 x 32 warp lists, and 8 staged walk rows to
  stay under 48 KB of static shared memory. No batched entry at this cap.
- The common file only gains #ifndef guards, an empty launch-bounds hook
  and a pool-size static_assert: its PTX is byte-identical to main's
  (nvcc sm_121, checked on ennspark03), so every 16-candidate drafter
  launches exactly what it did.
- ops::dflash2_selector_build picks module, entry and block size from one
  top_k; scratch is sized for the widest selector; the rank-split walk and
  the batched entry refuse top_k > 16 instead of returning unwritten.

GPU test (ennspark03): dflash2_selector_parity, host reference = SGLang
0.5.19 CandidateSelector greedy walk, passes at Ripple's geometry (vocab
100352, rank 256, top_k 32, gamma 32 and 16), top_k 20 / gamma 13 and the
overflow path (gamma 8, 688-column slices), plus the existing top_k 16/4
cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ripple-65B's DFlash2 drafter declares layer_types [sliding x4,
full_attention] with sliding_window 4096 and no_rope_layers [4]; Ricursive
serves it (SGLang 0.5.19 + their patch) with RoPE skipped on layer 4 and a
16384-token draft window so the global layer sees its training rows. Atlas
applied one window to every layer (use_sliding_window: true made it 4096
everywhere) and RoPE to every layer.

- DflashConfig: mixed_layer_windows() (per-layer HF window, fails on an
  unknown type, a short list or a missing window), rope_layers() from
  no_rope_layers (fails on out-of-range or repeated indices); a mixed
  layout has no single sliding_window().
- DflashLayer carries `rope` and `attn_window`. Every attention launch
  (contiguous, paged, indirect, batched) takes layer_attn_window(layer):
  the layer's own window on sliding layers of a mixed drafter, else the
  head-wide window as before. The kernels mask in KV-slot space, so this
  is SGLang's per-query window over the compacted context.
- RoPE goes through layer_rope(); the fused ctx-K RoPE in precompute runs
  once per run of RoPE layers (one launch when there is no NoPE layer).
- resolve_context_window: a mixed drafter takes --dflash-window-size as
  its global draft window (SGLang's --speculative-draft-window-size); it
  must exceed every sliding window (the 4096 CLI default fails fast) and
  sizes the ctx scratch unless ATLAS_DFLASH_CTX_WINDOW is larger. Uniform
  drafters keep their resolution (4096 scratch default, CLI window or the
  checkpoint's).

Unit tests: Ripple / GLM-5.3 / Qwen3.8 config resolution, malformed
declarations, rope runs, window resolution.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…); fused q|gate split store

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…checkpoint and reference engine

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- FFN prefill on CUTLASS SM120 block-scaled NVFP4 (new pre-quantized entry
  point): activations quantized at the checkpoint input_scale with flashinfer's
  arithmetic, weight SFBs packed once at load, the clamped SwiGLU fused into the
  down input's quantization, persistent-scheduler swizzle (down 92 -> 215
  TFLOPS, gate/up 234 -> 309). Shared CUTLASS NVFP4 types moved to a header.
- dense_gemm_bf16_pipelined takes the tuned CUTLASS BF16 tiles at large M
  under ATLAS_BF16_GEMM_CUTLASS (bit-identical; 57 -> 93 TFLOPS on Ripple's
  attention projections).
- rope_forward_rows: rope_forward with each block covering 16 position groups,
  amortizing the per-block FP64 frequencies (714 -> 92 ms per 6.6K prefill);
  ops::rope prefers it where the target ships it. OpCache::kernel_or_null.
- Review fixes: value residuals require dense BF16 Q/K/V at install (covers
  every quantized-V arm); drop the PeriNorm gate's redundant re-check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@data-angel data-angel changed the title ricursive: Ripple-65B Preview, Strict, single Spark (DFlash2 decode +11% vs SGLang) ricursive: Ripple-65B Preview, Strict, single Spark (prefill +49%, DFlash2 decode +7% vs SGLang) Nov 5, 2026
@data-angel

Copy link
Copy Markdown
Contributor Author

@AzeezIsh: pushed the prefill pass (76e8c2a). Ripple prefill went from 306 to 907 tok/s at 6.6K tokens, +49% over SGLang. The FFN runs on a new pre-quantized CUTLASS SM120 NVFP4 entry point, the BF16 projections on the tuned CUTLASS tiles (bit-identical, under ATLAS_BF16_GEMM_CUTLASS), and rope gets a looping twin. Shared-code changes are in the description; nothing else changes numerics unless it opts in. Still a draft.

maplepaladin73 added a commit to maplepaladin73/atlas that referenced this pull request Nov 5, 2026
Local GB10 smoke (PR #5 comment) refused clean serve: two lookups resolved to
handle 0 for target (ripple-65b, sm_121, nvfp4) — w4a16::w4a16_gemm_t_m128_k16
(strix-hip-only kernel) and w4a4::w4a4_gemm_mfast — and there was no BENCH.toml
so no PR gate existed for ricursive.

Fixes (mirroring upstream PR Atlas-Inf#328's ricursive-ripple-65b target):
- kernel_source qwen3.6-27b -> laguna-s-2.1 (HDIM=128 sliding-window paged
  attention + w4a16 dense FFN tree; same choice as Atlas-Inf#328).
- overlay adds nvfp4/w4a4_gemm.cu (glm-5.3-flash's w4a4_gemm_mfast) and
  KERNEL.toml maps w4a4_gemm = "w4a4" so the lookup resolves.
- MODEL.toml gains laguna's [expected_absent.*] sections (incl.
  w4a16_gemm_t_m128_k16) minus w4a4_gemm_mfast, which the overlay now ships.
- new kernels/gb10/ripple-65b/BENCH.toml: unmeasured baselines for
  bfcl-subset / agentic-webserver / decode-floor / ttft-cold-gate.

Build audit: (gb10, ripple-65b, nvfp4) now compiles 202 kernels, 5 overrides;
cargo test -p atlas-kernels + atlas-core ricursive green; check --workspace OK.

Co-authored-by: maplepaladin73 <[email protected]>
@github-actions github-actions Bot added the needs-rebase Conflicts with main — its green checks are NOT real (GitHub skips merge-commit workflows) label Nov 10, 2026
AzeezIsh added a commit that referenced this pull request Nov 10, 2026
…he strix-hip selector blob

kernel_shadow_detector: #328's common/rope.cu rope_forward_rows is the
rotate_half convention Mistral's interleaved shadow deliberately lacks;
ops::rope looks it up with kernel_or_null and falls back to rope_forward.

dflash2_selector_abi: b75da4a (#329, exact round top-K, qualified by the
Qwen3.8-27B ST-995 gate) changed the pinned strix-hip selector without updating
the hash, so main fails this test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AzeezIsh

Copy link
Copy Markdown
Contributor

@data-angel I tested this on one GB10 (head 76e8c2a3b6, fresh tree, CUTLASS_HOME = CUTLASS v4.5.0). Main has since taken #331 and #333, so this branch now conflicts. I rebased it locally to check the result, but I haven't pushed anything to your branch; it's yours to rebase. Below are what the rebase needed and the receipts.

Rebase onto main 1f6de550b

Each textual conflict was resolved by keeping both sides:

  • dflash_loader.rs, dflash_head.rs, ops.rs: both sides' mod / pub use lines, kept.
  • pdl.rs kernel lists: QWEN38_PDL_KERNELS, QWEN38_PDL_DECODE_KERNELS and RICURSIVE_PDL_KERNELS, all kept.

Three more breakages showed up only when building on the new main:

  1. PdlTarget shape. qwen3.8-27b: exact speculative serving on one GB10 — DFlash2/DSpine, batched to 64, 262K context (stacked on #331) #333 changed it to switches: &[PdlSwitch], so the ricursive entry becomes:
    PdlTarget {
        model: "ricursive-ripple-65b",
        switches: &[PdlSwitch { name: "ATLAS_RICURSIVE_PDL", kernels: RICURSIVE_PDL_KERNELS }],
    },
  2. pdl_target_kernels_wait_exactly_when_listed. qwen3.8-27b: exact speculative serving on one GB10 — DFlash2/DSpine, batched to 64, 262K context (stacked on #331) #333 added the kernel_source redirect. Your target redirects to laguna-s-2.1 but also has its own .cu dir, so the scan never finds the ricursive kernels. What I did: for each quant dir Q of the source tree, scan source/Q plus ricursive-ripple-65b/Q when that dir exists. The listed-kernel assertion still runs per quant dir, the same contract as main (quant_dirs() helper, about 15 lines).
  3. Unresolved kernel lookups break every other DFlash target (the important one). The shared drafter init looks up bf16_gemv_m32 and fp8_gemv_m32 with plain try_kernel at dflash_head/from_weights.rs:186-187. On the rebased tree, qwen3.8-27b + DFlash2 then refuses to boot: Error: 2 unresolved kernel lookup(s) for (qwen3.8-27b, sm_121, nvfp4). rms_norm_vanilla_strided in qwen3_attention/init.rs does the same on the non-ricursive vanilla-norm targets (deepseek_v4 / glm5_next / laguna). The fix is try_kernel_gated(target_model_type == "ricursive", ...) for the two GEMVs, and try_kernel_gated(config.model_type == "ricursive", ...) for the strided norm. Handle 0 keeps the existing fallbacks. DFlash targets this affects: 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, qwen3.8-27b.

There's also one pre-existing issue, present on 76e8c2a3b6 too: cutlass/prequant.rs swizzle() and check() need #[cfg(atlas_cutlass)]. Without them, a build with no CUTLASS is dead code under -D warnings.

With all of the above on the rebased tree: fmt and clippy --workspace --tests are clean. dflash2_conv_taps 3/3, dflash2_selector_parity 7/7, dflash2_selector_bounds 5/5, exact_verify 20/20, verify_dflash_step 25/25, pdl 6/6, dflash_head 196/196. dflash2_selector_abi::hip_kernel_is_the_unmodified_upstream_implementation fails, but identically on main (its pin went stale at #329).

Receipts (one GB10, single stream, your benchmarked serve, ATLAS_MTP_ACCEPT_DEBUG=1 added)

  • Your exact command at --gpu-memory-utilization 0.88 dies on the old head right after Server live (NVRM NV_ERR_NO_MEMORY, then SIGKILL). The drafter's 37 FP8 GEMV mirrors are allocated after the KV budget is measured. At 0.84 it serves. On the rebased tree 0.88 boots fine, presumably thanks to qwen3.8-27b: exact speculative serving on one GB10 — DFlash2/DSpine, batched to 64, 262K context (stacked on #331) #333's drafter-in-budget accounting.

  • DFlash2 decode, bench_ripple (512 tokens, ignore_eos, n=3, medians): code 28.54 / prose 8.10 / long 15.13 tok/s. The rebased tree gives 28.54 / 8.08 / 15.09. Greedy token ids are identical between the old head and the rebase on all 6 prompts.

  • Target only: 3.97 / 3.97 / 3.88 tok/s.

  • Prefill, sq_bench, unique prompts: 1,350 tokens in 1.48 s (~912 tok/s), 5,346 in 5.88 s (~909), 10,692 in 12.3 s (~870), 18,740 in 22.9 s (~817). That's in line with your 892 / 907.

  • Parity: I compared greedy token ids against the vendor SGLang receipts recorded on this same box (6 prompts; first divergence index / length):

    prompt Atlas target vs SGLang no-spec SGLang spec vs SGLang no-spec Atlas DFlash2 vs Atlas target
    code 31/512 37/512 54/512
    prose 74/512 67/512 62/512
    math 34/111 9/111 35/110
    tool 5/52 52/52 7/50
    long (5.4K) 29/384 38/384 74/384
    very_long (22.7K) 3/384 55/384 57/384

    Speculative output is not byte-identical to target-only decode on either engine. That's consistent with "lossless" meaning in-distribution rather than serial-exact, but it may be worth saying explicitly in the PR text, given that qwen3.8-27b: exact speculative serving on one GB10 — DFlash2/DSpine, batched to 64, 262K context (stacked on #331) #333's 27B path is serial-exact. The very_long divergence at token 3 against SGLang is the earliest; I'd look at long-context prefill numerics there.

Everything else passed; that conflict-plus-lookup fix is all that's needed. Happy to push the rebased branch for you to cherry-pick from if that's easier.

@AzeezIsh
AzeezIsh merged commit aaa2631 into Atlas-Inf:main Nov 10, 2026
1 check passed
@AzeezIsh

Copy link
Copy Markdown
Contributor

This landed on main through #334's merge (4e239ae6), which carried this branch's head. Main then refused to boot every non-Ripple DFlash target, the unresolved-lookup issue from my comment above. #341 (0e6e5ba9d) gates those lookups with try_kernel_gated (model type == ricursive). With it, the 27B DFlash2 profile boots again, and Ripple still boots with DFlash drafter: 37 FP8 GEMV mirrors.

On my rebased tree, the same fix gave Ripple output token-identical to 76e8c2a3b6 and unchanged speed (DFlash2 28.5 / 8.1 / 15.1 tok/s). The cutlass/prequant.rs dead-code issue was already handled by #334 (cfg_attr(not(atlas_cutlass), allow(dead_code))). A follow-up fixes the rustdoc intra-doc links this series brought in (Self::fp8_m32, layer_attn_window, w4a4_gemm_mfast_scaled, prefill_attention_paged).

AzeezIsh added a commit that referenced this pull request Nov 10, 2026
…ught in

docs: fix the broken and private intra-doc links #328 brought in
maplepaladin73 pushed a commit to maplepaladin73/atlas that referenced this pull request Nov 11, 2026
…ets boot

Main (4e239ae, Merge Atlas-Inf#334) carries Atlas-Inf#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>
maplepaladin73 pushed a commit to maplepaladin73/atlas that referenced this pull request Nov 11, 2026
…t in

dflash_head.rs (Self::fp8_m32 -> BlockDiffusionDraftHead::fp8_m32;
layer_attn_window -> code span), ops/verify_rows.rs
(w4a4_gemm_mfast_scaled, prefill_attention_paged -> code spans),
qwen3_attention/value_residual.rs (Self::value_residual_input -> code
span). cargo doc --workspace --no-deps is clean under the docs.yml env.

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

Copy link
Copy Markdown
Contributor Author

@AzeezIsh thanks for the rebase notes, for #341 and for the rustdoc and dead-code follow-ups. Sorry I didn't reply sooner. Two of your points are still open on our side, and I'll take both:

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

Labels

needs-rebase Conflicts with main — its green checks are NOT real (GitHub skips merge-commit workflows)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants