[Mlir-commits] [mlir] [MLIR][Vector] Add a missing builder implementation for Vector_WarpEx… (PR #110106)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Sep 26 04:04:08 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Petr Kurapov (kurapov-peter)
<details>
<summary>Changes</summary>
…ecuteOnLane0Op
The op declares three builders:
```
let builders = [
OpBuilder<(ins "Value":$laneid, "int64_t":$warpSize)>,
OpBuilder<(ins "TypeRange":$resultTypes, "Value":$laneid,
"int64_t":$warpSize)>,
// `blockArgTypes` are different than `args` types as they are they
// represent all the `args` instances visibile to lane 0. Therefore we need
// to explicit pass the type.
OpBuilder<(ins "TypeRange":$resultTypes, "Value":$laneid,
"int64_t":$warpSize, "ValueRange":$args,
"TypeRange":$blockArgTypes)>
];
```
This adds the missing implementation for the first builder.
---
Full diff: https://github.com/llvm/llvm-project/pull/110106.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/Vector/IR/VectorOps.cpp (+6)
``````````diff
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index cac6b955457049..cf2b6e83f1fc0f 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -6421,6 +6421,12 @@ void WarpExecuteOnLane0Op::getSuccessorRegions(
regions.push_back(RegionSuccessor(&getWarpRegion()));
}
+void WarpExecuteOnLane0Op::build(OpBuilder &builder, OperationState &result,
+ Value laneId, int64_t warpSize) {
+ build(builder, result, TypeRange(), laneId, warpSize,
+ /*operands=*/std::nullopt, /*argTypes=*/std::nullopt);
+}
+
void WarpExecuteOnLane0Op::build(OpBuilder &builder, OperationState &result,
TypeRange resultTypes, Value laneId,
int64_t warpSize) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/110106
More information about the Mlir-commits
mailing list