Go to the documentation of this file.
136 #define NNVM_REGISTER_PASS(name) \
137 DMLC_REGISTRY_REGISTER(::nnvm::PassFunctionReg, PassFunctionReg, name)
141 #endif // NNVM_PASS_H_
Common base class for function registry.
Definition: registry.h:151
Graph ApplyPasses(Graph src, const std::vector< std::string > &passes)
Apply a series of pass transformations on the input graph.
PassFunctionReg & depend_graph_attr(const std::string &attr_name)
Declare this pass requires the given graph attribute to be available before being applied on the grap...
Definition: pass.h:114
Symbolic computation graph. This is the intermediate representation for optimization pass.
Definition: graph.h:47
std::vector< std::string > graph_attr_dependency
dependencies on attributes in the graph
Definition: pass.h:76
PassFunctionReg & provide_graph_attr(const std::string &attr_name)
Declare that this pass will generate the given graph attribute name once it is applied on the graph.
Definition: pass.h:94
bool change_graph
Whether the pass will change graph structure If this is false, the pass will only change attributes.
Definition: pass.h:72
Configuration of nnvm as well as basic data structure.
PassFunctionReg & set_change_graph(bool v)
Set whether this pass will change graph structure.
Definition: pass.h:84
PassFunctionReg & depend_op_attr(const std::string &attr_name)
Declare this pass requires the given operator attribute to be available before being applied on the g...
Definition: pass.h:104
Graph ApplyPass(Graph src, const std::string &pass)
Apply one pass to the graph.
Definition: pass.h:62
std::vector< std::string > graph_attr_targets
generated targets of graph attributes
Definition: pass.h:78
Registry entry for pass functions.
Definition: pass.h:67
std::function< Graph(Graph src)> PassFunction
A PassFunction is an "Operator on Graph". It takes a source graph and return a graph that may or may ...
Definition: pass.h:46
Configuation of nnvm as well as basic data structure.
std::vector< std::string > op_attr_dependency
dependencies on operator attributes
Definition: pass.h:74