MLIR  19.0.0git
LinalgTransformOps.h
Go to the documentation of this file.
1 //===- LinalgTransformOps.h - Linalg transform ops --------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef MLIR_DIALECT_LINALG_TRANSFORMOPS_LINALGTRANSFORMOPS_H
10 #define MLIR_DIALECT_LINALG_TRANSFORMOPS_LINALGTRANSFORMOPS_H
11 
21 
22 namespace mlir {
23 class TilingInterface;
24 class RewriterBase;
25 
26 namespace linalg {
27 class CopyOp;
28 struct ForallTilingResult;
29 class GenericOp;
30 class LinalgOp;
31 } // namespace linalg
32 
33 namespace tensor {
34 class InsertSliceOp;
35 class PackOp;
36 class PadOp;
37 class UnPackOp;
38 } // namespace tensor
39 
40 namespace transform {
41 class AnyOpType;
42 class AnyValueType;
43 class OperationType;
44 class TransformHandleTypeInterface;
45 // Types needed for builders.
46 struct TileSizesSpec {};
47 struct NumThreadsSpec {};
48 } // namespace transform
49 } // namespace mlir
50 
51 namespace mlir {
52 class DialectRegistry;
53 
54 namespace transform {
55 
56 /// Implementation of tiling operations using `scf.forall`.
57 DiagnosedSilenceableFailure
58 tileToForallOpImpl(RewriterBase &rewriter, transform::TransformState &state,
59  TransformOpInterface transformOp, Operation *target,
60  ArrayRef<OpFoldResult> mixedNumThreads,
61  ArrayRef<OpFoldResult> mixedTileSizes,
62  std::optional<ArrayAttr> mapping,
63  linalg::ForallTilingResult &tilingResult);
64 
65 } // namespace transform
66 } // namespace mlir
67 
68 //===----------------------------------------------------------------------===//
69 // Linalg Transform Operations
70 //===----------------------------------------------------------------------===//
71 
72 #include "mlir/Dialect/Linalg/TransformOps/LinalgTransformOpsEnums.h.inc"
73 
74 #define GET_OP_CLASSES
75 #include "mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h.inc"
76 
77 #endif // MLIR_DIALECT_LINALG_TRANSFORMOPS_LINALGTRANSFORMOPS_H
DiagnosedSilenceableFailure tileToForallOpImpl(RewriterBase &rewriter, transform::TransformState &state, TransformOpInterface transformOp, Operation *target, ArrayRef< OpFoldResult > mixedNumThreads, ArrayRef< OpFoldResult > mixedTileSizes, std::optional< ArrayAttr > mapping, linalg::ForallTilingResult &tilingResult)
Implementation of tiling operations using scf.forall.
Include the generated interface declarations.