[mlir][linalg] Fix signed/unsigned comparison warnings (NFC).

Fix signedness warnings in Utils.cpp and LinalgInterfaces.cpp.
This commit is contained in:
Tobias Gysi 2021-06-01 10:55:08 +00:00
parent d4c070d801
commit 07576cc4dc
2 changed files with 4 additions and 2 deletions

View File

@ -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 ("

View File

@ -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;