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
efe4ba18
Unverified
Commit
efe4ba18
authored
Nov 22, 2017
by
Jai Menon
Committed by
GitHub
Nov 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #249 from NervanaSystems/bob/simple_function_call
Bob/simple function call
parents
41f9ec92
14e2c9b8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
13 deletions
+6
-13
call_frame.cpp
src/ngraph/runtime/cpu/call_frame.cpp
+1
-1
call_frame.hpp
src/ngraph/runtime/cpu/call_frame.hpp
+1
-2
emitter.cpp
src/ngraph/runtime/cpu/emitter.cpp
+0
-0
emitter.hpp
src/ngraph/runtime/cpu/emitter.hpp
+0
-1
external_function.cpp
src/ngraph/runtime/cpu/external_function.cpp
+4
-8
external_function.hpp
src/ngraph/runtime/cpu/external_function.hpp
+0
-1
No files found.
src/ngraph/runtime/cpu/call_frame.cpp
View file @
efe4ba18
...
...
@@ -45,7 +45,7 @@ void CallFrame::tensor_call(
}
// Invoke compiled computation
m_compiled_function
(
inputs
,
outputs
);
m_compiled_function
(
inputs
.
data
(),
outputs
.
data
()
);
}
void
CallFrame
::
operator
()(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
arguments
,
...
...
src/ngraph/runtime/cpu/call_frame.hpp
View file @
efe4ba18
...
...
@@ -32,8 +32,7 @@ namespace ngraph
{
class
CallFrame
;
using
EntryPoint_t
=
void
(
const
std
::
vector
<
void
*>&
inputs
,
const
std
::
vector
<
void
*>&
outputs
);
using
EntryPoint_t
=
void
(
void
**
inputs
,
void
**
outputs
);
using
EntryPoint
=
std
::
function
<
EntryPoint_t
>
;
...
...
src/ngraph/runtime/cpu/emitter.cpp
View file @
efe4ba18
This diff is collapsed.
Click to expand it.
src/ngraph/runtime/cpu/emitter.hpp
View file @
efe4ba18
...
...
@@ -24,7 +24,6 @@
#define EMITTER_DECL(E) \
E(const ngraph::Node* n, \
ExternalFunction* ef, \
const std::vector<TensorViewInfo>& inputs, \
const std::vector<TensorViewInfo>& outputs)
...
...
src/ngraph/runtime/cpu/external_function.cpp
View file @
efe4ba18
...
...
@@ -186,7 +186,6 @@ void ExternalFunction::compile()
TU
+=
R"(// Generated by the NGraph CPU backend
#include <cmath>
#include <vector>
#include <Eigen/Dense>
...
...
@@ -202,17 +201,14 @@ using namespace ngraph::runtime::cpu::eigen;
TU
<<
"// Declare all functions
\n
"
;
for
(
shared_ptr
<
Function
>
f
:
pass_manager
.
get_state
().
get_functions
())
{
TU
<<
"extern
\"
C
\"
void "
<<
f
->
get_name
()
<<
"(
\n
"
;
TU
<<
" const std::vector<void*>& inputs,
\n
"
;
TU
<<
" const std::vector<void*>& outputs);
\n
"
;
TU
<<
"extern
\"
C
\"
void "
<<
f
->
get_name
()
<<
"(void** inputs, void** outputs);
\n
"
;
}
TU
<<
"
\n
"
;
for
(
shared_ptr
<
Function
>
current_function
:
pass_manager
.
get_state
().
get_functions
())
{
TU
<<
"extern
\"
C
\"
void "
<<
current_function
->
get_name
()
<<
"(
\n
"
;
TU
<<
" const std::vector<void*>& inputs,
\n
"
;
TU
<<
" const std::vector<void*>& outputs)
\n
"
;
TU
<<
"extern
\"
C
\"
void "
<<
current_function
->
get_name
();
TU
<<
"(void** inputs, void** outputs)
\n
"
;
TU
<<
"{
\n
"
;
TU
.
indent
++
;
...
...
@@ -297,7 +293,7 @@ using namespace ngraph::runtime::cpu::eigen;
auto
tv
=
output
.
get_tensor_view
();
out
.
push_back
({
0
,
tv
});
}
handler
->
second
(
&
emitter
,
node
.
get
(),
this
,
in
,
out
);
handler
->
second
(
&
emitter
,
node
.
get
(),
in
,
out
);
}
TU
.
indent
--
;
...
...
src/ngraph/runtime/cpu/external_function.hpp
View file @
efe4ba18
...
...
@@ -41,7 +41,6 @@ namespace ngraph
using
OpFunction
=
std
::
function
<
void
(
Emitter
*
,
const
ngraph
::
Node
*
,
ExternalFunction
*
,
const
std
::
vector
<
TensorViewInfo
>&
inputs
,
const
std
::
vector
<
TensorViewInfo
>&
outputs
)
>
;
...
...
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