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:: ...@@ -74,10 +74,6 @@ shared_ptr<runtime::Backend> runtime::BackendManager::create_backend(const std::
runtime::interpreter::static_initialize(); runtime::interpreter::static_initialize();
#endif #endif
#ifdef NGRAPH_CPU_STATIC_LIB_ENABLE
runtime::cpu::static_initialize();
#endif
shared_ptr<runtime::Backend> backend; shared_ptr<runtime::Backend> backend;
string type = config; string type = config;
......
...@@ -58,29 +58,17 @@ extern "C" runtime::BackendConstructor* get_backend_constructor_pointer() ...@@ -58,29 +58,17 @@ extern "C" runtime::BackendConstructor* get_backend_constructor_pointer()
} }
#endif #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 namespace
{ {
#ifndef NGRAPH_CPU_STATIC_LIB_ENABLE
static class CPUStaticInit static class CPUStaticInit
{ {
public: public:
CPUStaticInit() CPUStaticInit()
{ {
runtime::BackendManager::register_backend("CPU", get_backend_constructor_pointer()); runtime::BackendManager::register_backend("CPU", runtime::cpu::get_backend_constructor_pointer());
} }
~CPUStaticInit() {} ~CPUStaticInit() {}
} s_cpu_static_init; } s_cpu_static_init;
#endif
} }
runtime::cpu::CPU_Backend::~CPU_Backend() 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