-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[mlir][spirv] Add instruction OpGroupNonUniformRotateKHR #133428
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 1 commit
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -304,6 +304,38 @@ LogicalResult GroupNonUniformLogicalXorOp::verify() { | |||||
| return verifyGroupNonUniformArithmeticOp<GroupNonUniformLogicalXorOp>(*this); | ||||||
| } | ||||||
|
|
||||||
| //===----------------------------------------------------------------------===// | ||||||
| // spirv.GroupNonUniformRotateKHR | ||||||
| //===----------------------------------------------------------------------===// | ||||||
|
|
||||||
| LogicalResult GroupNonUniformRotateKHROp::verify() { | ||||||
| spirv::Scope scope = getExecutionScope(); | ||||||
| if (scope != spirv::Scope::Workgroup && scope != spirv::Scope::Subgroup) | ||||||
| return emitOpError("execution scope must be 'Workgroup' or 'Subgroup'"); | ||||||
|
|
||||||
| if (getDelta().getType().isSignedInteger()) | ||||||
| return emitOpError("delta must be a singless/unsigned integer"); | ||||||
|
|
||||||
| auto clusterSizeVal = getClusterSize(); | ||||||
|
||||||
| if (clusterSizeVal) { | ||||||
|
||||||
| if (clusterSizeVal) { | |
| if (TheType clusterSizeVal = getClusterSize()) { |
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.
Done.
Outdated
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.
Same as above.
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.
Done.
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.
Could this check be avoided if
deltais set to beSPIRV_SignlessOrUnsignedInt? NB This is a good place to look at what types are already defined:llvm-project/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
Line 4129 in e871143
But I'm not going to lie, I sometimes personally get quite confused looking for the correct type :)
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.
Done.