Repository navigation
Enable gfx950 FP8 HD128/256 fused-attn ASM forward from aiter #741
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
21 commits
Select commit
Hold shift + click to select a range
ced226c
Enable gfx950 FP8 HD128/256 fused-attn ASM forward.
yaomingamd f6024b4
FP8 scale chagne to support real scal-factor for input tensors
yaomingamd 708a31c
modify FFI for support FP8 attention with scale factor for FP8 inputs
yaomingamd d5570f6
Document why FP8 FMHA fails closed instead of falling through to CK.
yaomingamd e9de099
Clarify that FP8 E4M3 is an input dtype and BF16 output is a separate…
yaomingamd 03bd6b9
Describe FP8 descales as one FP32 inverse scale per tensor.
yaomingamd ac9ec8b
Note that "fp8bf16" is the AITER kernel tag, not the TE dtype name.
yaomingamd 990083d
Describe the CK dtype filter as a Q/KV type check.
yaomingamd bb896a7
Bind FP8 scale_inv after the unused segment tensors in the JAX FFI.
yaomingamd 9c70b62
Merge remote-tracking branch 'upstream/dev' into ymmu/fp8_hd128_256_f…
yaomingamd 369e177
Merge remote-tracking branch 'rocm/dev' into ymmu/fp8_hd128_256_fwd_a…
yaomingamd 5fbcf68
Use one named skip marker for the gfx950 FP8 attention tests.
yaomingamd 9e76ec8
Rename the CK fused-attention FP8 enum value to kFloat8.
yaomingamd 4463bee
Clarify that the CK data-type string is an AITER kernel tag.
yaomingamd 28c623f
Skip FP8 fused-attn kernel tests when AITER is disabled.
yaomingamd 86d781d
Pass batch_size into the keyword-only fused attention helper.
yaomingamd bc0a7eb
Select no fused-attn backend for FP8 when AITER v3 is disabled.
yaomingamd cb22dea
Treat FP8 scale inverses as primal fused-attn inputs under custom_vjp.
yaomingamd 96f66df
Keep the FP8 ASM probe from launching sink or split-KV kernels.
yaomingamd ccfd30f
Add the AMD copyright header on multi-head attention.
yaomingamd 0e1ba6c
Reuse the existing FP8 input check for the fused-attn output dtype.
yaomingamd 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
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this potentially run an actual kernel? Note that the
v3_api_checkis not honored for sink/split-kv dispatch -- see the compiled-out helperUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not know QoLA builds with FA_WITH_SINK=1 and FA_WITH_NATIVE_SPLITKV=1. Fix: before the probe call, clear num_splits, splitkv_workspace_ptr, has_sink, and sink_ptr so dispatch falls through to the v3 dry-run and cannot launch a kernel.
if(args.dtype == DType::kFloat8){
aiter::mha_fwd_args probe_args = fmha_args;
probe_args.v3_api_check = true;
_+ probe_args.num_splits = 0;
_+ probe_args.splitkv_workspace_ptr = nullptr;
_+ probe_args.has_sink = false;
+ probe_args.sink_ptr = nullptr;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra defence it good.
For reference it should not create problems originally because sink kernels are gfx1250 only and they are also disabled if any descale_ptr is set; and split-kv are for bf16 input.