Commit 3191696b authored by pruthvi's avatar pruthvi

remove static_initilize from cpu

parent 5e637637
......@@ -74,10 +74,6 @@ 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,29 +58,17 @@ 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
{
#ifndef NGRAPH_CPU_STATIC_LIB_ENABLE
static class CPUStaticInit
{
public:
CPUStaticInit()
{
runtime::BackendManager::register_backend("CPU", get_backend_constructor_pointer());
runtime::BackendManager::register_backend("CPU", runtime::cpu::get_backend_constructor_pointer());
}
~CPUStaticInit() {}
} s_cpu_static_init;
#endif
}
runtime::cpu::CPU_Backend::~CPU_Backend()
......
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