Enzyme main
Loading...
Searching...
No Matches
CFAutoDiffOpInterfaceImpl.cpp
Go to the documentation of this file.
1//===- SCFAutoDiffOpInterfaceImpl.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 SCF dialect.
11//
12//===----------------------------------------------------------------------===//
13
20#include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"
21#include "mlir/IR/DialectRegistry.h"
22#include "mlir/IR/Types.h"
23#include "mlir/Interfaces/ControlFlowInterfaces.h"
24#include "mlir/Support/LogicalResult.h"
25#include "llvm/ADT/DenseSet.h"
26#include "llvm/ADT/STLExtras.h"
27#include <functional>
28
29using namespace mlir;
30using namespace mlir::enzyme;
31
32namespace {
33#include "Implementations/CFDerivatives.inc"
34} // namespace
35
37 DialectRegistry &registry) {
38 registry.addExtension(+[](MLIRContext *context, cf::ControlFlowDialect *) {
39 registerInterfaces(context);
40 });
41}
void registerCFDialectAutoDiffInterface(DialectRegistry &registry)