[Mlir-commits] [mlir] 2efe88b - [mlir][Linalg] Fix warnings/errors on D155518.
Mahesh Ravishankar
llvmlistbot at llvm.org
Wed Jul 19 12:30:35 PDT 2023
Author: Mahesh Ravishankar
Date: 2023-07-19T19:30:25Z
New Revision: 2efe88b50e8c96c53dbe41bcb907cc368a1fb0d7
URL: https://github.com/llvm/llvm-project/commit/2efe88b50e8c96c53dbe41bcb907cc368a1fb0d7
DIFF: https://github.com/llvm/llvm-project/commit/2efe88b50e8c96c53dbe41bcb907cc368a1fb0d7.diff
LOG: [mlir][Linalg] Fix warnings/errors on D155518.
This fixes some warnings (that were caught as errors) in https://reviews.llvm.org/D155518/.
Differential Revision: https://reviews.llvm.org/D155738
Added:
Modified:
mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
mlir/test/lib/Dialect/Linalg/TestLinalgDropUnitDims.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp b/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
index b33c75ca94fc0b..fa901dfd1f87cd 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
@@ -361,7 +361,7 @@ static UnitExtentReplacementInfo dropUnitExtentFromOperandMetadata(
return false;
};
- int64_t dim = 0;
+ unsigned dim = 0;
while (dim < operandShape.size() && isUnitDim(dim))
reassociationGroup.push_back(dim++);
while (dim < operandShape.size()) {
@@ -409,7 +409,6 @@ LogicalResult linalg::dropUnitDims(RewriterBase &rewriter, GenericOp genericOp,
llvm::SmallDenseSet<unsigned> unitDimsFilter(allowedUnitDims.begin(),
allowedUnitDims.end());
llvm::SmallDenseSet<unsigned> unitDims;
- ArrayAttr iteratorTypes = genericOp.getIteratorTypes();
for (const auto &expr : enumerate(invertedMap.getResults())) {
if (AffineDimExpr dimExpr = expr.value().dyn_cast<AffineDimExpr>()) {
if (dims[dimExpr.getPosition()] == 1 &&
diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgDropUnitDims.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgDropUnitDims.cpp
index a3a6a49d64b003..decee8eda3be5b 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgDropUnitDims.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgDropUnitDims.cpp
@@ -58,7 +58,7 @@ struct TestLinalgDropUnitDims
for (auto genericOp : genericOps) {
rewriter.setInsertionPoint(genericOp);
- dropOutermostUnitDims(rewriter, genericOp);
+ (void)dropOutermostUnitDims(rewriter, genericOp);
}
}
};
More information about the Mlir-commits
mailing list