-
Notifications
You must be signed in to change notification settings - Fork 405
rocm-ck: [AE-1] FmhaMaskType enum on FmhaBwdDQDKDVAlgorithm #7274
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
aosewski
merged 3 commits into
users/shumway/ck/exp-kpack
from
users/chris-tsiaousis-hpc/ck/rocm-ck-ae-1-mask-type-enum
Jun 3, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
d7a601a
rocm-ck: [AE-1] Add FmhaMaskType enum to common.hpp
chris-tsiaousis-hpc 220a6bb
rocm-ck: [AE-1] Replace has_mask bool with mask_type enum on DqDkDv
chris-tsiaousis-hpc e087453
rocm-ck: [AE-1] reconcile mask_type rename with post-rebase straggler…
aosewski 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
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
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
19 changes: 19 additions & 0 deletions
19
...cts/composablekernel/experimental/rocm_ck/tests/compile_fail/dqdkdv_invalid_mask_type.cpp
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Copyright (c) Advanced Micro Devices, Inc., or its affiliates. | ||
| // SPDX-License-Identifier: MIT | ||
| // | ||
| // Must fail: mask_type must be one of the four declared enum values. | ||
| // A value cast in from out-of-range integer space (e.g. 99) is forwarded | ||
| // verbatim to the device-side static_cast<ck_tile::GenericAttentionMaskEnum>, | ||
| // where it would silently land on undefined kernel behaviour. The consteval | ||
| // validator in makeSpec rejects it at compile time instead. | ||
| // | ||
| // Expected error: "mask_type must be NO_MASK, TOP_LEFT_CAUSAL, | ||
| // BOTTOM_RIGHT_CAUSAL, or GENERIC" | ||
|
|
||
| #include <rocm_ck/ops/fmha_bwd/dqdkdv_spec.hpp> | ||
|
|
||
| using namespace rocm_ck; | ||
|
|
||
| constexpr auto bad = makeSpec(FmhaBwdDQDKDVConfig{ | ||
| .signature = {.dtype = DataType::FP16, .hdim_q = 128, .hdim_v = 128, .mode = FmhaMode::BATCH}, | ||
| .algorithm = {.mask_type = static_cast<FmhaMaskType>(99), .pad_hdim_q = 8, .pad_hdim_v = 8}}); | ||
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.
Nice one! Since the enum has to maintained parallel to the CK Tile one, it is nice to have a test to see what happens if one's enum value is different from the "approved" ones.