Enzyme main
Loading...
Searching...
No Matches
EnzymeAutoDiffOpInterfaceImpl.cpp
Go to the documentation of this file.
1//===- ArithAutoDiffOpInterfaceImpl.cpp - Interface external model --------===//
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 contains the external model implementation of the automatic
10// differentiation op interfaces for the upstream MLIR arithmetic dialect.
11//
12//===----------------------------------------------------------------------===//
13
18#include "mlir/IR/DialectRegistry.h"
19#include "mlir/Support/LogicalResult.h"
20
21#include "Dialect/Dialect.h"
22#include "Dialect/Ops.h"
23#include "mlir/IR/TypeSupport.h"
24
25using namespace mlir;
26using namespace mlir::enzyme;
27
28namespace {
29#include "Implementations/EnzymeDerivatives.inc"
30} // namespace
31
33 DialectRegistry &registry) {
34 registry.addExtension(+[](MLIRContext *context, enzyme::EnzymeDialect *) {
35 registerInterfaces(context);
36 });
37}
void registerEnzymeDialectAutoDiffInterface(DialectRegistry &registry)