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)
7272add_dependencies (MLIRLinalgRelayoutOpsIncGen LinalgOdsGen)
7373add_dependencies (mlir-headers MLIRLinalgRelayoutOpsIncGen)
7474
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+
7581set (LLVM_TARGET_DEFINITIONS LinalgInterfaces.td)
7682mlir_tablegen(LinalgInterfaces.h.inc -gen-op-interface -decls)
7783mlir_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);
221221// / Include the generated interface declarations.
222222#include " mlir/Dialect/Linalg/IR/LinalgInterfaces.h.inc"
223223
224+ // / Include the generated relayout interface declarations.
225+ #include " mlir/Dialect/Linalg/IR/LinalgRelayoutInterface.h.inc"
226+
224227#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"> {
178178 ];
179179}
180180
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-
191181def LinalgFillOpInterface : OpInterface<"FillOpInterface"> {
192182 let description = [{
193183 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"
2323include "mlir/Interfaces/SideEffectInterfaces.td"
2424include "mlir/Interfaces/InferTypeOpInterface.td"
2525include "mlir/Dialect/Linalg/IR/LinalgInterfaces.td"
26+ include "mlir/Dialect/Linalg/IR/LinalgRelayoutInterface.td"
2627include "mlir/IR/OpAsmInterface.td"
2728
2829//===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change 1010#include " mlir/Dialect/Arith/IR/Arith.h"
1111#include " mlir/Dialect/Arith/Utils/Utils.h"
1212#include " mlir/Dialect/Complex/IR/Complex.h"
13- #include " mlir/Dialect/Linalg/IR/Linalg.h "
13+ #include " mlir/Dialect/Linalg/IR/LinalgRelayoutInterface.h.inc "
1414#include " mlir/Dialect/Tensor/IR/Tensor.h"
1515#include " mlir/Dialect/Tensor/Utils/Utils.h"
1616#include " mlir/Dialect/Utils/IndexingUtils.h"
You can’t perform that action at this time.
0 commit comments