File tree Expand file tree Collapse file tree 6 files changed +36
-11
lines changed
include/mlir/Dialect/Linalg/IR Expand file tree Collapse file tree 6 files changed +36
-11
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,12 @@ add_public_tablegen_target(MLIRLinalgRelayoutOpsIncGen)
72
72
add_dependencies (MLIRLinalgRelayoutOpsIncGen LinalgOdsGen )
73
73
add_dependencies (mlir-headers MLIRLinalgRelayoutOpsIncGen )
74
74
75
+ set (LLVM_TARGET_DEFINITIONS LinalgRelayoutInterface.td )
76
+ mlir_tablegen (LinalgRelayoutInterface.h.inc -gen-op-interface-decls )
77
+ mlir_tablegen (LinalgRelayoutInterface.cpp.inc -gen-op-interface-defs )
78
+ add_public_tablegen_target (MLIRLinalgRelayoutInterfaceIncGen )
79
+ add_dependencies (mlir-headers MLIRLinalgRelayoutInterfaceIncGen )
80
+
75
81
set (LLVM_TARGET_DEFINITIONS LinalgInterfaces.td )
76
82
mlir_tablegen (LinalgInterfaces.h.inc -gen-op-interface-decls )
77
83
mlir_tablegen (LinalgInterfaces.cpp.inc -gen-op-interface-defs )
Original file line number Diff line number Diff line change @@ -221,4 +221,7 @@ LogicalResult verifyStructuredOpInterface(Operation *op);
221
221
// / Include the generated interface declarations.
222
222
#include " mlir/Dialect/Linalg/IR/LinalgInterfaces.h.inc"
223
223
224
+ // / Include the generated relayout interface declarations.
225
+ #include " mlir/Dialect/Linalg/IR/LinalgRelayoutInterface.h.inc"
226
+
224
227
#endif // MLIR_DIALECT_LINALG_IR_LINALGINTERFACES_H_
Original file line number Diff line number Diff line change @@ -178,16 +178,6 @@ def LinalgConvolutionOpInterface : OpInterface<"ConvolutionOpInterface"> {
178
178
];
179
179
}
180
180
181
- def LinalgRelayoutOpInterface : OpInterface<"RelayoutOpInterface"> {
182
- let description = [{
183
- A Linalg relayout-op is either linalg.pack or linalg.unpack.
184
-
185
- While we could extend this interface with methods from Linalg_RelayoutOp,
186
- this is currently not needed and left as a TODO.
187
- }];
188
- let cppNamespace = "::mlir::linalg";
189
- }
190
-
191
181
def LinalgFillOpInterface : OpInterface<"FillOpInterface"> {
192
182
let description = [{
193
183
A fill operation is defined in general terms:
Original file line number Diff line number Diff line change
1
+ //===- LinalgInterfaces.td - Linalg Interfaces Declaration -*- tablegen -*-===//
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 LINALG_IR_LINALGRELAYOUTINTERFACE
10
+ #define LINALG_IR_LINALGRELAYOUTINTERFACE
11
+
12
+ include "mlir/Interfaces/DestinationStyleOpInterface.td"
13
+ include "mlir/IR/OpBase.td"
14
+
15
+ def LinalgRelayoutOpInterface : OpInterface<"RelayoutOpInterface"> {
16
+ let description = [{
17
+ A Linalg relayout-op is either linalg.pack or linalg.unpack.
18
+
19
+ While we could extend this interface with methods from Linalg_RelayoutOp,
20
+ this is currently not needed and left as a TODO.
21
+ }];
22
+ let cppNamespace = "::mlir::linalg";
23
+ }
24
+
25
+ #endif // LINALG_IR_LINALGRELAYOUTINTERFACE
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ include "mlir/Interfaces/DestinationStyleOpInterface.td"
23
23
include "mlir/Interfaces/SideEffectInterfaces.td"
24
24
include "mlir/Interfaces/InferTypeOpInterface.td"
25
25
include "mlir/Dialect/Linalg/IR/LinalgInterfaces.td"
26
+ include "mlir/Dialect/Linalg/IR/LinalgRelayoutInterface.td"
26
27
include "mlir/IR/OpAsmInterface.td"
27
28
28
29
//===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change 10
10
#include " mlir/Dialect/Arith/IR/Arith.h"
11
11
#include " mlir/Dialect/Arith/Utils/Utils.h"
12
12
#include " mlir/Dialect/Complex/IR/Complex.h"
13
- #include " mlir/Dialect/Linalg/IR/Linalg.h "
13
+ #include " mlir/Dialect/Linalg/IR/LinalgRelayoutInterface.h.inc "
14
14
#include " mlir/Dialect/Tensor/IR/Tensor.h"
15
15
#include " mlir/Dialect/Tensor/Utils/Utils.h"
16
16
#include " mlir/Dialect/Utils/IndexingUtils.h"
You can’t perform that action at this time.
0 commit comments