-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[MLIR][NVVM] Support generating all the ldmatrix intrinsics from NVVM ops #148783
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
+287
−86
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fac3099
Support generating all the ldmatrix intrinsics from NVVM ops
Pecco-314 784b749
Modify the arguments of the ldmatrix op
Pecco-314 3b7c285
Follow the convention of eltType in the naming
Pecco-314 7af2a81
Add verifier for ldmatrix
Pecco-314 c0f544e
Change "ld_st_matrix_elttype" to "ld_st_matrix_elt_type"
Pecco-314 dfd19cb
Simplifier the structure of `getLdMatrixIntrinsicId`
Pecco-314 40b098b
Move the negative test to nvvmir-invalid.mlir
Pecco-314 a7d3099
Keep the pointer as shared instead of any
Pecco-314 dac518d
Merge branch 'main' of github.com:llvm/llvm-project into ldmatrix-nvv…
Pecco-314 34a677a
Merge branch 'main' into ldmatrix-nvvm-op
Pecco-314 bb6126b
Remove the space between `:` and the variable
Pecco-314 44247ac
Add a newline at the end of the file
Pecco-314 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1220,38 +1220,6 @@ llvm.func @gpu_wmma_mma_op_invalid_result(%arg0: vector<2 x f16>, %arg1: vector< | |
|
||
// ----- | ||
|
||
llvm.func @wmmald_matrix(%arg0: !llvm.ptr) { | ||
// expected-error@+1 {{'nvvm.ldmatrix' op expected source pointer in memory space 3}} | ||
%l = nvvm.ldmatrix %arg0 {num = 1 : i32, layout = #nvvm.mma_layout<row>} : (!llvm.ptr) -> i32 | ||
llvm.return | ||
} | ||
|
||
// ----- | ||
|
||
llvm.func @wmmald_matrix(%arg0: !llvm.ptr<3>) { | ||
// expected-error@+1 {{'nvvm.ldmatrix' op expected num attribute to be 1, 2 or 4}} | ||
%l = nvvm.ldmatrix %arg0 {num = 3 : i32, layout = #nvvm.mma_layout<row>} : (!llvm.ptr<3>) -> i32 | ||
llvm.return | ||
} | ||
|
||
// ----- | ||
|
||
llvm.func @wmmald_matrix(%arg0: !llvm.ptr<3>) { | ||
// expected-error@+1 {{'nvvm.ldmatrix' op expected destination type is i32}} | ||
%l = nvvm.ldmatrix %arg0 {num = 1 : i32, layout = #nvvm.mma_layout<row>} : (!llvm.ptr<3>) -> !llvm.struct<(i32)> | ||
llvm.return | ||
} | ||
|
||
// ----- | ||
|
||
llvm.func @wmmald_matrix(%arg0: !llvm.ptr<3>) { | ||
// expected-error@+1 {{'nvvm.ldmatrix' op expected destination type is a structure of 4 elements of type i32}} | ||
%l = nvvm.ldmatrix %arg0 {num = 4 : i32, layout = #nvvm.mma_layout<row>} : (!llvm.ptr<3>) -> !llvm.struct<(i32, i32)> | ||
llvm.return | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for cleaning this up and consolidating all these in the nvvm specific |
||
// ----- | ||
|
||
llvm.func @caller() { | ||
// expected-error @below {{expected function call to produce a value}} | ||
llvm.call @callee() : () -> () | ||
|
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.
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.