Skip to content

Commit

Permalink
[mlir] Fix a warning
Browse files Browse the repository at this point in the history
This patch fixes:

  mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1051:40: error: comparison
  of integers of different signs: 'int64_t' (aka 'long') and
  'std::size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
  • Loading branch information
kazutakahirata committed Oct 10, 2022
1 parent 6b89e89 commit d208bae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,8 @@ struct DeduplicateAndRemoveDeadOperandsAndResults
genericOp.getMatchingIndexingMap(outputOpOperand.value());
auto key = std::make_tuple(outputOpOperand.value()->get(), indexingMap,
yieldOp->getOperand(outputOpOperand.index()));
assert(genericOp.getNumOutputs() >= outputOpOperand.index() &&
assert(static_cast<std::size_t>(genericOp.getNumOutputs()) >=
outputOpOperand.index() &&
"Output op idx greater than number of outputs.");
if (isResultValueDead(genericOp, result)) {
// Check if the opoperand can be dropped without affecting loop
Expand Down

0 comments on commit d208bae

Please sign in to comment.