MLIR  20.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 
22 
23 namespace mlir {
24 class TilingInterface;
25 class RewriterBase;
26 
27 namespace linalg {
28 class CopyOp;
29 struct ForallTilingResult;
30 class GenericOp;
31 class LinalgOp;
32 } // namespace linalg
33 
34 namespace scf {
35 struct SCFTilingResult;
36 } // namespace scf
37 
38 namespace tensor {
39 class InsertSliceOp;
40 class PackOp;
41 class PadOp;
42 class UnPackOp;
43 } // namespace tensor
44 
45 namespace transform {
46 // Types needed for builders.
47 struct TileSizesSpec {};
48 struct NumThreadsSpec {};
49 } // namespace transform
50 } // namespace mlir
51 
52 namespace mlir {
53 class DialectRegistry;
54 
55 namespace transform {
56 
57 /// Implementation of tiling operations using `scf.forall`.
58 DiagnosedSilenceableFailure
59 tileToForallOpImpl(RewriterBase &rewriter, transform::TransformState &state,
60  TransformOpInterface transformOp, Operation *target,
61  ArrayRef<OpFoldResult> mixedNumThreads,
62  ArrayRef<OpFoldResult> mixedTileSizes,
63  std::optional<ArrayAttr> mapping,
64  scf::SCFTilingResult &tilingResult);
65 
66 } // namespace transform
67 } // namespace mlir
68 
69 //===----------------------------------------------------------------------===//
70 // Linalg Transform Operations
71 //===----------------------------------------------------------------------===//
72 
73 #include "mlir/Dialect/Linalg/TransformOps/LinalgTransformOpsEnums.h.inc"
74 
75 #define GET_OP_CLASSES
76 #include "mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h.inc"
77 
78 #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, scf::SCFTilingResult &tilingResult)
Implementation of tiling operations using scf.forall.
Include the generated interface declarations.