[Mlir-commits] [mlir] f31531a - [mlir][linalg] Remove redundant indexOp builder.
Tobias Gysi
llvmlistbot at llvm.org
Fri May 7 07:23:24 PDT 2021
Author: Tobias Gysi
Date: 2021-05-07T14:22:12Z
New Revision: f31531a30b124042d8523b7d50053ade82659c5b
URL: https://github.com/llvm/llvm-project/commit/f31531a30b124042d8523b7d50053ade82659c5b
DIFF: https://github.com/llvm/llvm-project/commit/f31531a30b124042d8523b7d50053ade82659c5b.diff
LOG: [mlir][linalg] Remove redundant indexOp builder.
Remove the builder signature taking a signed dimension identifier.
Reviewed By: ergawy
Differential Revision: https://reviews.llvm.org/D102055
Added:
Modified:
mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
index b3046d2200b6..dd5c2d5a51d9 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
@@ -688,10 +688,6 @@ def Linalg_IndexOp : Linalg_Op<"index", [NoSideEffect]>,
}
```
}];
- let builders = [
- OpBuilder<(ins "int64_t":$dim),
- [{ build($_builder, $_state, $_builder.getIndexType(), dim); }]>
- ];
let assemblyFormat = [{ $dim attr-dict `:` type($result) }];
}
diff --git a/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp b/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
index fab957e7fca4..4ee534d111d0 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
@@ -153,8 +153,8 @@ generateFusedElementwiseOpRegion(PatternRewriter &rewriter, Operation *fusedOp,
std::max(producer.getNumLoops(), consumer.getNumLoops());
SmallVector<Value> fusedIndices;
fusedIndices.reserve(numFusedOpLoops);
- llvm::transform(llvm::seq<int64_t>(0, numFusedOpLoops),
- std::back_inserter(fusedIndices), [&](int64_t dim) {
+ llvm::transform(llvm::seq<uint64_t>(0, numFusedOpLoops),
+ std::back_inserter(fusedIndices), [&](uint64_t dim) {
return rewriter.create<IndexOp>(producer.getLoc(), dim);
});
for (IndexOp indexOp :
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp b/mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp
index 29acd628d101..6d13765b7f54 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp
@@ -93,8 +93,8 @@ void mlir::linalg::interchange(PatternRewriter &rewriter, LinalgOp op,
rewriter.setInsertionPoint(indexOp);
SmallVector<Value> allIndices;
allIndices.reserve(op.getNumLoops());
- llvm::transform(llvm::seq<int64_t>(0, op.getNumLoops()),
- std::back_inserter(allIndices), [&](int64_t dim) {
+ llvm::transform(llvm::seq<uint64_t>(0, op.getNumLoops()),
+ std::back_inserter(allIndices), [&](uint64_t dim) {
return rewriter.create<IndexOp>(indexOp->getLoc(), dim);
});
rewriter.replaceOpWithNewOp<AffineApplyOp>(
More information about the Mlir-commits
mailing list