25 lines · cpp
1//===- ShardingExtensions.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-exception6//7//===----------------------------------------------------------------------===//8 9#include "mlir/Dialect/Func/Extensions/ShardingExtensions.h"10#include "mlir/Dialect/Func/IR/FuncOps.h"11#include "mlir/Dialect/Shard/Interfaces/ShardingInterfaceImpl.h"12#include "mlir/IR/MLIRContext.h"13 14namespace mlir::func {15 16void registerShardingInterfaceExternalModels(DialectRegistry ®istry) {17 registry.addExtension(+[](MLIRContext *ctx, FuncDialect *dialect) {18 ReturnOp::attachInterface<19 shard::IndependentParallelIteratorDomainShardingInterface<ReturnOp>>(20 *ctx);21 });22}23 24} // namespace mlir::func25