Enzyme
main
Loading...
Searching...
No Matches
MLIR
Implementations
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
14
#include "
Implementations/CoreDialectsAutoDiffImplementations.h
"
15
#include "
Interfaces/AutoDiffOpInterface.h
"
16
#include "
Interfaces/AutoDiffTypeInterface.h
"
17
#include "
Interfaces/EnzymeLogic.h
"
18
#include "
Interfaces/GradientUtils.h
"
19
#include "
Interfaces/GradientUtilsReverse.h
"
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
29
using namespace
mlir
;
30
using namespace
mlir::enzyme
;
31
32
namespace
{
33
#include "Implementations/CFDerivatives.inc"
34
}
// namespace
35
36
void
mlir::enzyme::registerCFDialectAutoDiffInterface
(
37
DialectRegistry ®istry) {
38
registry.addExtension(+[](MLIRContext *context, cf::ControlFlowDialect *) {
39
registerInterfaces(context);
40
});
41
}
AutoDiffOpInterface.h
AutoDiffTypeInterface.h
CoreDialectsAutoDiffImplementations.h
GradientUtilsReverse.h
EnzymeLogic.h
GradientUtils.h
mlir::enzyme
Definition
ActivityAnalysis.h:12
mlir::enzyme::registerCFDialectAutoDiffInterface
void registerCFDialectAutoDiffInterface(DialectRegistry ®istry)
Definition
CFAutoDiffOpInterfaceImpl.cpp:36
mlir
Definition
ActivityAnalysis.h:7
Generated on Fri May 8 2026 19:56:25 for Enzyme by
1.12.0