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
0a11fa24
Commit
0a11fa24
authored
Jan 28, 2019
by
Robert Kimball
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update onnxifi
parent
8214cd39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
16 deletions
+33
-16
backend.hpp
src/ngraph/frontend/onnxifi/backend.hpp
+33
-16
No files found.
src/ngraph/frontend/onnxifi/backend.hpp
View file @
0a11fa24
...
...
@@ -47,26 +47,11 @@ namespace ngraph
}
const
std
::
string
&
get_type
()
const
{
return
m_type
;
}
runtime
::
Handle
compile
(
const
std
::
shared_ptr
<
Function
>&
function
)
const
std
::
shared_ptr
<
ngraph
::
runtime
::
Executable
>
compile
(
const
std
::
shared_ptr
<
Function
>&
function
)
const
{
return
get
().
compile
(
function
);
}
bool
call
(
const
std
::
shared_ptr
<
Function
>&
function
,
const
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Tensor
>>&
outputs
,
const
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Tensor
>>&
inputs
)
const
{
return
get
().
call
(
function
,
outputs
,
inputs
);
}
bool
call_with_validate
(
const
std
::
shared_ptr
<
Function
>&
function
,
const
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Tensor
>>&
outputs
,
const
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Tensor
>>&
inputs
)
const
{
return
get
().
call_with_validate
(
function
,
outputs
,
inputs
);
}
private
:
std
::
string
m_type
{};
mutable
std
::
shared_ptr
<
runtime
::
Backend
>
m_backend
{
nullptr
};
...
...
@@ -81,6 +66,38 @@ namespace ngraph
}
};
/// \brief ONNXIFI extensions to nGraph Executable
class
Executable
{
public
:
Executable
(
const
Executable
&
)
=
delete
;
Executable
&
operator
=
(
const
Executable
&
)
=
delete
;
Executable
(
Executable
&&
)
=
default
;
Executable
&
operator
=
(
Executable
&&
)
=
default
;
explicit
Executable
(
const
std
::
shared_ptr
<
runtime
::
Executable
>&
executable
)
:
m_executable
{
executable
}
{
}
bool
call
(
const
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Tensor
>>&
outputs
,
const
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Tensor
>>&
inputs
)
const
{
return
m_executable
->
call
(
outputs
,
inputs
);
}
bool
call_with_validate
(
const
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Tensor
>>&
outputs
,
const
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Tensor
>>&
inputs
)
const
{
return
m_executable
->
call_with_validate
(
outputs
,
inputs
);
}
private
:
mutable
std
::
shared_ptr
<
runtime
::
Executable
>
m_executable
{
nullptr
};
};
}
// namespace onnxifi
}
// namespace ngraph
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