Repository navigation
ling-3.2-air: keep the mma prefill PV accumulator in registers - #146
Merged
Merged
Conversation
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
maplepaladin73
commented
Nov 27, 2026
maplepaladin73
left a comment
Owner
Author
There was a problem hiding this comment.
Review: diff is minimal and correct — the #pragma unroll on the 16-tile PV loop makes every o_acc index compile-time constant (eliminating the 256 B local-memory frame confirmed in ptxas), and __launch_bounds__(128, 4) caps registers so the 4-CTA occupancy target holds (128 regs x 128 thr x 4 CTAs = exactly the 64K GB10 regfile, with only an 8 B residual spill). Validation evidence in the PR body is appropriately fingerprinted and the correctness caveat (mma lane stays opt-in) is the right call. Lane is env-gated off by default, so zero production risk. LGTM — merging.
maplepaladin73
deleted the
devin/202611270250-ling-mla-mma-regresident
branch
November 27, 2026 03:05
4 tasks done
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
ling_mla_prefill_attn_mmaso the 64-float accumulator is register-indexed instead of local-memory-indexed.__launch_bounds__(128, 4)so the kernel keeps the four-CTA shared-memory occupancy target with only an 8-byte residual spill.Validation
Fingerprint: f341 GB10, Ling-3.2-air-NVFP4, branch commit
d76b83af0, release build,ATLAS_TARGET_HW=gb10 ATLAS_TARGET_MODEL=ling-3.2-air, serve flags--max-num-seqs 2 --max-batch-size 2 --no-tui,ATLAS_LING_PREFILL_ROWS=4096, prompttests/fixtures/bench_prompt_4096.txt(4151 prompt tokens), greedy,max_tokens=1.ptxas -vbefore:ling_mla_prefill_attn_mmahad a 256-byte stack frame; after: 128 registers, 21,760 B smem, 8-byte residual spill.mla_prefill_attn_benchmedians, same process/data, preliminary single-harness kernel measurements: at seq_len 512 scalar 4254.7 us vs mma 968.0 us; at 1024 scalar 16274.2 us vs mma 3566.9 us; at 4096 scalar 250931.0 us vs mma 53693.4 us.ATLAS_LING_MLA_PREFILL_MMA=1arm 3.668-3.705 s (n=3 warm after one JIT warmup request). This is a one-lane A/B observation, not yet a cross-validated production claim.mla_layer5_prefill_fast_paritywithATLAS_LING_MLA_PREFILL_MMA=1: PASS, 25 stage checks clean.cargo build --release -p spark-server --features cuda: PASS.git diff --check: PASS.cargo fmt --all -- --checkstill reports the pre-existingmla_prefill_attn_bench.rsformatting drift on main; this PR does not touch that file.Correctness caveat for any future default flip
ling-tools-e2e.py9/9.ali***@example.cominstead of[email protected]. The scalar lane emitted the full address in the same harness. This is consistent with the mma lane's BF16 probability operand changing borderline greedy tokens; it predates this performance fix, but it means the lane must remain opt-in until its numerics are improved or separately acceptance-gated.Test plan
Generated with Devin