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
4d62a0f3
Commit
4d62a0f3
authored
Jun 20, 2019
by
Robert Kimball
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interpreter working
parent
2204a054
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
80 deletions
+18
-80
backend_manager.cpp
src/ngraph/runtime/backend_manager.cpp
+0
-22
CMakeLists.txt
src/ngraph/runtime/cpu/CMakeLists.txt
+1
-5
cpu_backend.cpp
src/ngraph/runtime/cpu/cpu_backend.cpp
+10
-17
static_initialize.hpp
src/ngraph/runtime/cpu/static_initialize.hpp
+0
-28
int_backend.cpp
src/ngraph/runtime/interpreter/int_backend.cpp
+7
-8
No files found.
src/ngraph/runtime/backend_manager.cpp
View file @
4d62a0f3
...
...
@@ -25,7 +25,6 @@
#include "ngraph/file_util.hpp"
#include "ngraph/runtime/backend.hpp"
#include "ngraph/runtime/backend_manager.hpp"
#include "ngraph/runtime/cpu/static_initialize.hpp"
#include "ngraph/runtime/interpreter/static_initialize.hpp"
#include "ngraph/util.hpp"
...
...
@@ -50,27 +49,6 @@ unordered_map<string, runtime::BackendConstructor*>& runtime::BackendManager::ge
#ifdef INTERPRETER_BACKEND_STATIC
runtime
::
interpreter
::
static_initialize
();
#endif
// #ifdef CPU_BACKEND_STATIC
// runtime::cpu::static_initialize();
// #endif
// #ifdef INTELGPU_BACKEND_STATIC
// runtime::intelgpu::static_initialize();
// #endif
// #ifdef GPU_BACKEND_STATIC
// runtime::gpu::static_initialize();
// #endif
// #ifdef NOP_BACKEND_STATIC
// runtime::nop::static_initialize();
// #endif
// #ifdef GPUH_BACKEND_STATIC
// runtime::gpuh::static_initialize();
// #endif
// #ifdef GENERIC_CPU_BACKEND_STATIC
// runtime::cpu::static_initialize();
// #endif
// #ifdef PLAIDML_BACKEND_STATIC
// runtime::plaidml::static_initialize();
// #endif
}
return
s_registered_backend
;
}
...
...
src/ngraph/runtime/cpu/CMakeLists.txt
View file @
4d62a0f3
...
...
@@ -150,11 +150,7 @@ endif()
if
(
NGRAPH_CPU_ENABLE
)
set
(
NGRAPH_CPU_DEBUGINFO_ENABLE 0 CACHE STRING
"Enable debuginfo in the CPU backend"
)
# if (NGRAPH_STATIC_LIB_ENABLE)
# add_library(cpu_backend STATIC ${SRC})
# else()
add_library
(
cpu_backend SHARED
${
SRC
}
)
# endif()
add_library
(
cpu_backend SHARED
${
SRC
}
)
if
(
NGRAPH_LIB_VERSIONING_ENABLE
)
set_target_properties
(
cpu_backend PROPERTIES
VERSION
${
NGRAPH_VERSION
}
...
...
src/ngraph/runtime/cpu/cpu_backend.cpp
View file @
4d62a0f3
...
...
@@ -23,13 +23,12 @@
#include "ngraph/runtime/cpu/cpu_call_frame.hpp"
#include "ngraph/runtime/cpu/cpu_external_function.hpp"
#include "ngraph/runtime/cpu/cpu_tensor_view.hpp"
#include "ngraph/runtime/cpu/static_initialize.hpp"
#include "ngraph/util.hpp"
using
namespace
ngraph
;
using
namespace
std
;
static
runtime
::
BackendConstructor
*
cpu_
get_backend_constructor_pointer
()
extern
"C"
runtime
::
BackendConstructor
*
get_backend_constructor_pointer
()
{
class
CPU_BackendConstructor
:
public
runtime
::
BackendConstructor
{
...
...
@@ -37,7 +36,6 @@ static runtime::BackendConstructor* cpu_get_backend_constructor_pointer()
std
::
shared_ptr
<
runtime
::
Backend
>
create
(
const
std
::
string
&
config
)
override
{
// Force TBB to link to the backend
NGRAPH_INFO
;
tbb
::
TBB_runtime_interface_version
();
return
make_shared
<
runtime
::
cpu
::
CPU_Backend
>
();
}
...
...
@@ -48,22 +46,17 @@ static runtime::BackendConstructor* cpu_get_backend_constructor_pointer()
return
s_backend_constructor
.
get
();
}
#ifndef CPU_BACKEND_STATIC
extern
"C"
runtime
::
BackendConstructor
*
get_backend_constructor_pointer
()
{
return
cpu_get_backend_constructor_pointer
();
}
#endif
void
runtime
::
cpu
::
static_initialize
()
namespace
{
NGRAPH_INFO
;
static
bool
s_is_initialized
=
false
;
if
(
!
s_is_initialized
)
static
class
CPUStaticInit
{
s_is_initialized
=
true
;
runtime
::
BackendManager
::
register_backend
(
"CPU"
,
cpu_get_backend_constructor_pointer
());
}
public
:
CPUStaticInit
()
{
runtime
::
BackendManager
::
register_backend
(
"CPU"
,
get_backend_constructor_pointer
());
}
~
CPUStaticInit
()
{}
}
s_cpu_static_init
;
}
shared_ptr
<
runtime
::
cpu
::
CPU_CallFrame
>
runtime
::
cpu
::
CPU_Backend
::
make_call_frame
(
...
...
src/ngraph/runtime/cpu/static_initialize.hpp
deleted
100644 → 0
View file @
2204a054
//*****************************************************************************
// Copyright 2017-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#pragma once
namespace
ngraph
{
namespace
runtime
{
namespace
cpu
{
void
static_initialize
();
}
}
}
src/ngraph/runtime/interpreter/int_backend.cpp
View file @
4d62a0f3
...
...
@@ -27,8 +27,7 @@
using
namespace
std
;
using
namespace
ngraph
;
static
runtime
::
BackendConstructor
*
interpreter_get_backend_constructor_pointer
()
static
runtime
::
BackendConstructor
*
interpreter_get_backend_constructor_pointer
()
{
class
INTBackendConstructor
:
public
runtime
::
BackendConstructor
{
...
...
@@ -45,11 +44,10 @@ static runtime::BackendConstructor*
}
#ifdef INTERPRETER_BACKEND_STATIC
extern
"C"
runtime
::
BackendConstructor
*
get_backend_constructor_pointer
()
{
return
interpreter_get_backend_constructor_pointer
();
}
extern
"C"
runtime
::
BackendConstructor
*
get_backend_constructor_pointer
()
{
return
interpreter_get_backend_constructor_pointer
();
}
#endif
void
runtime
::
interpreter
::
static_initialize
()
...
...
@@ -58,7 +56,8 @@ void runtime::interpreter::static_initialize()
if
(
!
s_is_initialized
)
{
s_is_initialized
=
true
;
BackendManager
::
register_backend
(
"INTERPRETER"
,
get_backend_constructor_pointer
());
BackendManager
::
register_backend
(
"INTERPRETER"
,
interpreter_get_backend_constructor_pointer
());
}
}
...
...
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