Skip to content

ggml-spacemit: optimize flash attention prefill and decoding - #87

Merged
alex-spacemit merged 3 commits into
spacemit-com:mtmd-backendfrom
co-seven:opt/spacemit-fa
Dec 1, 2026
Merged

alex-spacemit merged 3 commits into
spacemit-com:mtmd-backendfrom
co-seven:opt/spacemit-fa

Conversation

@co-seven

Copy link
Copy Markdown
Collaborator

Summary

  • Use IME2 QK/PV kernels, compact scratch, shared KV prepacking, and direct PV accumulation for tiled F16 attention. Extend head dimensions to 512 and reuse KV loads across grouped queries in split-KV. Preserve padding, fully masked rows, and optional-mask handling.

Use IME2 QK/PV kernels, compact scratch, shared KV prepacking and direct
PV accumulation for tiled F16 attention. Extend head dimensions to 512
and reuse KV loads across grouped queries in the split-KV path.

Preserve padding, fully masked rows and optional-mask handling across
the attention paths.

Assisted-by: Codex
@github-actions github-actions Bot added the ggml label Nov 28, 2026
@alex-spacemit
alex-spacemit merged commit 7110fc0 into spacemit-com:mtmd-backend Dec 1, 2026
13 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants