#include "RemovalUtils.h"
#include "Interfaces/AutoDiffOpInterface.h"
#include "Interfaces/AutoDiffTypeInterface.h"
#include "Interfaces/GradientUtilsReverse.h"
#include "Utils.h"
#include "mlir/Analysis/TopologicalSortUtils.h"
#include "mlir/IR/PatternMatch.h"
#include <cassert>
#include <deque>
#include "llvm/ADT/MapVector.h"
Go to the source code of this file.
|
| typedef llvm::PointerUnion< Operation *, Value > | Node |
| |
|
| static llvm::cl::opt< bool > | DebugGraphviz ("mincut-print-graphviz", llvm::cl::init(false), llvm::cl::Hidden, llvm::cl::desc("Use with DEBUG_TYPE 'enzyme-mincut' to print " "the mincut graphs in GraphViz")) |
| |
| void | dump (const Node &n) |
| |
| static void | dumpGraphviz (Graph &G) |
| |
| static void | dump (Graph &G) |
| |
| static void | bfs (const Graph &G, const llvm::SetVector< Value > &Sources, DenseMap< Node, Node > &parent) |
| |
| static bool | isMovable (Operation *op) |
| |
| template<typename T > |
| static Graph | filterGraph (const Graph &Orig, const SetVector< Value > &Roots, const SetVector< T > &Required) |
| |
| static int64_t | computeSizeOfType (Value val) |
| |
| static int64_t | computeRankOfType (Value val) |
| |
| static Operation * | findCommonAncestor (ArrayRef< Operation * > ops) |
| | Find a common IsolatedFromAbove ancestor of the given ops.
|
| |
| static void | annotate_ops (Block *forward, Block *reverse) |
| |
◆ DEBUG_TYPE
| #define DEBUG_TYPE "enzyme-mincut" |
◆ Node
| typedef llvm::PointerUnion<Operation *, Value> Node |
◆ annotate_ops()
| static void annotate_ops |
( |
Block * | forward, |
|
|
Block * | reverse ) |
|
static |
◆ bfs()
| static void bfs |
( |
const Graph & | G, |
|
|
const llvm::SetVector< Value > & | Sources, |
|
|
DenseMap< Node, Node > & | parent ) |
|
inlinestatic |
◆ computeRankOfType()
| static int64_t computeRankOfType |
( |
Value | val | ) |
|
|
static |
◆ computeSizeOfType()
| static int64_t computeSizeOfType |
( |
Value | val | ) |
|
|
static |
◆ DebugGraphviz()
| static llvm::cl::opt< bool > DebugGraphviz |
( |
"mincut-print-graphviz" | , |
|
|
llvm::cl::init(false) | , |
|
|
llvm::cl::Hidden | , |
|
|
llvm::cl::desc("Use with DEBUG_TYPE 'enzyme-mincut' to print " "the mincut graphs in GraphViz") | ) |
|
static |
◆ dump() [1/2]
| void dump |
( |
const Node & | n | ) |
|
◆ dump() [2/2]
| static void dump |
( |
Graph & | G | ) |
|
|
static |
◆ dumpGraphviz()
| static void dumpGraphviz |
( |
Graph & | G | ) |
|
|
static |
◆ filterGraph()
template<typename T >
| static Graph filterGraph |
( |
const Graph & | Orig, |
|
|
const SetVector< Value > & | Roots, |
|
|
const SetVector< T > & | Required ) |
|
static |
◆ findCommonAncestor()
| static Operation * findCommonAncestor |
( |
ArrayRef< Operation * > | ops | ) |
|
|
static |
Find a common IsolatedFromAbove ancestor of the given ops.
If at least one op is a top-level module op (which is expected to be isolated from above), return that op.
Definition at line 372 of file RemovalUtils.cpp.
Referenced by mlir::enzyme::minCutCache().
◆ isMovable()
| static bool isMovable |
( |
Operation * | op | ) |
|
|
inlinestatic |