feat(moore): support paged flash attention prefill - #819
Open
voltjia wants to merge 2 commits into
Open
Conversation
flash_attn_varlen_func
voltjia
marked this pull request as ready for review
July 25, 2026 09:21
voltjia
force-pushed
the
feat/moore-flash-attn-varlen
branch
from
July 25, 2026 14:26
a29db4c to
f8e16ae
Compare
19 tasks
flash_attn_varlen_func
voltjia
force-pushed
the
feat/moore-flash-attn-varlen
branch
from
September 1, 2026 14:20
8fd8f5d to
293e84b
Compare
voltjia
force-pushed
the
feat/moore-flash-attn-varlen
branch
from
September 2, 2026 13:34
cd69650 to
70e5008
Compare
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
feat/moore-flash-attn-varlenonto currentmaster(793bc3b9).flash_attn_varlen_funcwhen a KV-cacheblock_tableis supplied; keep dense attention on the shared ATen provider.Motivation
InfiniLM's migrated paged-prefill path calls the public
flash_attn_varlen_funcAPI with a KV-cache block table. The previous Moore provider only delegated dense attention to TorchMusa and rejected that paged form, leaving Moore without the attention closure needed by those inference commands.N/A - no linked issue.
Type of Change
feat- new feature / new operator / new platformfix- bug fixperf- performance improvement (no behavioral change)refactor- code restructuring without behavior changetest- adding or fixing tests onlydocs- documentation onlybuild/ci- build system or CI configurationchore- tooling, formatting, or other non-code changesPlatforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Smoke Test Result
Validation used InfiniOps head
293e84b2and InfiniRTmasterat6b256e0a.The unfiltered Moore smoke selection completed with
93 passed, 34 skipped, 2 failed, 6331 deselected. Both failures are existing FP32 GEMM tolerance cases intests/test_gemm.py; the attention tests and the remaining smoke set pass.Test Results on Supported Platforms
99 passed, 32 skipped23 passed, 29 skipped91 passed, 34 skipped16 passed, 39 skipped; full smoke selection has only two existing FP32 GEMM tolerance failuresValidation environments
Benchmark / Performance Impact
N/A - this PR adds functional Moore coverage; it makes no comparative performance claim.
Notes for Reviewers
block_tableis present.cu_seqlens_k; no host synchronization or temporary length tensor is introduced, so graph replay observes updated cumulative lengths.