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
1d919bfc
Commit
1d919bfc
authored
Nov 25, 2017
by
Robert Kimball
Committed by
Adam Procter
Nov 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make call_frame call a little more readable (#265)
parent
eebf0b70
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
14 additions
and
16 deletions
+14
-16
call_frame.hpp
src/ngraph/runtime/call_frame.hpp
+2
-2
call_frame.cpp
src/ngraph/runtime/cpu/call_frame.cpp
+2
-2
call_frame.hpp
src/ngraph/runtime/cpu/call_frame.hpp
+2
-3
call_frame.cpp
src/ngraph/runtime/ngvm/call_frame.cpp
+2
-2
call_frame.hpp
src/ngraph/runtime/ngvm/call_frame.hpp
+2
-3
call.hpp
src/ngraph/runtime/ngvm/eigen/call.hpp
+1
-1
reduce_matrix_columns.hpp
src/ngraph/runtime/ngvm/eigen/reduce_matrix_columns.hpp
+1
-1
reduce_matrix_rows.hpp
src/ngraph/runtime/ngvm/eigen/reduce_matrix_rows.hpp
+1
-1
reduce_to_scalar.hpp
src/ngraph/runtime/ngvm/eigen/reduce_to_scalar.hpp
+1
-1
backend_test.in.cpp
test/backend_test.in.cpp
+0
-0
No files found.
src/ngraph/runtime/call_frame.hpp
View file @
1d919bfc
...
...
@@ -36,8 +36,8 @@ namespace ngraph
///
/// Tuples will be expanded into their tensor views to build the call frame.
virtual
void
operator
()
(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
inputs
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
outputs
)
=
0
;
call
(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
inputs
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
outputs
)
=
0
;
/// @brief Invoke the function with tuples pre-expanded to their underlying tensor views.
virtual
void
tensor_call
(
const
TensorViewPtrs
&
inputs
,
...
...
src/ngraph/runtime/cpu/call_frame.cpp
View file @
1d919bfc
...
...
@@ -50,8 +50,8 @@ void CallFrame::tensor_call(
m_compiled_function
(
inputs
.
data
(),
outputs
.
data
());
}
void
CallFrame
::
operator
()
(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
arguments
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
results
)
void
CallFrame
::
call
(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
arguments
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
results
)
{
// TODO: Check types of args and result
vector
<
shared_ptr
<
ngraph
::
runtime
::
TensorView
>>
inputs
;
...
...
src/ngraph/runtime/cpu/call_frame.hpp
View file @
1d919bfc
...
...
@@ -47,9 +47,8 @@ namespace ngraph
/// @brief Invoke the function with values matching the signature of the function.
///
/// Tuples will be expanded into their tensor views to build the call frame.
void
operator
()(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
inputs
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
outputs
);
void
call
(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
inputs
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
outputs
);
/// @brief Invoke the function with tuples pre-expanded to their underlying
/// tensor views.
...
...
src/ngraph/runtime/ngvm/call_frame.cpp
View file @
1d919bfc
...
...
@@ -63,8 +63,8 @@ void CallFrame::tensor_call(
fill_n
(
m_tensor_views
.
begin
(),
m_n_inputs
+
m_n_outputs
,
nullptr
);
}
void
CallFrame
::
operator
()
(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
arguments
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
results
)
void
CallFrame
::
call
(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
arguments
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
results
)
{
// TODO: Check types of args and result
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
TensorView
>>
inputs
;
...
...
src/ngraph/runtime/ngvm/call_frame.hpp
View file @
1d919bfc
...
...
@@ -47,9 +47,8 @@ namespace ngraph
/// @brief Invoke the function with values matching the signature of the function.
///
/// Tuples will be expanded into their tensor views to build the call frame.
void
operator
()(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
inputs
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
outputs
);
void
call
(
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
inputs
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
Value
>>&
outputs
);
/// @brief Invoke the function with tuples pre-expanded to their underlying tensor views.
void
tensor_call
(
const
TensorViewPtrs
&
inputs
,
const
TensorViewPtrs
&
outputs
);
...
...
src/ngraph/runtime/ngvm/eigen/call.hpp
View file @
1d919bfc
...
...
@@ -58,7 +58,7 @@ namespace ngraph
{
outputs
.
push_back
(
call_frame
.
get_tensor_view
(
out
.
get_index
()));
}
(
*
cf
)
(
inputs
,
outputs
);
cf
->
call
(
inputs
,
outputs
);
}
protected
:
...
...
src/ngraph/runtime/ngvm/eigen/reduce_matrix_columns.hpp
View file @
1d919bfc
...
...
@@ -55,7 +55,7 @@ namespace ngraph
auto
ty
=
ngraph
::
runtime
::
make_tensor
<
ET
>
(
Shape
{},
{
y
});
auto
tr
=
ngraph
::
runtime
::
make_tensor
<
ET
>
(
Shape
{});
(
*
cf
)
({
tx
,
ty
},
{
tr
});
cf
->
call
({
tx
,
ty
},
{
tr
});
return
tr
->
get_vector
()[
0
];
};
EigenVector
<
ET
>
(
call_frame
,
m_out
)
=
...
...
src/ngraph/runtime/ngvm/eigen/reduce_matrix_rows.hpp
View file @
1d919bfc
...
...
@@ -55,7 +55,7 @@ namespace ngraph
auto
ty
=
ngraph
::
runtime
::
make_tensor
<
ET
>
(
Shape
{},
{
y
});
auto
tr
=
ngraph
::
runtime
::
make_tensor
<
ET
>
(
Shape
{});
(
*
cf
)
({
tx
,
ty
},
{
tr
});
cf
->
call
({
tx
,
ty
},
{
tr
});
return
tr
->
get_vector
()[
0
];
};
EigenVector
<
ET
>
(
call_frame
,
m_out
)
=
...
...
src/ngraph/runtime/ngvm/eigen/reduce_to_scalar.hpp
View file @
1d919bfc
...
...
@@ -55,7 +55,7 @@ namespace ngraph
auto
ty
=
ngraph
::
runtime
::
make_tensor
<
ET
>
(
Shape
{},
{
y
});
auto
tr
=
ngraph
::
runtime
::
make_tensor
<
ET
>
(
Shape
{});
(
*
cf
)
({
tx
,
ty
},
{
tr
});
cf
->
call
({
tx
,
ty
},
{
tr
});
return
tr
->
get_vector
()[
0
];
};
EigenArray1d
<
ET
>
(
call_frame
,
m_out
)
=
...
...
test/backend_test.in.cpp
View file @
1d919bfc
This diff is collapsed.
Click to expand it.
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