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
24a7db84
Commit
24a7db84
authored
Nov 15, 2017
by
Robert Kimball
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only emit memory handler if there are temporaries
parent
efc53f25
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
external_function.cpp
src/ngraph/runtime/cpu/external_function.cpp
+13
-4
No files found.
src/ngraph/runtime/cpu/external_function.cpp
View file @
24a7db84
...
...
@@ -214,8 +214,19 @@ using namespace ngraph::runtime::cpu::eigen;
TU
<<
" const std::vector<void*>& inputs,
\n
"
;
TU
<<
" const std::vector<void*>& outputs)
\n
"
;
TU
<<
"{
\n
"
;
TU
.
indent
++
;
bool
temporaries_used
=
false
;
for
(
shared_ptr
<
Node
>
node
:
current_function
->
get_ordered_ops
())
{
if
(
node
->
liveness_new_list
.
size
()
>
0
)
{
temporaries_used
=
true
;
break
;
}
}
if
(
temporaries_used
)
{
size_t
temp_pool_size
=
pass_manager
.
get_state
().
get_temporary_pool_size
();
TU
<<
"// Allocate the memory pool
\n
"
;
TU
<<
"ngraph::runtime::cpu::MemoryHandler memory_handler("
<<
temp_pool_size
<<
", "
...
...
@@ -233,6 +244,7 @@ using namespace ngraph::runtime::cpu::eigen;
}
}
TU
<<
"
\n
"
;
}
TU
<<
"// Define inputs
\n
"
;
size_t
arg_index
=
0
;
...
...
@@ -263,9 +275,6 @@ using namespace ngraph::runtime::cpu::eigen;
}
TU
<<
"
\n
"
;
TU
<<
"// Define tensor views
\n
"
;
TU
<<
"
\n
"
;
for
(
shared_ptr
<
Node
>
node
:
current_function
->
get_ordered_ops
())
{
auto
&
n
=
*
node
;
// Work around a compiler warning (*node inside typeid may have effects
...
...
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