Commit 09214c71 authored by pruthvi's avatar pruthvi

- use static_initilize to explicitly regreister the backend for cpu

parent 3e976292
......@@ -74,6 +74,10 @@ shared_ptr<runtime::Backend> runtime::BackendManager::create_backend(const std::
runtime::interpreter::static_initialize();
#endif
#ifdef NGRAPH_CPU_STATIC_LIB_ENABLE
runtime::cpu::static_initialize();
#endif
shared_ptr<runtime::Backend> backend;
string type = config;
......
......@@ -58,6 +58,16 @@ extern "C" runtime::BackendConstructor* get_backend_constructor_pointer()
}
#endif
void runtime::cpu::static_initialize()
{
static bool s_is_initialized = false;
if (!s_is_initialized)
{
s_is_initialized = true;
BackendManager::register_backend("CPU", runtime::cpu::get_backend_constructor_pointer());
}
}
namespace
{
static class CPUStaticInit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment