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
33b54ce1
Unverified
Commit
33b54ce1
authored
Jul 13, 2018
by
Robert Kimball
Committed by
GitHub
Jul 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor speed increase (#1218)
parent
346f480f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
liveness.cpp
src/ngraph/pass/liveness.cpp
+4
-4
No files found.
src/ngraph/pass/liveness.cpp
View file @
33b54ce1
...
...
@@ -39,7 +39,7 @@ bool pass::Liveness::run_on_function(shared_ptr<ngraph::Function> function)
unordered_set
<
descriptor
::
Tensor
*>
persistent_tensors
;
unordered_set
<
descriptor
::
Tensor
*>
output_tensors
;
for
(
shared_ptr
<
op
::
Parameter
>
node
:
function
->
get_parameters
())
for
(
const
shared_ptr
<
op
::
Parameter
>&
node
:
function
->
get_parameters
())
{
for
(
size_t
i
=
0
;
i
<
node
->
get_output_size
();
++
i
)
{
...
...
@@ -47,7 +47,7 @@ bool pass::Liveness::run_on_function(shared_ptr<ngraph::Function> function)
persistent_tensors
.
insert
(
&
tensor
);
}
}
for
(
shared_ptr
<
op
::
Result
>
node
:
function
->
get_results
())
for
(
const
shared_ptr
<
op
::
Result
>&
node
:
function
->
get_results
())
{
for
(
size_t
i
=
0
;
i
<
node
->
get_output_size
();
++
i
)
{
...
...
@@ -56,7 +56,7 @@ bool pass::Liveness::run_on_function(shared_ptr<ngraph::Function> function)
output_tensors
.
insert
(
&
tensor
);
}
}
for
(
shared_ptr
<
Node
>
node
:
function
->
get_ordered_ops
()
)
for
(
const
shared_ptr
<
Node
>&
node
:
ops
)
{
if
(
auto
constant_node
=
dynamic_pointer_cast
<
op
::
Constant
>
(
node
))
{
...
...
@@ -71,7 +71,7 @@ bool pass::Liveness::run_on_function(shared_ptr<ngraph::Function> function)
unordered_set
<
descriptor
::
Tensor
*>
currently_live
;
for
(
auto
it
=
ops
.
rbegin
();
it
!=
ops
.
rend
();
it
++
)
{
shared_ptr
<
Node
>
node
=
*
it
;
const
shared_ptr
<
Node
>&
node
=
*
it
;
node
->
liveness_new_list
.
clear
();
node
->
liveness_free_list
.
clear
();
unordered_set
<
descriptor
::
Tensor
*>
input_tensor_decls
;
...
...
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