diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp --- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp +++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp @@ -1048,9 +1048,6 @@ genericOp.getMatchingIndexingMap(outputOpOperand.value()); auto key = std::make_tuple(outputOpOperand.value()->get(), indexingMap, yieldOp->getOperand(outputOpOperand.index())); - assert(static_cast(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 // bound computation. Add the operand to the list of dropped op