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
5cfc7e92
Unverified
Commit
5cfc7e92
authored
Oct 30, 2018
by
Robert Kimball
Committed by
GitHub
Oct 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass FunctionInstance to interpreter op execution (#1947)
parent
8ef1ec04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
15 deletions
+18
-15
int_backend.cpp
src/ngraph/runtime/interpreter/int_backend.cpp
+14
-13
int_backend.hpp
src/ngraph/runtime/interpreter/int_backend.hpp
+4
-2
No files found.
src/ngraph/runtime/interpreter/int_backend.cpp
View file @
5cfc7e92
...
...
@@ -200,7 +200,7 @@ bool runtime::interpreter::INTBackend::call(shared_ptr<Function> function,
{
instance
.
m_timer_map
[
op
].
start
();
}
generate_calls
(
type
,
wrapped
,
op_outputs
,
op_inputs
);
generate_calls
(
type
,
wrapped
,
op_outputs
,
op_inputs
,
instance
);
if
(
instance
.
m_performance_counters_enabled
)
{
instance
.
m_timer_map
[
op
].
stop
();
...
...
@@ -230,51 +230,52 @@ bool runtime::interpreter::INTBackend::call(shared_ptr<Function> function,
void
runtime
::
interpreter
::
INTBackend
::
generate_calls
(
const
element
::
Type
&
type
,
const
NodeWrapper
&
op
,
const
vector
<
shared_ptr
<
HostTensor
>>&
outputs
,
const
vector
<
shared_ptr
<
HostTensor
>>&
inputs
)
const
vector
<
shared_ptr
<
HostTensor
>>&
inputs
,
FunctionInstance
&
instance
)
{
if
(
type
==
element
::
boolean
)
{
op_engine
<
char
>
(
op
,
outputs
,
inputs
);
op_engine
<
char
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
f32
)
{
op_engine
<
float
>
(
op
,
outputs
,
inputs
);
op_engine
<
float
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
f64
)
{
op_engine
<
double
>
(
op
,
outputs
,
inputs
);
op_engine
<
double
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
i8
)
{
op_engine
<
int8_t
>
(
op
,
outputs
,
inputs
);
op_engine
<
int8_t
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
i16
)
{
op_engine
<
int16_t
>
(
op
,
outputs
,
inputs
);
op_engine
<
int16_t
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
i32
)
{
op_engine
<
int32_t
>
(
op
,
outputs
,
inputs
);
op_engine
<
int32_t
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
i64
)
{
op_engine
<
int64_t
>
(
op
,
outputs
,
inputs
);
op_engine
<
int64_t
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
u8
)
{
op_engine
<
uint8_t
>
(
op
,
outputs
,
inputs
);
op_engine
<
uint8_t
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
u16
)
{
op_engine
<
uint16_t
>
(
op
,
outputs
,
inputs
);
op_engine
<
uint16_t
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
u32
)
{
op_engine
<
uint32_t
>
(
op
,
outputs
,
inputs
);
op_engine
<
uint32_t
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
if
(
type
==
element
::
u64
)
{
op_engine
<
uint64_t
>
(
op
,
outputs
,
inputs
);
op_engine
<
uint64_t
>
(
op
,
outputs
,
inputs
,
instance
);
}
else
{
...
...
src/ngraph/runtime/interpreter/int_backend.hpp
View file @
5cfc7e92
...
...
@@ -179,12 +179,14 @@ private:
void
generate_calls
(
const
element
::
Type
&
type
,
const
NodeWrapper
&
op
,
const
std
::
vector
<
std
::
shared_ptr
<
HostTensor
>>&
outputs
,
const
std
::
vector
<
std
::
shared_ptr
<
HostTensor
>>&
inputs
);
const
std
::
vector
<
std
::
shared_ptr
<
HostTensor
>>&
inputs
,
FunctionInstance
&
instance
);
template
<
typename
T
>
void
op_engine
(
const
NodeWrapper
&
node_wrapper
,
const
std
::
vector
<
std
::
shared_ptr
<
HostTensor
>>&
out
,
const
std
::
vector
<
std
::
shared_ptr
<
HostTensor
>>&
args
)
const
std
::
vector
<
std
::
shared_ptr
<
HostTensor
>>&
args
,
FunctionInstance
&
instance
)
{
const
Node
&
node
=
node_wrapper
.
get_node
();
std
::
string
node_op
=
node
.
description
();
...
...
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