11
11
12
12
#include " mlir/Dialect/Tensor/IR/Tensor.h"
13
13
#include " mlir/IR/PatternMatch.h"
14
+ #include " mlir/Interfaces/ViewLikeInterface.h"
14
15
15
16
namespace mlir {
16
17
@@ -22,14 +23,24 @@ namespace tensor {
22
23
// Patterns
23
24
// ===----------------------------------------------------------------------===//
24
25
25
- // / Pattern to swap an `tensor.extract_slice` with its producer when the
26
+ // / Method to swap an `tensor.extract_slice` with its producer when the
26
27
// / producer implements the `TilingInterface`. The pattern itself does not
27
28
// / provide a mechanism to control where the application happens. With use of
28
29
// / transform dialect that control is done within the transform dialect. Other
29
30
// / use cases can inherit from this pattern and add necessary controls.
30
31
FailureOr<TilingResult> replaceExtractSliceWithTiledProducer (
31
32
OpBuilder &builder, tensor::ExtractSliceOp sliceOp, OpResult producerOp);
32
33
34
+ // / Method to swap an `tensor.insert_slice` with its consumer when the
35
+ // / consumer implements the `TilingInterface`. The pattern itself does not
36
+ // / provide a mechanism to control where the application happens. With use of
37
+ // / transform dialect that control is done within the transform dialect. Other
38
+ // / use cases can inherit from this pattern and add necessary controls.
39
+ FailureOr<TilingResult>
40
+ replaceInsertSliceWithTiledConsumer (OpBuilder &builder,
41
+ OffsetSizeAndStrideOpInterface sliceOp,
42
+ OpOperand &consumerOp);
43
+
33
44
// ===----------------------------------------------------------------------===//
34
45
// Populate functions.
35
46
// ===----------------------------------------------------------------------===//
0 commit comments