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
7ebf7157
Commit
7ebf7157
authored
Sep 25, 2018
by
Chris Sullivan
Committed by
Robert Kimball
Sep 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't reuse memory for non-destructive ops (#1679)
* Don't reuse memory for non-destructive ops. * Update comment.
parent
8d55382c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
memory_layout.cpp
src/ngraph/pass/memory_layout.cpp
+3
-6
No files found.
src/ngraph/pass/memory_layout.cpp
View file @
7ebf7157
...
...
@@ -51,12 +51,9 @@ bool pass::MemoryLayout::run_on_function(shared_ptr<ngraph::Function> function)
auto
input
=
&
node
->
get_inputs
().
at
(
oi_pair
.
input
).
get_tensor
();
auto
input_node
=
node
->
get_inputs
().
at
(
oi_pair
.
input
).
get_output
().
get_node
();
// an input tensor can be reused if this is the last use or
// an op isn't destructive (i.e. Reshape(DimShuffle))
if
((
node
->
liveness_free_list
.
count
(
input
)
!=
0
&&
node
->
liveness_new_list
.
count
(
output
)
!=
0
)
||
(
!
oi_pair
.
destructive
&&
!
input_node
->
is_parameter
()
&&
!
input_node
->
is_constant
()))
// an input tensor can be reused if this is the last use
if
(
node
->
liveness_free_list
.
count
(
input
)
!=
0
&&
node
->
liveness_new_list
.
count
(
output
)
!=
0
)
{
in_place_outputs
.
insert
({
output
,
input
});
reused_inputs
.
insert
(
input
);
...
...
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