Jim/dev/mi400 mha bwd#3281
Open
slippedJim wants to merge 4 commits into
Open
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds FMHA v3 backward (MHA bwd) ASM-kernel support for the gfx1250 GPU architecture by introducing new gfx1250 kernel/config entries and updating the runtime dispatch logic to recognize and launch them.
Changes:
- Add
gfx1250FMHA v3 bwd config CSVs for ODO (pre), dQ/dK/dV, and dQ convert (post) kernels. - Extend
fmha_v3_bwddispatch to allowgfx1250, select the appropriate post-processing config, and always enable post-processing ongfx1250. - Adjust workgroup size (
bdx) to 128 ongfx1250for pre/dqdkdv/post kernel launches.
Reviewed changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| hsa/gfx1250/fmha_v3_bwd/fmha_bwd_odo.csv | Adds gfx1250 ODO (pre-processing) kernel configuration entry. |
| hsa/gfx1250/fmha_v3_bwd/fmha_bwd_dqdkdv.csv | Adds gfx1250 dQ/dK/dV kernel configuration entries (including causal BR). |
| hsa/gfx1250/fmha_v3_bwd/fmha_bwd_dq_convert.csv | Adds gfx1250 dQ convert (post-processing) kernel configuration entry. |
| csrc/cpp_itfs/mha_bwd.cu | Enables gfx1250 in asm v3 bwd dispatch, sets post-processing behavior, and tweaks launch block size. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
314
to
326
| @@ -321,11 +321,13 @@ float fmha_v3_bwd(mha_bwd_args a, const ck_tile::stream_config& s) | |||
| { | |||
| return static_cast<CFG*>(nullptr); | |||
| } | |||
| } else { | |||
| return &cfg_fmha_bwd_dq_convert; // gfx1250 only support atomic32=1 | |||
| } | |||
|
|
||
| if((mt == 1) || (mt == 2)) | ||
| { // causal | ||
| { // mask kb |
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.
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist