diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp index aec76094e045..f565e0091c44 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(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 cb419e4fd8e9..2b345a42c9a1 100644 --- a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp +++ b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp @@ -534,7 +534,8 @@ SmallVector makeTiledShapes(OpBuilder &b, Location loc, LLVM_DEBUG(llvm::dbgs() << "size: " << subShapeSizes.back() << "\n"); } - assert(valuesToTile.size() == linalgOp.getNumInputsAndOutputs() && + assert(static_cast(valuesToTile.size()) == + linalgOp.getNumInputsAndOutputs() && "expected one value to tile for every operand"); MLIRContext *context = b.getContext(); SmallVector tiledShapes;