Repository navigation
[ilu/ttx] optimize int8-KV paged prefill: dequant + reuse bf16 FA2 - #473
Draft
mojo-opset-sync[bot] wants to merge 1 commit into
Draft
mojo-opset-sync[bot] wants to merge 1 commit into
mojo-opset-sync[bot] wants to merge 1 commit into
Conversation
- Add _dequant_paged_kv_block_kernel and rewrite the int8 dequant prefill to dequantize referenced KV blocks to bf16, then reuse the bf16 FA2 kernel; fall back to the scalar kernel for unsupported shapes. ~100x faster (1199ms -> 11.6ms). - Pass original (Hkv, D) scales (drop repeat_interleave); cache bf16 dequant buffers. - Make the GQA packed kernel's autotune-disabled config shared-mem-safe for large groups to fix OOR in CI; fix double-scaling in the non-packed partial-page loop.
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.
Rebase of #361 onto the rebuilt master (
df2f3dab).Original PR author:
AbeFei. Original commit authors, author/committer dates, and messages are preserved.Migration status: rebased and conflicts resolved; Python syntax checked. Accelerator correctness and performance still require validation before merge.