1 #ifndef CAFFE2_OPT_OPT_PASSS_H 2 #define CAFFE2_OPT_OPT_PASSS_H 4 #include "caffe2/core/common.h" 5 #include "caffe2/core/workspace.h" 6 #include "caffe2/proto/caffe2_pb.h" 8 #include "nomnigraph/Representations/NeuralNet.h" 27 virtual void run() = 0;
44 WorkspaceOptimizationPassRegistry,
48 #define REGISTER_WS_OPT_PASS(clsname) \ 49 C10_REGISTER_CLASS(WorkspaceOptimizationPassRegistry, clsname, clsname) 50 #define REGISTER_WS_OPT_PASS_FROM_FUNC(passname, funcname) \ 51 class passname : public WorkspaceOptimizationPass { \ 53 using WorkspaceOptimizationPass::WorkspaceOptimizationPass; \ 54 void run() override { \ 58 REGISTER_WS_OPT_PASS(passname); 61 #define REGISTER_OPT_PASS(clsname) \ 62 C10_REGISTER_CLASS(OptimizationPassRegistry, clsname, clsname) 63 #define REGISTER_OPT_PASS_FROM_FUNC(passname, funcname) \ 64 class passname : public OptimizationPass { \ 66 using OptimizationPass::OptimizationPass; \ 67 void run() override { \ 71 REGISTER_OPT_PASS(passname); 75 #endif // CAFFE2_OPT_OPT_PASSS_H
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...