Skip to content

spark-model: remove redundant paged prefill work - #460

Open
maplepaladin73 wants to merge 2 commits into
Atlas-Inf:mainfrom
maplepaladin73:devin/1796364000-paged-copy-cleanup
Open

maplepaladin73 wants to merge 2 commits into
Atlas-Inf:mainfrom
maplepaladin73:devin/1796364000-paged-copy-cleanup

Conversation

@maplepaladin73

Copy link
Copy Markdown
Contributor

Summary

Remove pure duplicated work and unreachable dispatch from the standard paged prefill continuation path. Unreachable MLA-only continuation arms are removed after the MLA early return, and the pre-V-GEMM memset is removed because every projection path writes the complete V region before use.

No model support or reachable MLA path is removed. The SSM direct-staging cleanup is intentionally left in #448 so this PR does not overlap it.

Test plan

  • cargo fmt --all -- --check
  • ATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo clippy --workspace --tests
  • bash scripts/check-license-headers.sh
  • typos
  • Tested against real model/hardware

Notes for reviewers

Hardware A/B validation is still required before merge, especially for V-cache correctness on chunk 1+ after removing the defensive memset.

CLA

  • I have read and agree to the Contributor License Agreement.

maplepaladin73 and others added 2 commits December 4, 2026 05:55
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>
@AzeezIsh

AzeezIsh commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

AMD A/B (DevLab strix-hip gfx1151, this PR merged onto main 585c8fa, Qwen3.8-27B-NVFP4, C=1, 64K, thinking off; control = main on the same day):

  • output: greedy hashes byte-identical to main for MTP and DFlash2 (8/8 prompts each)
  • MTP decode 22.3 (18.8/25.8), prefill 447/455/424 vs main 22.3 (18.7/25.9), 452/460/429
  • DFlash2 decode 23.6 (18.1/29.0), prefill 442/448/420 vs main 23.6 (18.0/29.1), 445/451/423

Neutral on AMD and safe there. Prefill 2K/8K/16K exercises multi-chunk prefill, but only the short greedy prompts are hashed. Still needs the GB10 A/B the PR description asks for before merge.

This branch has not been deployed

No deployments
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.

2 participants