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 TransformHandleTypeInterface;
42 // Types needed for builders.
43 struct TileSizesSpec {};
44 struct NumThreadsSpec {};
45 } // namespace transform
46 } // namespace mlir
47 
48 namespace mlir {
49 class DialectRegistry;
50 
51 namespace transform {
52 
53 /// Implementation of tiling operations using `scf.forall`.
54 DiagnosedSilenceableFailure
55 tileToForallOpImpl(RewriterBase &rewriter, transform::TransformState &state,
56  TransformOpInterface transformOp, Operation *target,
57  ArrayRef<OpFoldResult> mixedNumThreads,
58  ArrayRef<OpFoldResult> mixedTileSizes,
59  std::optional<ArrayAttr> mapping,
60  linalg::ForallTilingResult &tilingResult);
61 
62 } // namespace transform
63 } // namespace mlir
64 
65 //===----------------------------------------------------------------------===//
66 // Linalg Transform Operations
67 //===----------------------------------------------------------------------===//
68 
69 #include "mlir/Dialect/Linalg/TransformOps/LinalgTransformOpsEnums.h.inc"
70 
71 #define GET_OP_CLASSES
72 #include "mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h.inc"
73 
74 #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.