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
1e634f4b
Commit
1e634f4b
authored
Jan 15, 2019
by
Robert Kimball
Committed by
Scott Cyphers
Jan 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes to get hybrid not dependent on any backends and cpu configured as fallback cpu (#2319)
parent
29d29162
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
31 deletions
+7
-31
cpu_backend.cpp
src/ngraph/runtime/cpu/cpu_backend.cpp
+5
-0
cpu_backend.hpp
src/ngraph/runtime/cpu/cpu_backend.hpp
+2
-0
hybrid_backend.cpp
src/ngraph/runtime/hybrid/hybrid_backend.cpp
+0
-29
hybrid_backend.hpp
src/ngraph/runtime/hybrid/hybrid_backend.hpp
+0
-2
No files found.
src/ngraph/runtime/cpu/cpu_backend.cpp
View file @
1e634f4b
...
...
@@ -145,3 +145,8 @@ vector<runtime::PerformanceCounter>
}
return
rc
;
}
bool
runtime
::
cpu
::
CPU_Backend
::
is_supported
(
const
Node
&
op
)
const
{
return
true
;
}
src/ngraph/runtime/cpu/cpu_backend.hpp
View file @
1e634f4b
...
...
@@ -58,6 +58,8 @@ namespace ngraph
std
::
vector
<
PerformanceCounter
>
get_performance_data
(
std
::
shared_ptr
<
Function
>
func
)
const
override
;
bool
is_supported
(
const
Node
&
node
)
const
override
;
private
:
class
FunctionInstance
{
...
...
src/ngraph/runtime/hybrid/hybrid_backend.cpp
View file @
1e634f4b
...
...
@@ -18,13 +18,10 @@
#include "ngraph/graph_util.hpp"
#include "ngraph/pass/manager.hpp"
#include "ngraph/pass/visualize_tree.hpp"
#include "ngraph/runtime/gpu/gpu_backend.hpp"
#include "ngraph/runtime/gpu/gpu_tensor.hpp"
#include "ngraph/runtime/host_tensor.hpp"
#include "ngraph/runtime/hybrid/hybrid_util.hpp"
#include "ngraph/runtime/hybrid/pass/assign_placement.hpp"
#include "ngraph/runtime/hybrid/pass/fix_get_output_element.hpp"
#include "ngraph/runtime/interpreter/int_backend.hpp"
#include "ngraph/runtime/tensor.hpp"
using
namespace
ngraph
;
...
...
@@ -205,32 +202,6 @@ bool runtime::hybrid::HybridBackend::is_supported(const Node& node) const
return
true
;
}
string
runtime
::
hybrid
::
HybridBackend
::
get_placement_name
(
const
runtime
::
Tensor
*
t
)
{
string
rc
;
if
(
dynamic_cast
<
const
runtime
::
HostTensor
*>
(
t
)
!=
nullptr
)
{
rc
=
"HostTensor"
;
}
else
if
(
dynamic_cast
<
const
runtime
::
gpu
::
GPUTensor
*>
(
t
)
!=
nullptr
)
{
rc
=
"GPUTensor"
;
}
return
rc
;
}
string
runtime
::
hybrid
::
HybridBackend
::
get_placement_name
(
const
runtime
::
Backend
*
t
)
{
string
rc
;
if
(
dynamic_cast
<
const
runtime
::
interpreter
::
INTBackend
*>
(
t
)
!=
nullptr
)
{
rc
=
"INTBackend"
;
}
else
if
(
dynamic_cast
<
const
runtime
::
gpu
::
GPU_Backend
*>
(
t
)
!=
nullptr
)
{
rc
=
"GPU_Backend"
;
}
return
rc
;
}
size_t
runtime
::
hybrid
::
HybridBackend
::
get_placement
(
const
runtime
::
Tensor
*
t
)
{
size_t
index
=
0
;
...
...
src/ngraph/runtime/hybrid/hybrid_backend.hpp
View file @
1e634f4b
...
...
@@ -70,7 +70,5 @@ private:
std
::
map
<
std
::
shared_ptr
<
ngraph
::
Function
>
,
FunctionInstance
>
m_function_map
;
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Backend
>>
m_backend_list
;
std
::
string
get_placement_name
(
const
runtime
::
Tensor
*
t
);
std
::
string
get_placement_name
(
const
runtime
::
Backend
*
t
);
size_t
get_placement
(
const
runtime
::
Tensor
*
t
);
};
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