MLIR
20.0.0git
lib
Dialect
Func
Extensions
MeshShardingExtensions.cpp
Go to the documentation of this file.
1
//===- MeshShardingExtensions.cpp - ---------------------------------------===//
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/Func/Extensions/MeshShardingExtensions.h
"
10
#include "
mlir/Dialect/Func/IR/FuncOps.h
"
11
#include "
mlir/Dialect/Mesh/Interfaces/ShardingInterfaceImpl.h
"
12
#include "
mlir/IR/MLIRContext.h
"
13
14
namespace
mlir::func
{
15
16
void
registerShardingInterfaceExternalModels
(
DialectRegistry
®istry) {
17
registry.
addExtension
(+[](
MLIRContext
*ctx, FuncDialect *dialect) {
18
ReturnOp::attachInterface<
19
mesh::IndependentParallelIteratorDomainShardingInterface<ReturnOp>
>(
20
*ctx);
21
});
22
}
23
24
}
// namespace mlir::func
FuncOps.h
MeshShardingExtensions.h
MLIRContext.h
ShardingInterfaceImpl.h
mlir::DialectRegistry
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
Definition:
DialectRegistry.h:139
mlir::DialectRegistry::addExtension
bool addExtension(TypeID extensionID, std::unique_ptr< DialectExtensionBase > extension)
Add the given extension to the registry.
Definition:
DialectRegistry.h:211
mlir::MLIRContext
MLIRContext is the top-level object for a collection of MLIR operations.
Definition:
MLIRContext.h:60
mlir::func
Definition:
LoopUtils.h:30
mlir::func::registerShardingInterfaceExternalModels
void registerShardingInterfaceExternalModels(DialectRegistry ®istry)
Definition:
MeshShardingExtensions.cpp:16
mlir::mesh::IndependentParallelIteratorDomainShardingInterface
Definition:
ShardingInterfaceImpl.h:58
Generated on Sat Nov 23 2024 08:31:54 for MLIR by
1.9.1