-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[MLIR][XeVM] Add xevm blockload and blockstore op definition. #158118
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,29 @@ func.func @blockprefetch2d(%ptr: !llvm.ptr<1>, %base_width: i32, %base_height: i | |
return | ||
} | ||
|
||
// ----- | ||
// CHECK-LABEL: func.func @blockload( | ||
// CHECK-SAME: %[[ARG0:.*]]: !llvm.ptr<1>) | ||
func.func @blockload(%ptr: !llvm.ptr<1>) -> vector<4xi16> { | ||
// CHECK: %[[VAR0:.*]] = xevm.blockload %[[ARG0]] | ||
// CHECK-SAME: cache_control = #xevm.load_cache_control<L1uc_L2uc_L3uc> | ||
// CHECK-SAME: (!llvm.ptr<1>) -> vector<4xi16> | ||
%loaded = xevm.blockload %ptr <{cache_control=#xevm.load_cache_control<L1uc_L2uc_L3uc>}> | ||
: (!llvm.ptr<1>) -> vector<4xi16> | ||
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. why is output not a multiple of SG size? 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. Output is distributed to work item lanes. |
||
return %loaded : vector<4xi16> | ||
} | ||
|
||
// ----- | ||
// CHECK-LABEL: func.func @blockstore( | ||
// CHECK-SAME: %[[ARG0:.*]]: !llvm.ptr<1>, | ||
// CHECK-SAME: %[[ARG1:.*]]: vector<4xi32>) | ||
func.func @blockstore(%ptr: !llvm.ptr<1>, %value: vector<4xi32>) { | ||
// CHECK: xevm.blockstore %[[ARG0]], %[[ARG1]] | ||
// CHECK-SAME: (!llvm.ptr<1>, vector<4xi32>) | ||
xevm.blockstore %ptr, %value : (!llvm.ptr<1>, vector<4xi32>) | ||
return | ||
} | ||
|
||
// ----- | ||
// CHECK-LABEL: func.func @mma( | ||
// CHECK-SAME: %[[ARG0:.*]]: vector<8xf32>, %[[ARG1:.*]]: vector<8xi16>, %[[ARG2:.*]]: vector<8xi32>) | ||
|
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.
nit: seems target specific? add a TODO or move to a dedicated location for HW specifics.
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.
Not target arch or chip specific but the restrictions are OpenCL / SPIR-V Intel extensions specific.
In that sense, it applies to all Intel HW and not target specific.
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 put links to related specs above.