File tree Expand file tree Collapse file tree 12 files changed +101
-5
lines changed Expand file tree Collapse file tree 12 files changed +101
-5
lines changed Original file line number Diff line number Diff line change 1
- // ===- ShardingInterfaceImpl .h - - -----------------------------------------===//
1
+ // ===- MeshShardingExtensions .h - -----------------------------------------===//
2
2
//
3
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
4
// See https://llvm.org/LICENSE.txt for license information.
Original file line number Diff line number Diff line change
1
+ // ===- AllExtensions.h - All Tensor Extensions ------------------*- 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
+ // This file defines a common entry point for registering all extensions to the
10
+ // Tensor dialect.
11
+ //
12
+ // ===----------------------------------------------------------------------===//
13
+
14
+ #ifndef MLIR_DIALECT_TENSOR_EXTENSIONS_ALLEXTENSIONS_H
15
+ #define MLIR_DIALECT_TENSOR_EXTENSIONS_ALLEXTENSIONS_H
16
+
17
+ namespace mlir {
18
+ class DialectRegistry ;
19
+
20
+ namespace tensor {
21
+ // / Register all extensions of the Tensor dialect. This should generally only be
22
+ // / used by tools, or other use cases that really do want *all* extensions of
23
+ // / the dialect. All other cases should prefer to instead register the specific
24
+ // / extensions they intend to take advantage of.
25
+ void registerAllExtensions (DialectRegistry ®istry);
26
+ } // namespace tensor
27
+
28
+ } // namespace mlir
29
+
30
+ #endif // MLIR_DIALECT_TENSOR_EXTENSIONS_ALLEXTENSIONS_H
Original file line number Diff line number Diff line change
1
+ // ===- MeshShardingExtensions.h - -------------------------------*- 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_TENSOR_EXTENSIONS_SHARDINGEXTENSIONS_H_
10
+ #define MLIR_DIALECT_TENSOR_EXTENSIONS_SHARDINGEXTENSIONS_H_
11
+
12
+ namespace mlir {
13
+
14
+ class DialectRegistry ;
15
+
16
+ namespace tensor {
17
+
18
+ void registerShardingInterfaceExternalModels (DialectRegistry ®istry);
19
+
20
+ } // namespace tensor
21
+ } // namespace mlir
22
+
23
+ #endif // MLIR_DIALECT_TENSOR_EXTENSIONS_SHARDINGEXTENSIONS_H_
File renamed without changes.
Original file line number Diff line number Diff line change 58
58
#include " mlir/Dialect/MemRef/Transforms/BufferViewFlowOpInterfaceImpl.h"
59
59
#include " mlir/Dialect/MemRef/Transforms/RuntimeOpVerification.h"
60
60
#include " mlir/Dialect/Mesh/IR/MeshDialect.h"
61
- #include " mlir/Dialect/Mesh/IR/TensorShardingInterfaceImpl.h"
62
61
#include " mlir/Dialect/NVGPU/IR/NVGPUDialect.h"
63
62
#include " mlir/Dialect/OpenACC/OpenACC.h"
64
63
#include " mlir/Dialect/OpenMP/OpenMPDialect.h"
@@ -182,7 +181,6 @@ inline void registerAllDialects(DialectRegistry ®istry) {
182
181
tensor::registerBufferizableOpInterfaceExternalModels (registry);
183
182
tensor::registerFindPayloadReplacementOpInterfaceExternalModels (registry);
184
183
tensor::registerInferTypeOpInterfaceExternalModels (registry);
185
- tensor::registerShardingInterfaceExternalModels (registry);
186
184
tensor::registerSubsetOpInterfaceExternalModels (registry);
187
185
tensor::registerTilingInterfaceExternalModels (registry);
188
186
tensor::registerValueBoundsOpInterfaceExternalModels (registry);
Original file line number Diff line number Diff line change 34
34
#include " mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.h"
35
35
#include " mlir/Dialect/SCF/TransformOps/SCFTransformOps.h"
36
36
#include " mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.h"
37
+ #include " mlir/Dialect/Tensor/Extensions/AllExtensions.h"
37
38
#include " mlir/Dialect/Tensor/TransformOps/TensorTransformOps.h"
38
39
#include " mlir/Dialect/Transform/DebugExtension/DebugExtension.h"
39
40
#include " mlir/Dialect/Transform/IRDLExtension/IRDLExtension.h"
@@ -60,6 +61,7 @@ inline void registerAllExtensions(DialectRegistry ®istry) {
60
61
registerConvertComplexToLLVMInterface (registry);
61
62
cf::registerConvertControlFlowToLLVMInterface (registry);
62
63
func::registerAllExtensions (registry);
64
+ tensor::registerAllExtensions (registry);
63
65
registerConvertFuncToLLVMInterface (registry);
64
66
index::registerConvertIndexToLLVMInterface (registry);
65
67
registerConvertMathToLLVMInterface (registry);
Original file line number Diff line number Diff line change 1
1
add_mlir_library (MLIRShardingInterface
2
2
ShardingInterface.cpp
3
- TensorShardingInterfaceImpl.cpp
4
3
5
4
ADDITIONAL_HEADER_DIRS
6
5
${MLIR_MAIN_INCLUDE_DIR} /mlir/Dialect/Mesh
Original file line number Diff line number Diff line change
1
+ add_subdirectory (Extensions )
1
2
add_subdirectory (IR )
2
3
add_subdirectory (Transforms )
3
4
add_subdirectory (TransformOps )
Original file line number Diff line number Diff line change
1
+ // ===- AllExtensions.cpp - All Tensor Dialect Extensions ------------------===//
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
+ #include " mlir/Dialect/Tensor/Extensions/AllExtensions.h"
10
+ #include " mlir/Dialect/Tensor/Extensions/MeshShardingExtensions.h"
11
+
12
+ using namespace mlir ;
13
+
14
+ void mlir::tensor::registerAllExtensions (DialectRegistry ®istry) {
15
+ registerShardingInterfaceExternalModels (registry);
16
+ }
Original file line number Diff line number Diff line change
1
+ set (LLVM_OPTIONAL_SOURCES
2
+ AllExtensions.cpp
3
+ MeshShardingExtensions.cpp
4
+ )
5
+
6
+ add_mlir_extension_library (MLIRTensorMeshShardingExtensions
7
+ MeshShardingExtensions.cpp
8
+
9
+ ADDITIONAL_HEADER_DIRS
10
+ ${MLIR_MAIN_INCLUDE_DIR} /mlir/Dialect/Tensor/Extensions
11
+
12
+ LINK_LIBS PUBLIC
13
+ MLIRTensorDialect
14
+ MLIRIR
15
+ MLIRShardingInterface
16
+ )
17
+
18
+ add_mlir_extension_library (MLIRTensorAllExtensions
19
+ AllExtensions.cpp
20
+
21
+ ADDITIONAL_HEADER_DIRS
22
+ ${MLIR_MAIN_INCLUDE_DIR} /mlir/Dialect/Tensor/Extensions
23
+
24
+ LINK_LIBS PUBLIC
25
+ MLIRTensorMeshShardingExtensions
26
+ )
Original file line number Diff line number Diff line change 6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- #include " mlir/Dialect/Mesh/IR/TensorShardingInterfaceImpl.h"
10
9
#include " mlir/Dialect/Mesh/Interfaces/ShardingInterface.h"
11
10
#include " mlir/Dialect/Mesh/Interfaces/ShardingInterfaceImpl.h"
11
+ #include " mlir/Dialect/Tensor/IR/ShardingInterfaceImpl.h"
12
12
#include " mlir/Dialect/Tensor/IR/Tensor.h"
13
13
#include " mlir/IR/DialectRegistry.h"
14
14
#include " llvm/Support/Debug.h"
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ set(LIBS
47
47
MLIRLspServerLib
48
48
MLIRParser
49
49
MLIRPass
50
+ MLIRTensorAllExtensions
50
51
MLIRTransforms
51
52
MLIRTransformUtils
52
53
MLIRSupport
You can’t perform that action at this time.
0 commit comments