Repository navigation
spark-model: optimize dense prefill attention and quantization - #452
Open
maplepaladin73 wants to merge 4 commits into
Open
maplepaladin73 wants to merge 4 commits into
maplepaladin73 wants to merge 4 commits into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This branch has not been deployed
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
Wire the rows128 BF16 paged-prefill attention kernel into single-stream attention behind
ATLAS_ATTN_ROWS128=1, cache its tensor maps, and share low-precision Q/K/V activation quantization when the producer/consumer chain proves the same input is reused. Also prototype checkpoint-calibrated static input scales for dense W4A4 MLP prefill behindATLAS_DENSE_PREFILL_STATIC_INPUT_SCALE=1.Test plan
cargo fmt --all -- --checkATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo clippy --workspace --testsbash scripts/check-license-headers.shnvcc -std=c++17 -O3 --ptx -arch=sm_121a kernels/gb10/qwen3.6-27b/nvfp4/dense_bf16mma_prefill.cuNotes for reviewers
Activation reuse is limited to the proven Q/K/V chain; row-invariant early-return arms are excluded. Static scales apply only to dense MLP gate/up and down groups and fall back to dynamic quantization when checkpoint scales are missing or invalid. Hardware quality and TTFT gating are still required before merge.
CLA