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
be99cb7f
Commit
be99cb7f
authored
Jul 16, 2019
by
pruthvi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bob/static_backend_init' into pruthvi/cpu_static_backend
parents
824d6144
2688f37c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
148 additions
and
34 deletions
+148
-34
CMakeLists.txt
CMakeLists.txt
+5
-0
backend.cpp
src/ngraph/runtime/backend.cpp
+44
-2
backend.hpp
src/ngraph/runtime/backend.hpp
+14
-8
backend_manager.cpp
src/ngraph/runtime/backend_manager.cpp
+6
-22
CMakeLists.txt
src/ngraph/runtime/interpreter/CMakeLists.txt
+8
-1
int_backend.cpp
src/ngraph/runtime/interpreter/int_backend.cpp
+20
-1
int_backend.hpp
src/ngraph/runtime/interpreter/int_backend.hpp
+1
-0
static_initialize.hpp
src/ngraph/runtime/interpreter/static_initialize.hpp
+28
-0
nbench.cpp
src/tools/nbench/nbench.cpp
+11
-0
main.cpp
test/main.cpp
+11
-0
No files found.
CMakeLists.txt
View file @
be99cb7f
...
@@ -182,6 +182,7 @@ option(NGRAPH_DISTRIBUTED_ENABLE "Enable distributed training using MLSL/OpenMPI
...
@@ -182,6 +182,7 @@ option(NGRAPH_DISTRIBUTED_ENABLE "Enable distributed training using MLSL/OpenMPI
option
(
NGRAPH_FAST_MATH_ENABLE
"Enable fast math"
ON
)
option
(
NGRAPH_FAST_MATH_ENABLE
"Enable fast math"
ON
)
option
(
NGRAPH_JSON_ENABLE
"Enable JSON based serialization and tracing features"
TRUE
)
option
(
NGRAPH_JSON_ENABLE
"Enable JSON based serialization and tracing features"
TRUE
)
option
(
NGRAPH_STATIC_LIB_ENABLE
"Enable build nGraph static library"
FALSE
)
option
(
NGRAPH_STATIC_LIB_ENABLE
"Enable build nGraph static library"
FALSE
)
option
(
NGRAPH_INTERPRETER_STATIC_LIB_ENABLE
"Enable build INTERPRETER backend static library"
FALSE
)
if
(
NGRAPH_CPU_ENABLE
if
(
NGRAPH_CPU_ENABLE
AND
AND
...
@@ -257,6 +258,8 @@ NORMALIZE_BOOL(NGRAPH_PYTHON_BUILD_ENABLE)
...
@@ -257,6 +258,8 @@ NORMALIZE_BOOL(NGRAPH_PYTHON_BUILD_ENABLE)
NORMALIZE_BOOL
(
NGRAPH_USE_PREBUILT_LLVM
)
NORMALIZE_BOOL
(
NGRAPH_USE_PREBUILT_LLVM
)
NORMALIZE_BOOL
(
NGRAPH_PLAIDML_ENABLE
)
NORMALIZE_BOOL
(
NGRAPH_PLAIDML_ENABLE
)
NORMALIZE_BOOL
(
NGRAPH_JSON_ENABLE
)
NORMALIZE_BOOL
(
NGRAPH_JSON_ENABLE
)
NORMALIZE_BOOL
(
NGRAPH_STATIC_LIB_ENABLE
)
NORMALIZE_BOOL
(
NGRAPH_INTERPRETER_STATIC_LIB_ENABLE
)
message
(
STATUS
"NGRAPH_UNIT_TEST_ENABLE:
${
NGRAPH_UNIT_TEST_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_UNIT_TEST_ENABLE:
${
NGRAPH_UNIT_TEST_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_TOOLS_ENABLE:
${
NGRAPH_TOOLS_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_TOOLS_ENABLE:
${
NGRAPH_TOOLS_ENABLE
}
"
)
...
@@ -280,6 +283,8 @@ message(STATUS "NGRAPH_USE_PREBUILT_LLVM: ${NGRAPH_USE_PREBUILT_LLVM}")
...
@@ -280,6 +283,8 @@ message(STATUS "NGRAPH_USE_PREBUILT_LLVM: ${NGRAPH_USE_PREBUILT_LLVM}")
message
(
STATUS
"NGRAPH_PLAIDML_ENABLE:
${
NGRAPH_PLAIDML_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_PLAIDML_ENABLE:
${
NGRAPH_PLAIDML_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_DISTRIBUTED_ENABLE:
${
NGRAPH_DISTRIBUTED_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_DISTRIBUTED_ENABLE:
${
NGRAPH_DISTRIBUTED_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_JSON_ENABLE:
${
NGRAPH_JSON_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_JSON_ENABLE:
${
NGRAPH_JSON_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_STATIC_LIB_ENABLE:
${
NGRAPH_STATIC_LIB_ENABLE
}
"
)
message
(
STATUS
"NGRAPH_INTERPRETER_STATIC_LIB_ENABLE:
${
NGRAPH_INTERPRETER_STATIC_LIB_ENABLE
}
"
)
#-----------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
# Installation logic...
# Installation logic...
...
...
src/ngraph/runtime/backend.cpp
View file @
be99cb7f
...
@@ -14,6 +14,12 @@
...
@@ -14,6 +14,12 @@
// limitations under the License.
// limitations under the License.
//*****************************************************************************
//*****************************************************************************
#ifdef _WIN32
#include <windows.h>
#else
#include <dlfcn.h>
#endif
#include <sstream>
#include <sstream>
#include "ngraph/file_util.hpp"
#include "ngraph/file_util.hpp"
...
@@ -25,6 +31,28 @@
...
@@ -25,6 +31,28 @@
using
namespace
std
;
using
namespace
std
;
using
namespace
ngraph
;
using
namespace
ngraph
;
std
::
string
runtime
::
Backend
::
s_backend_shared_library_search_directory
;
// This finds the full path of the containing shared library
static
string
find_my_file
()
{
#ifdef _WIN32
HMODULE
hModule
=
GetModuleHandleW
(
L"ngraph.dll"
);
WCHAR
wpath
[
MAX_PATH
];
GetModuleFileNameW
(
hModule
,
wpath
,
MAX_PATH
);
wstring
ws
(
wpath
);
string
path
(
ws
.
begin
(),
ws
.
end
());
replace
(
path
.
begin
(),
path
.
end
(),
'\\'
,
'/'
);
path
=
file_util
::
get_directory
(
path
);
path
+=
"/"
;
return
path
;
#else
Dl_info
dl_info
;
dladdr
(
reinterpret_cast
<
void
*>
(
find_my_file
),
&
dl_info
);
return
dl_info
.
dli_fname
;
#endif
}
runtime
::
Backend
::~
Backend
()
runtime
::
Backend
::~
Backend
()
{
{
}
}
...
@@ -86,6 +114,11 @@ void runtime::Backend::remove_compiled_function(std::shared_ptr<Executable> exec
...
@@ -86,6 +114,11 @@ void runtime::Backend::remove_compiled_function(std::shared_ptr<Executable> exec
{
{
}
}
std
::
shared_ptr
<
runtime
::
Executable
>
runtime
::
Backend
::
load
(
istream
&
input_stream
)
{
throw
runtime_error
(
"load opertion unimplemented."
);
}
bool
runtime
::
Backend
::
is_device_memory
(
void
*
ptr
)
bool
runtime
::
Backend
::
is_device_memory
(
void
*
ptr
)
{
{
// override this method for each supported backend to determine if the passed pointer is in
// override this method for each supported backend to determine if the passed pointer is in
...
@@ -93,9 +126,18 @@ bool runtime::Backend::is_device_memory(void* ptr)
...
@@ -93,9 +126,18 @@ bool runtime::Backend::is_device_memory(void* ptr)
return
false
;
return
false
;
}
}
std
::
shared_ptr
<
runtime
::
Executable
>
runtime
::
Backend
::
load
(
istream
&
input_stream
)
void
runtime
::
Backend
::
set_backend_shared_library_search_directory
(
const
string
&
path
)
{
{
throw
runtime_error
(
"load opertion unimplemented."
);
s_backend_shared_library_search_directory
=
path
;
}
const
string
&
runtime
::
Backend
::
get_backend_shared_library_search_directory
()
{
if
(
s_backend_shared_library_search_directory
.
empty
())
{
s_backend_shared_library_search_directory
=
find_my_file
();
}
return
s_backend_shared_library_search_directory
;
}
}
bool
runtime
::
Backend
::
set_config
(
const
map
<
string
,
string
>&
config
,
string
&
error
)
bool
runtime
::
Backend
::
set_config
(
const
map
<
string
,
string
>&
config
,
string
&
error
)
...
...
src/ngraph/runtime/backend.hpp
View file @
be99cb7f
...
@@ -142,6 +142,18 @@ public:
...
@@ -142,6 +142,18 @@ public:
/// \returns a shared pointer to the op if found, else nullptr
/// \returns a shared pointer to the op if found, else nullptr
virtual
std
::
shared_ptr
<
ngraph
::
Node
>
get_backend_op
(
const
std
::
string
&
op_name
,
...);
virtual
std
::
shared_ptr
<
ngraph
::
Node
>
get_backend_op
(
const
std
::
string
&
op_name
,
...);
/// \brief Allows sending backend specific configuration. The map contains key, value pairs
/// specific to a particluar backend. The definition of these key, value pairs is
/// defined by each backend.
/// \param config The configuration map sent to the backend
/// \param error An error string describing any error encountered
/// \returns true if the configuration is supported, false otherwise. On false the error
/// parameter value is valid.
virtual
bool
set_config
(
const
std
::
map
<
std
::
string
,
std
::
string
>&
config
,
std
::
string
&
error
);
static
void
set_backend_shared_library_search_directory
(
const
std
::
string
&
path
);
static
const
std
::
string
&
get_backend_shared_library_search_directory
();
/// \brief Returns memory allocator used by backend for host allocations
/// \brief Returns memory allocator used by backend for host allocations
virtual
Allocator
*
get_host_memory_allocator
()
{
return
nullptr
;
}
virtual
Allocator
*
get_host_memory_allocator
()
{
return
nullptr
;
}
/// \brief Set the host memory allocator to be used by the backend
/// \brief Set the host memory allocator to be used by the backend
...
@@ -159,12 +171,6 @@ public:
...
@@ -159,12 +171,6 @@ public:
/// \param ptr pointer to the memory to determine if its in device memory or not
/// \param ptr pointer to the memory to determine if its in device memory or not
virtual
bool
is_device_memory
(
void
*
ptr
);
virtual
bool
is_device_memory
(
void
*
ptr
);
/// \brief Allows sending backend specific configuration. The map contains key, value pairs
private
:
/// specific to a particluar backend. The definition of these key, value pairs is
static
std
::
string
s_backend_shared_library_search_directory
;
/// defined by each backend.
/// \param config The configuration map sent to the backend
/// \param error An error string describing any error encountered
/// \returns true if the configuration is supported, false otherwise. On false the error
/// parameter value is valid.
virtual
bool
set_config
(
const
std
::
map
<
std
::
string
,
std
::
string
>&
config
,
std
::
string
&
error
);
};
};
src/ngraph/runtime/backend_manager.cpp
View file @
be99cb7f
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "ngraph/file_util.hpp"
#include "ngraph/file_util.hpp"
#include "ngraph/runtime/backend.hpp"
#include "ngraph/runtime/backend.hpp"
#include "ngraph/runtime/backend_manager.hpp"
#include "ngraph/runtime/backend_manager.hpp"
#include "ngraph/runtime/interpreter/static_initialize.hpp"
#include "ngraph/util.hpp"
#include "ngraph/util.hpp"
using
namespace
std
;
using
namespace
std
;
...
@@ -107,6 +108,7 @@ shared_ptr<runtime::Backend> runtime::BackendManager::create_backend(const std::
...
@@ -107,6 +108,7 @@ shared_ptr<runtime::Backend> runtime::BackendManager::create_backend(const std::
if
(
get_backend_constructor_pointer
)
if
(
get_backend_constructor_pointer
)
{
{
backend
=
get_backend_constructor_pointer
()
->
create
(
config
);
backend
=
get_backend_constructor_pointer
()
->
create
(
config
);
register_backend
(
type
,
get_backend_constructor_pointer
());
}
}
else
else
{
{
...
@@ -125,26 +127,6 @@ shared_ptr<runtime::Backend> runtime::BackendManager::create_backend(const std::
...
@@ -125,26 +127,6 @@ shared_ptr<runtime::Backend> runtime::BackendManager::create_backend(const std::
return
backend
;
return
backend
;
}
}
// This doodad finds the full path of the containing shared library
static
string
find_my_file
()
{
#ifdef _WIN32
HMODULE
hModule
=
GetModuleHandleW
(
L"ngraph.dll"
);
WCHAR
wpath
[
MAX_PATH
];
GetModuleFileNameW
(
hModule
,
wpath
,
MAX_PATH
);
wstring
ws
(
wpath
);
string
path
(
ws
.
begin
(),
ws
.
end
());
replace
(
path
.
begin
(),
path
.
end
(),
'\\'
,
'/'
);
path
=
file_util
::
get_directory
(
path
);
path
+=
"/"
;
return
path
;
#else
Dl_info
dl_info
;
dladdr
(
reinterpret_cast
<
void
*>
(
find_my_file
),
&
dl_info
);
return
dl_info
.
dli_fname
;
#endif
}
DL_HANDLE
runtime
::
BackendManager
::
open_shared_library
(
string
type
)
DL_HANDLE
runtime
::
BackendManager
::
open_shared_library
(
string
type
)
{
{
string
lib_prefix
=
SHARED_LIB_PREFIX
;
string
lib_prefix
=
SHARED_LIB_PREFIX
;
...
@@ -160,7 +142,8 @@ DL_HANDLE runtime::BackendManager::open_shared_library(string type)
...
@@ -160,7 +142,8 @@ DL_HANDLE runtime::BackendManager::open_shared_library(string type)
}
}
string
library_name
=
lib_prefix
+
to_lower
(
type
)
+
"_backend"
+
lib_suffix
;
string
library_name
=
lib_prefix
+
to_lower
(
type
)
+
"_backend"
+
lib_suffix
;
string
my_directory
=
file_util
::
get_directory
(
find_my_file
());
string
my_directory
=
file_util
::
get_directory
(
Backend
::
get_backend_shared_library_search_directory
());
string
library_path
=
file_util
::
path_join
(
my_directory
,
library_name
);
string
library_path
=
file_util
::
path_join
(
my_directory
,
library_name
);
string
error
;
string
error
;
#ifdef _WIN32
#ifdef _WIN32
...
@@ -185,7 +168,8 @@ DL_HANDLE runtime::BackendManager::open_shared_library(string type)
...
@@ -185,7 +168,8 @@ DL_HANDLE runtime::BackendManager::open_shared_library(string type)
map
<
string
,
string
>
runtime
::
BackendManager
::
get_registered_device_map
()
map
<
string
,
string
>
runtime
::
BackendManager
::
get_registered_device_map
()
{
{
map
<
string
,
string
>
rc
;
map
<
string
,
string
>
rc
;
string
my_directory
=
file_util
::
get_directory
(
find_my_file
());
string
my_directory
=
file_util
::
get_directory
(
Backend
::
get_backend_shared_library_search_directory
());
vector
<
string
>
backend_list
;
vector
<
string
>
backend_list
;
auto
f
=
[
&
](
const
string
&
file
,
bool
is_dir
)
{
auto
f
=
[
&
](
const
string
&
file
,
bool
is_dir
)
{
...
...
src/ngraph/runtime/interpreter/CMakeLists.txt
View file @
be99cb7f
...
@@ -14,14 +14,21 @@
...
@@ -14,14 +14,21 @@
# limitations under the License.
# limitations under the License.
# ******************************************************************************
# ******************************************************************************
if
(
NGRAPH_INTERPRETER_STATIC_LIB_ENABLE
)
set
(
LIBRARY_TYPE STATIC
)
else
()
set
(
LIBRARY_TYPE SHARED
)
endif
()
if
(
NGRAPH_INTERPRETER_ENABLE
)
if
(
NGRAPH_INTERPRETER_ENABLE
)
add_library
(
interpreter_backend
SHARED
int_backend.cpp node_wrapper.cpp int_executable.cpp
)
add_library
(
interpreter_backend
${
LIBRARY_TYPE
}
int_backend.cpp node_wrapper.cpp int_executable.cpp
)
if
(
NGRAPH_LIB_VERSIONING_ENABLE
)
if
(
NGRAPH_LIB_VERSIONING_ENABLE
)
set_target_properties
(
interpreter_backend PROPERTIES
set_target_properties
(
interpreter_backend PROPERTIES
VERSION
${
NGRAPH_VERSION
}
VERSION
${
NGRAPH_VERSION
}
SOVERSION
${
NGRAPH_API_VERSION
}
)
SOVERSION
${
NGRAPH_API_VERSION
}
)
endif
()
endif
()
target_link_libraries
(
interpreter_backend PUBLIC ngraph
)
target_link_libraries
(
interpreter_backend PUBLIC ngraph
)
target_compile_definitions
(
interpreter_backend PUBLIC NGRAPH_INTERPRETER_STATIC_LIB_ENABLE
)
install
(
TARGETS interpreter_backend
install
(
TARGETS interpreter_backend
LIBRARY DESTINATION
"
${
NGRAPH_INSTALL_LIB
}
"
LIBRARY DESTINATION
"
${
NGRAPH_INSTALL_LIB
}
"
...
...
src/ngraph/runtime/interpreter/int_backend.cpp
View file @
be99cb7f
...
@@ -20,13 +20,14 @@
...
@@ -20,13 +20,14 @@
#include "ngraph/runtime/backend_manager.hpp"
#include "ngraph/runtime/backend_manager.hpp"
#include "ngraph/runtime/host_tensor.hpp"
#include "ngraph/runtime/host_tensor.hpp"
#include "ngraph/runtime/interpreter/int_executable.hpp"
#include "ngraph/runtime/interpreter/int_executable.hpp"
#include "ngraph/runtime/interpreter/static_initialize.hpp"
#include "ngraph/serializer.hpp"
#include "ngraph/serializer.hpp"
#include "ngraph/util.hpp"
#include "ngraph/util.hpp"
using
namespace
std
;
using
namespace
std
;
using
namespace
ngraph
;
using
namespace
ngraph
;
extern
"C"
runtime
::
BackendConstructor
*
get_backend_constructor_pointer
()
runtime
::
BackendConstructor
*
runtime
::
interpreter
::
get_backend_constructor_pointer
()
{
{
class
INTBackendConstructor
:
public
runtime
::
BackendConstructor
class
INTBackendConstructor
:
public
runtime
::
BackendConstructor
{
{
...
@@ -42,6 +43,24 @@ extern "C" runtime::BackendConstructor* get_backend_constructor_pointer()
...
@@ -42,6 +43,24 @@ extern "C" runtime::BackendConstructor* get_backend_constructor_pointer()
return
s_backend_constructor
.
get
();
return
s_backend_constructor
.
get
();
}
}
#ifndef INTERPRETER_BACKEND_STATIC
extern
"C"
runtime
::
BackendConstructor
*
get_backend_constructor_pointer
()
{
return
runtime
::
interpreter
::
get_backend_constructor_pointer
();
}
#endif
void
runtime
::
interpreter
::
static_initialize
()
{
static
bool
s_is_initialized
=
false
;
if
(
!
s_is_initialized
)
{
s_is_initialized
=
true
;
BackendManager
::
register_backend
(
"INTERPRETER"
,
runtime
::
interpreter
::
get_backend_constructor_pointer
());
}
}
runtime
::
interpreter
::
INTBackend
::
INTBackend
()
runtime
::
interpreter
::
INTBackend
::
INTBackend
()
{
{
}
}
...
...
src/ngraph/runtime/interpreter/int_backend.hpp
View file @
be99cb7f
...
@@ -34,6 +34,7 @@ namespace ngraph
...
@@ -34,6 +34,7 @@ namespace ngraph
class
INTBackend
;
class
INTBackend
;
class
INTExecutable
;
class
INTExecutable
;
class
INTBackendConstructor
;
class
INTBackendConstructor
;
BackendConstructor
*
get_backend_constructor_pointer
();
}
}
}
}
}
}
...
...
src/ngraph/runtime/interpreter/static_initialize.hpp
0 → 100644
View file @
be99cb7f
//*****************************************************************************
// 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
interpreter
{
void
static_initialize
();
}
}
}
src/tools/nbench/nbench.cpp
View file @
be99cb7f
...
@@ -33,12 +33,22 @@
...
@@ -33,12 +33,22 @@
#include "ngraph/pass/memory_layout.hpp"
#include "ngraph/pass/memory_layout.hpp"
#include "ngraph/pass/visualize_tree.hpp"
#include "ngraph/pass/visualize_tree.hpp"
#include "ngraph/runtime/backend.hpp"
#include "ngraph/runtime/backend.hpp"
#include "ngraph/runtime/backend_manager.hpp"
#include "ngraph/runtime/interpreter/int_backend.hpp"
#include "ngraph/serializer.hpp"
#include "ngraph/serializer.hpp"
#include "ngraph/util.hpp"
#include "ngraph/util.hpp"
using
namespace
std
;
using
namespace
std
;
using
namespace
ngraph
;
using
namespace
ngraph
;
static
void
configure_static_backends
()
{
#ifdef NGRAPH_INTERPRETER_STATIC_LIB_ENABLE
ngraph
::
runtime
::
BackendManager
::
register_backend
(
"INTERPRETER"
,
ngraph
::
runtime
::
interpreter
::
get_backend_constructor_pointer
());
#endif
}
class
PerfShape
:
public
ngraph
::
runtime
::
PerformanceCounter
class
PerfShape
:
public
ngraph
::
runtime
::
PerformanceCounter
{
{
public
:
public
:
...
@@ -182,6 +192,7 @@ int main(int argc, char** argv)
...
@@ -182,6 +192,7 @@ int main(int argc, char** argv)
bool
copy_data
=
true
;
bool
copy_data
=
true
;
bool
dot_file
=
false
;
bool
dot_file
=
false
;
configure_static_backends
();
for
(
size_t
i
=
1
;
i
<
argc
;
i
++
)
for
(
size_t
i
=
1
;
i
<
argc
;
i
++
)
{
{
string
arg
=
argv
[
i
];
string
arg
=
argv
[
i
];
...
...
test/main.cpp
View file @
be99cb7f
...
@@ -19,11 +19,22 @@
...
@@ -19,11 +19,22 @@
#include "gtest/gtest.h"
#include "gtest/gtest.h"
#include "ngraph/log.hpp"
#include "ngraph/log.hpp"
#include "ngraph/runtime/backend_manager.hpp"
#include "ngraph/runtime/interpreter/int_backend.hpp"
using
namespace
std
;
using
namespace
std
;
static
void
configure_static_backends
()
{
#ifdef NGRAPH_INTERPRETER_STATIC_LIB_ENABLE
ngraph
::
runtime
::
BackendManager
::
register_backend
(
"INTERPRETER"
,
ngraph
::
runtime
::
interpreter
::
get_backend_constructor_pointer
());
#endif
}
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
configure_static_backends
();
const
char
*
exclude
=
"--gtest_filter=-benchmark.*"
;
const
char
*
exclude
=
"--gtest_filter=-benchmark.*"
;
vector
<
char
*>
argv_vector
;
vector
<
char
*>
argv_vector
;
argv_vector
.
push_back
(
argv
[
0
]);
argv_vector
.
push_back
(
argv
[
0
]);
...
...
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