25 auto producerOp = dyn_cast<TilingInterface>(producer.
getOwner());
30 if (llvm::any_of(sliceOp.getMixedStrides(), [](
OpFoldResult ofr) {
31 return !isConstantIntValue(ofr, 1);
35 FailureOr<TilingResult> tiledResult = producerOp.generateResultTileValue(
37 sliceOp.getMixedSizes());
38 if (failed(tiledResult))
45 OpBuilder &builder, OffsetSizeAndStrideOpInterface sliceOp,
47 auto consumerOp = dyn_cast<TilingInterface>(consumer.
getOwner());
52 if (llvm::any_of(sliceOp.getMixedStrides(), [](
OpFoldResult ofr) {
53 return !isConstantIntValue(ofr, 1);
57 FailureOr<TilingResult> tiledResult =
58 consumerOp.getTiledImplementationFromOperandTile(
60 sliceOp.getMixedSizes());
61 if (failed(tiledResult))
This class helps build Operations.
This class represents a single result from folding an operation.
This class represents an operand of an operation.
unsigned getOperandNumber()
Return which operand this is in the OpOperand list of the Operation.
This is a value defined by a result of an operation.
Operation * getOwner() const
Returns the operation that owns this result.
unsigned getResultNumber() const
Returns the number of this result.
Operation * getOwner() const
Return the owner of this operand.
FailureOr< TilingResult > replaceExtractSliceWithTiledProducer(OpBuilder &builder, tensor::ExtractSliceOp sliceOp, OpResult producerOp)
Method to swap an tensor.extract_slice with its producer when the producer implements the TilingInter...
FailureOr< TilingResult > replaceInsertSliceWithTiledConsumer(OpBuilder &builder, OffsetSizeAndStrideOpInterface sliceOp, OpOperand &consumerOp)
Method to swap an tensor.insert_slice with its consumer when the consumer implements the TilingInterf...
Include the generated interface declarations.