Enzyme main
Loading...
Searching...
No Matches
MathAutoDiffOpInterfaceImpl.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/Dialect/Arith/IR/Arith.h"
19#include "mlir/Dialect/Complex/IR/Complex.h"
20#include "mlir/Dialect/Math/IR/Math.h"
21#include "mlir/IR/DialectRegistry.h"
22#include "mlir/Support/LogicalResult.h"
23
24#include "Dialect/Ops.h"
25#include "mlir/IR/TypeSupport.h"
26
27using namespace mlir;
28using namespace mlir::enzyme;
29
30namespace {
31#include "Implementations/MathDerivatives.inc"
32} // namespace
33
35 DialectRegistry &registry) {
36 registry.addExtension(+[](MLIRContext *context, math::MathDialect *) {
37 registerInterfaces(context);
38 });
39}
void registerMathDialectAutoDiffInterface(DialectRegistry &registry)