Enzyme main
Loading...
Searching...
No Matches
DataFlowActivityAnalysis.h
Go to the documentation of this file.
1//===- DataFlowActivityAnalysis.h - Declaration of Activity Analysis ------===//
2//
3// Enzyme Project
4//
5// Part of the Enzyme Project, under the Apache License v2.0 with LLVM
6// Exceptions. See https://llvm.org/LICENSE.txt for license information.
7// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8//
9// If using this code in an academic setting, please cite the following:
10// @incollection{enzymeNeurips,
11// title = {Instead of Rewriting Foreign Code for Machine Learning,
12// Automatically Synthesize Fast Gradients},
13// author = {Moses, William S. and Churavy, Valentin},
14// booktitle = {Advances in Neural Information Processing Systems 33},
15// year = {2020},
16// note = {To appear in},
17// }
18//
19//===----------------------------------------------------------------------===//
20//
21// This file contains the declaration of Activity Analysis -- an AD-specific
22// analysis that deduces if a given instruction or value can impact the
23// calculation of a derivative. This file formulates activity analysis within
24// a dataflow framework.
25//
26//===----------------------------------------------------------------------===//
27#ifndef ENZYME_MLIR_ANALYSIS_DATAFLOW_ACTIVITYANALYSIS_H
28#define ENZYME_MLIR_ANALYSIS_DATAFLOW_ACTIVITYANALYSIS_H
29
30#include "mlir/IR/Block.h"
31
32namespace mlir {
33class FunctionOpInterface;
34
35namespace enzyme {
36
37enum class Activity : uint32_t;
38
39void runDataFlowActivityAnalysis(FunctionOpInterface callee,
40 ArrayRef<enzyme::Activity> argumentActivity,
41 bool print = false, bool verbose = false,
42 bool annotate = false);
43
44} // namespace enzyme
45} // namespace mlir
46
47#endif
void runDataFlowActivityAnalysis(FunctionOpInterface callee, ArrayRef< enzyme::Activity > argumentActivity, bool print=false, bool verbose=false, bool annotate=false)