6 #ifndef CAFFE2_CORE_MODULE_H_ 7 #define CAFFE2_CORE_MODULE_H_ 16 #include "caffe2/core/common.h" 17 #include <c10/util/typeid.h> 32 const char* description_;
48 CAFFE2_API
const CaffeMap<string, const ModuleSchema*>&
CurrentModules();
53 CAFFE2_API
bool HasModule(
const string& name);
63 CAFFE2_API
void LoadModule(
const string& name,
const string& filename=
"");
66 #define CAFFE2_MODULE(name, description) \ 68 bool gCaffe2ModuleSanityCheck##name() { return true; } \ 71 static ::caffe2::ModuleSchema module_schema_##name(#name, description); \ 75 #endif // CAFFE2_CORE_MODULE_H_ bool HasModule(const string &name)
Checks whether a module is already present in the current binary.
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
void LoadModule(const string &name, const string &filename)
Load a module.
const CaffeMap< string, const ModuleSchema * > & CurrentModules()
Current Modules present in the Caffe2 runtime.
A module schema that can be used to store specific information about different modules.