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
f1177913
Commit
f1177913
authored
Jan 28, 2019
by
Robert Kimball
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build
parent
624da449
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
36 deletions
+73
-36
backend.cpp
python/pyngraph/runtime/backend.cpp
+2
-2
regmodule_pyngraph_runtime.hpp
python/pyngraph/runtime/regmodule_pyngraph_runtime.hpp
+1
-0
backend.hpp
src/ngraph/frontend/onnxifi/backend.hpp
+2
-33
executable.hpp
src/ngraph/frontend/onnxifi/executable.hpp
+67
-0
cpu_backend.hpp
src/ngraph/runtime/cpu/cpu_backend.hpp
+1
-1
No files found.
python/pyngraph/runtime/backend.cpp
View file @
f1177913
...
...
@@ -35,7 +35,7 @@ void regclass_pyngraph_runtime_Backend(py::module m)
const
ngraph
::
element
::
Type
&
,
const
ngraph
::
Shape
&
))
&
ngraph
::
runtime
::
Backend
::
create_tensor
);
backend
.
def
(
"compile"
,
(
std
::
unique
_ptr
<
ngraph
::
runtime
::
Executable
>
(
ngraph
::
runtime
::
Backend
::*
)(
std
::
shared_ptr
<
ngraph
::
Function
>
,
bool
))
&
(
std
::
shared
_ptr
<
ngraph
::
runtime
::
Executable
>
(
ngraph
::
runtime
::
Backend
::*
)(
std
::
shared_ptr
<
ngraph
::
Function
>
))
&
ngraph
::
runtime
::
Backend
::
compile
);
}
python/pyngraph/runtime/regmodule_pyngraph_runtime.hpp
View file @
f1177913
...
...
@@ -18,6 +18,7 @@
#include <pybind11/pybind11.h>
#include "pyngraph/runtime/backend.hpp"
#include "pyngraph/runtime/executable.hpp"
#include "pyngraph/runtime/tensor.hpp"
namespace
py
=
pybind11
;
...
...
src/ngraph/frontend/onnxifi/backend.hpp
View file @
f1177913
...
...
@@ -47,7 +47,8 @@ namespace ngraph
}
const
std
::
string
&
get_type
()
const
{
return
m_type
;
}
std
::
shared_ptr
<
ngraph
::
runtime
::
Executable
>
compile
(
const
std
::
shared_ptr
<
Function
>&
function
)
const
std
::
shared_ptr
<
runtime
::
Executable
>
compile
(
const
std
::
shared_ptr
<
Function
>&
function
)
const
{
return
get
().
compile
(
function
);
}
...
...
@@ -66,38 +67,6 @@ 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
src/ngraph/frontend/onnxifi/executable.hpp
0 → 100644
View file @
f1177913
//*****************************************************************************
// 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
#include <memory> // std::shared_ptr
#include <string> // std::string
#include <utility> // std::move
#include <vector> // std::vector
#include "ngraph/function.hpp"
#include "ngraph/runtime/backend.hpp"
#include "ngraph/runtime/executable.hpp"
#include "ngraph/runtime/tensor.hpp"
namespace
ngraph
{
namespace
onnxifi
{
/// \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
src/ngraph/runtime/cpu/cpu_backend.hpp
View file @
f1177913
...
...
@@ -49,7 +49,7 @@ namespace ngraph
compile
(
std
::
shared_ptr
<
Function
>
func
,
bool
enable_performance_counters
=
false
)
override
;
void
remove_compiled_function
(
shared_ptr
<
Executable
>
exec
)
override
;
void
remove_compiled_function
(
s
td
::
s
hared_ptr
<
Executable
>
exec
)
override
;
bool
is_supported
(
const
Node
&
node
)
const
override
;
bool
is_supported_property
(
const
Property
prop
)
const
override
;
...
...
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