[Mlir-commits] [mlir] 07576cc - [mlir][linalg] Fix signed/unsigned comparison warnings (NFC).
Tobias Gysi
llvmlistbot at llvm.org
Tue Jun 1 04:03:55 PDT 2021
Author: Tobias Gysi
Date: 2021-06-01T10:56:43Z
New Revision: 07576cc4dc891294e31a8ff10ff08c662042c572
URL: https://github.com/llvm/llvm-project/commit/07576cc4dc891294e31a8ff10ff08c662042c572
DIFF: https://github.com/llvm/llvm-project/commit/07576cc4dc891294e31a8ff10ff08c662042c572.diff
LOG: [mlir][linalg] Fix signed/unsigned comparison warnings (NFC).
Fix signedness warnings in Utils.cpp and LinalgInterfaces.cpp.
Added:
Modified:
mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
mlir/lib/Dialect/Linalg/Utils/Utils.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
index aec76094e0459..f565e0091c448 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
@@ -343,7 +343,8 @@ LogicalResult mlir::linalg::detail::verifyStructuredOpInterface(Operation *op) {
return failure();
// All shaped operands must be indexed.
- if (linalgOp.indexing_maps().size() != linalgOp.getNumInputsAndOutputs())
+ if (static_cast<int64_t>(linalgOp.indexing_maps().size()) !=
+ linalgOp.getNumInputsAndOutputs())
return op->emitOpError("expected the number of indexing_map (")
<< linalgOp.indexing_maps().size()
<< ") to be equal to the number of input/output operands ("
diff --git a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
index cb419e4fd8e9d..2b345a42c9a1e 100644
--- a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
@@ -534,7 +534,8 @@ SmallVector<Value, 4> makeTiledShapes(OpBuilder &b, Location loc,
LLVM_DEBUG(llvm::dbgs() << "size: " << subShapeSizes.back() << "\n");
}
- assert(valuesToTile.size() == linalgOp.getNumInputsAndOutputs() &&
+ assert(static_cast<int64_t>(valuesToTile.size()) ==
+ linalgOp.getNumInputsAndOutputs() &&
"expected one value to tile for every operand");
MLIRContext *context = b.getContext();
SmallVector<Value, 4> tiledShapes;
More information about the Mlir-commits
mailing list