File tree Expand file tree Collapse file tree 4 files changed +14
-0
lines changed
utils/bazel/llvm-project-overlay/mlir Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,11 @@ class Dialect {
216
216
{TypeID::get<ConcreteT>(), InterfaceT::getInterfaceID ()});
217
217
}
218
218
219
+ template <typename InterfaceT, typename ... ConcreteT>
220
+ void declarePromisedInterfaces () {
221
+ (declarePromisedInterface<ConcreteT, InterfaceT>(), ...);
222
+ }
223
+
219
224
// / Checks if the given interface, which is attempting to be used, is a
220
225
// / promised interface of this dialect that has yet to be implemented. If so,
221
226
// / emits a fatal error. `interfaceName` is an optional string that contains a
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ add_mlir_dialect_library(MLIRLinalgDialect
25
25
MLIRInferTypeOpInterface
26
26
MLIRIR
27
27
MLIRParser
28
+ MLIRShardingInterface
28
29
MLIRSideEffectInterfaces
29
30
MLIRSparseTensorDialect
30
31
MLIRSCFDialect
Original file line number Diff line number Diff line change 16
16
#include " mlir/Dialect/Linalg/IR/Linalg.h"
17
17
#include " mlir/Dialect/Math/IR/Math.h"
18
18
#include " mlir/Dialect/MemRef/IR/MemRef.h"
19
+ #include " mlir/Dialect/Mesh/Interfaces/ShardingInterface.h"
19
20
#include " mlir/Dialect/Tensor/IR/Tensor.h"
20
21
#include " mlir/IR/BuiltinTypes.h"
21
22
#include " mlir/IR/Dialect.h"
@@ -118,6 +119,12 @@ void mlir::linalg::LinalgDialect::initialize() {
118
119
>(namedStructuredOpRegionBuilders);
119
120
120
121
addInterfaces<LinalgInlinerInterface>();
122
+
123
+ declarePromisedInterface<GenericOp, mesh::ShardingInterface>();
124
+ declarePromisedInterfaces<mesh::ShardingInterface,
125
+ #define GET_OP_LIST
126
+ #include " mlir/Dialect/Linalg/IR/LinalgStructuredOps.cpp.inc"
127
+ >();
121
128
}
122
129
123
130
LogicalResult LinalgDialect::verifyOperationAttribute (Operation *op,
Original file line number Diff line number Diff line change @@ -10840,6 +10840,7 @@ cc_library(
10840
10840
":MemRefDialect" ,
10841
10841
":Parser" ,
10842
10842
":SCFDialect" ,
10843
+ ":MeshShardingInterface" ,
10843
10844
":SideEffectInterfaces" ,
10844
10845
":SparseTensorDialect" ,
10845
10846
":Support" ,
You can’t perform that action at this time.
0 commit comments