-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Remove an incorrect assert in MFMASmallGemmSingleWaveOpt. #130131
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
anjenner
merged 4 commits into
llvm:main
from
anjenner:remove-incorrect-assert-in-MFMASmallGemmSingleWaveOpt
Apr 24, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
87f1d60
Remove an incorrect assert in MFMASmallGemmSingleWaveOpt.
anjenner 0a47cb5
Address review feedback.
anjenner 097fbb7
Reduce testcase, remove -global-isel, drop Attrs comments and check o…
anjenner 26aafac
Make mtriple change suggested by Matt Arsenault.
anjenner 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
43 changes: 43 additions & 0 deletions
43
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.iglp.AFLCustomIRMutator.opt.ll
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,43 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -O1 < %s | FileCheck -check-prefix=GCN %s | ||
|
||
define amdgpu_kernel void @test_iglp_opt_rev_mfma_gemm(<1 x i64> %L1) { | ||
; GCN-LABEL: test_iglp_opt_rev_mfma_gemm: | ||
; GCN: ; %bb.0: ; %entry | ||
; GCN-NEXT: v_mov_b32_e32 v32, 0 | ||
; GCN-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0 | ||
; GCN-NEXT: ds_read_b128 v[28:31], v32 offset:112 | ||
; GCN-NEXT: ds_read_b128 v[24:27], v32 offset:96 | ||
; GCN-NEXT: ds_read_b128 v[20:23], v32 offset:80 | ||
; GCN-NEXT: ds_read_b128 v[16:19], v32 offset:64 | ||
; GCN-NEXT: ds_read_b128 v[0:3], v32 | ||
; GCN-NEXT: ds_read_b128 v[4:7], v32 offset:16 | ||
; GCN-NEXT: ds_read_b128 v[8:11], v32 offset:32 | ||
; GCN-NEXT: ds_read_b128 v[12:15], v32 offset:48 | ||
; GCN-NEXT: v_mov_b32_e32 v34, 0 | ||
; GCN-NEXT: v_mov_b32_e32 v35, v34 | ||
; GCN-NEXT: s_waitcnt lgkmcnt(0) | ||
; GCN-NEXT: s_cmp_lg_u64 s[0:1], 0 | ||
; GCN-NEXT: ; iglp_opt mask(0x00000001) | ||
; GCN-NEXT: ds_write_b128 v32, v[28:31] offset:112 | ||
; GCN-NEXT: ds_write_b128 v32, v[24:27] offset:96 | ||
; GCN-NEXT: ds_write_b128 v32, v[20:23] offset:80 | ||
; GCN-NEXT: ds_write_b128 v32, v[16:19] offset:64 | ||
; GCN-NEXT: ds_write_b128 v32, v[12:15] offset:48 | ||
; GCN-NEXT: ds_write_b128 v32, v[8:11] offset:32 | ||
; GCN-NEXT: ds_write_b128 v32, v[4:7] offset:16 | ||
; GCN-NEXT: ds_write_b128 v32, v[0:3] | ||
; GCN-NEXT: ds_write_b64 v32, v[34:35] | ||
; GCN-NEXT: s_endpgm | ||
entry: | ||
call void @llvm.amdgcn.iglp.opt(i32 1) | ||
%load.4 = load <32 x float>, ptr addrspace(3) null, align 128 | ||
%B = urem <1 x i64> zeroinitializer, %L1 | ||
store <32 x float> %load.4, ptr addrspace(3) null, align 128 | ||
store <1 x i64> %B, ptr addrspace(3) null, align 8 | ||
ret void | ||
} | ||
|
||
declare void @llvm.amdgcn.iglp.opt(i32 immarg) #0 | ||
|
||
attributes #0 = { convergent nocallback nofree nounwind willreturn } |
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.
Can return false?
There are other
InstructionRule
inMFMASmallGemmSingleWaveOpt
that make a similar assert -- can you apply the same change in those places as well?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.
I didn't think an explicit "return false" would be helpful - if Cache is empty at this point then the loop immediately below will do zero iterations and we'll hit the "return false" immediately below that.
The only other similar assert I found was the one in the next inner class down, MFMASmallGemmSingleWaveOpt::IsPermForDSW . Again this will return false if Cache is empty due to the llvm::any_of() call.