MLIR  19.0.0git
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 
12 #include "mlir/IR/MLIRContext.h"
13 
14 namespace mlir::func {
15 
17  registry.addExtension(+[](MLIRContext *ctx, FuncDialect *dialect) {
18  ReturnOp::attachInterface<
20  *ctx);
21  });
22 }
23 
24 } // namespace mlir::func
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
void addExtension(std::unique_ptr< DialectExtensionBase > extension)
Add the given extension to the registry.
MLIRContext is the top-level object for a collection of MLIR operations.
Definition: MLIRContext.h:60
void registerShardingInterfaceExternalModels(DialectRegistry &registry)