[Mlir-commits] [mlir] [mlir][bufferization]-Add ControlBuildSubsetExtractionFn to TensorEmptyElimination (PR #120851)
Matthias Springer
llvmlistbot at llvm.org
Sat Dec 28 01:02:54 PST 2024
================
@@ -129,7 +148,7 @@ LogicalResult mlir::bufferization::eliminateEmptyTensors(
&visitedOpOperands);
for (Value v : emptyTensors) {
- Operation *emptyTensorOp = v.getDefiningOp();
+ auto emptyTensorOp = v.getDefiningOp<tensor::EmptyOp>();
----------------
matthias-springer wrote:
I'd add an `assert(emptyTensorOp && "expected tensor.empty op")` to help with debugging in case some of this code changes in the future.
https://github.com/llvm/llvm-project/pull/120851
More information about the Mlir-commits
mailing list