3 #include "caffe2/core/common.h" 4 #include "caffe2/core/graph.h" 5 #include "caffe2/core/workspace.h" 6 #include "caffe2/proto/caffe2.pb.h" 7 #include "caffe2/utils/proto_utils.h" 42 NetDef
ApplyTo(
const NetDef& orig_net_def);
72 SORTED_WRT_EXECUTION_ORDER,
88 const std::vector<std::vector<int>>& matches,
98 const std::vector<int>& subgraph,
100 CAFFE_NOT_IMPLEMENTED;
109 const std::vector<int>& subgraph) {
110 CAFFE_NOT_IMPLEMENTED;
118 const std::vector<int>& subgraph,
120 CAFFE_NOT_IMPLEMENTED;
124 pattern_match_type_ = type;
132 void PatternMatchHelper(
134 const std::vector<bool>& matched,
135 std::vector<int>* subgraph_ptr,
136 std::vector<int>* best_subgraph_ptr);
142 const std::map<
int, std::vector<string>>& neighbors,
143 const std::vector<bool>& matched,
144 std::vector<int>* subgraph_ptr,
145 std::vector<int>* best_subgraph_ptr);
151 unique_ptr<Transform> CreateTransform(
string key);
153 CAFFE_DECLARE_REGISTRY(TransformRegistry,
Transform);
154 #define REGISTER_TRANSFORM(name, ...) \ 155 CAFFE_REGISTER_CLASS(TransformRegistry, name, __VA_ARGS__) 159 NetDef ApplyTransform(
const string& key,
const NetDef& netdef);
166 NetDef ApplyTransformIfFaster(
168 const NetDef& netdef,
169 const NetDef& init_netdef,
170 const int warmup_runs,
172 const double improvement_threshold);
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...