assert(consumer.hasBufferSemantics() &&
"expected linalg op with buffer semantics");
- if (auto convOp = dyn_cast<linalg::ConvOp>(producer.getOperation())) {
- // TODO(ntv): add a level of indirection to linalg.generic.
- if (convOp.padding())
- llvm_unreachable("Unexpected conv with padding");
- }
- if (auto convOp = dyn_cast<linalg::ConvOp>(consumer.getOperation())) {
- // TODO(ntv): add a level of indirection to linalg.generic.
- if (convOp.padding())
- llvm_unreachable("Unexpected conv with padding");
- }
-
auto subView = dyn_cast_or_null<SubViewOp>(
consumer.getBuffer(consumerIdx).getDefiningOp());
auto slice = dyn_cast_or_null<SliceOp>(
<< *producer.getOperation());
return false;
}
+ if (auto convOp = dyn_cast<linalg::ConvOp>(producer.getOperation())) {
+ // TODO(ntv): add a level of indirection to linalg.generic.
+ if (convOp.padding())
+ return false;
+ }
+ if (auto convOp = dyn_cast<linalg::ConvOp>(consumer.getOperation())) {
+ // TODO(ntv): add a level of indirection to linalg.generic.
+ if (convOp.padding())
+ return false;
+ }
return true;
}
// 5. Gather the newly created loops and return them with the new op.
SmallVector<Operation *, 8> loops;
loops.reserve(ivs.size());
- for (auto iv : ivs)
- loops.push_back(loop::getForInductionVarOwner(iv));
+ for (auto iv : ivs) {
+ loops.push_back(iv.cast<BlockArgument>().getOwner()->getParentOp());
+ assert(loops.back() && "no owner found for induction variable!");
+ }
return TiledLinalgOp{res, loops};
}