-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
[Feat] CPU fp8 attn for AMX/AVX-512 #39445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
522c64d
Initial fallback fp8 kv cache implementation
tianmu-li 0aaf9a1
WIP
tianmu-li 30c30ac
fp8->fp16->fp32 2-stage implementation
tianmu-li c8727d2
Cleanup
tianmu-li e329db1
Add AMX and fp8_e5m2
tianmu-li b80aa3a
WIP AMX improvement
tianmu-li e57eed4
Move scale multiplication for k and v to matmul results; remove dead …
tianmu-li 9947fc7
Move scale multiplication for AMX to matmul results
tianmu-li 1a07052
Direct fp8->bf16 conversion for amx
tianmu-li ea5cabe
Cleanup; always use AMX for fp8 attn when available
tianmu-li 7e3af61
Comment cleanup
tianmu-li d1fac47
Remove benchmark file
tianmu-li f8578d1
Merge remote-tracking branch 'origin/main' into tianmu/cpu_fp8_attn
tianmu-li b47a6b2
Simplify fp8 function calls
tianmu-li 1088172
Use template calls for fp8 cpu variants; address review comments
tianmu-li 9232093
Merge remote-tracking branch 'origin/main' into tianmu/cpu_fp8_attn
tianmu-li 0e1ce52
Simplify TileGemm structure for fp8
tianmu-li ea73ceb
Use kv_cache_scalar_t for non-supported fp8 platforms; cleanup
tianmu-li f9abd40
Unify FP8/non-FP8 dispatch; fix FP8 VEC on non-AMX x86
tianmu-li e6d3977
Pass k_scale, v_scale, kv_cache_dtype unconditionally to C++ backend
tianmu-li 6f417e5
Merge remote-tracking branch 'origin/main' into tianmu/cpu_fp8_attn
tianmu-li 9a78530
WIP
tianmu-li 5f57d86
WIP
tianmu-li 5223ce4
WIP cleanup
tianmu-li 7afde8c
cpu fp8 attn: guard pack_kv_cache, dedup quant fn dispatch, add featu…
tianmu-li a1196e6
cpu fp8 attn: revert kv_cache_scalar_t rename in NEON/VXE/VEC16 helpe…
tianmu-li 0fe3c63
Comment update
tianmu-li 7a5e97e
Minor syntax
tianmu-li 9f50e46
Fix kv_cache_scalar_t/kv_cache_t namings
tianmu-li 1019419
Disable fp8 attn for avx2
tianmu-li 0fe182e
Merge branch 'main' into tianmu/cpu_fp8_attn
tianmu-li 05bb143
Truly disable fp8 attn for avx-2
tianmu-li 2a9314b
Merge tests for fp8 into existing ones; restore unintended changes
tianmu-li 5a14af8
Merge remote-tracking branch 'origin/main' into tianmu/cpu_fp8_attn
tianmu-li d67d415
Fix pre-commit error
tianmu-li 25c9d46
Removed unintended changes
tianmu-li b53bb95
Remove unintended changes
tianmu-li d44d5cc
Gate fp8 kv cache to x86 only
tianmu-li 1cf96c8
Typo
tianmu-li a0ff62e
Guard get_output_v_scale behind fp8_kv
tianmu-li a79e132
Add missing k_inv and v_inv for neon BFMMLA
tianmu-li 38a7aec
Add fp8_e4m3 and fp8_e5m2 tags for arm and vxe
tianmu-li ec2a69f
Merge branch 'main' into tianmu/cpu_fp8_attn
bigPYJ1151 d33be6f
Merge branch 'main' into tianmu/cpu_fp8_attn
bigPYJ1151 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.