25 auto producerOp = dyn_cast<TilingInterface>(producer.
getOwner());
30 if (!llvm::all_of(sliceOp.getMixedStrides(),
isOneInteger))
33 FailureOr<TilingResult> tiledResult = producerOp.generateResultTileValue(
35 sliceOp.getMixedSizes());
36 if (failed(tiledResult))
43 OpBuilder &builder, OffsetSizeAndStrideOpInterface sliceOp,
45 auto consumerOp = dyn_cast<TilingInterface>(consumer.
getOwner());
50 if (!llvm::all_of(sliceOp.getMixedStrides(),
isOneInteger))
53 FailureOr<TilingResult> tiledResult =
54 consumerOp.getTiledImplementationFromOperandTile(
56 sliceOp.getMixedSizes());
57 if (failed(tiledResult))
This class helps build Operations.
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.
bool isOneInteger(OpFoldResult v)
Return true if v is an IntegerAttr with value 1.