Unverified Commit b31c8607 authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

make CPU backend auto-register (#1478)

parent 1f662004
......@@ -17,6 +17,7 @@
#include <tbb/tbb_stddef.h>
#include "ngraph/graph_util.hpp"
#include "ngraph/runtime/backend_manager.hpp"
#include "ngraph/runtime/cpu/cpu_backend.hpp"
#include "ngraph/runtime/cpu/cpu_call_frame.hpp"
#include "ngraph/runtime/cpu/cpu_external_function.hpp"
......@@ -43,6 +44,16 @@ extern "C" void delete_backend(runtime::Backend* backend)
delete backend;
}
namespace
{
static class CPUStaticInit
{
public:
CPUStaticInit() { runtime::BackendManager::register_backend("CPU", new_backend); }
~CPUStaticInit() {}
} s_cpu_static_init;
}
shared_ptr<runtime::cpu::CPU_CallFrame> runtime::cpu::CPU_Backend::make_call_frame(
const shared_ptr<runtime::cpu::CPU_ExternalFunction>& external_function)
{
......
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