Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
09214c71
Commit
09214c71
authored
Jul 31, 2019
by
pruthvi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- use static_initilize to explicitly regreister the backend for cpu
parent
3e976292
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
backend_manager.cpp
src/ngraph/runtime/backend_manager.cpp
+4
-0
cpu_backend.cpp
src/ngraph/runtime/cpu/cpu_backend.cpp
+10
-0
No files found.
src/ngraph/runtime/backend_manager.cpp
View file @
09214c71
...
...
@@ -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
;
...
...
src/ngraph/runtime/cpu/cpu_backend.cpp
View file @
09214c71
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment