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
e8fa980a
Commit
e8fa980a
authored
Jul 18, 2018
by
Jaikrishnan Menon
Committed by
Scott Cyphers
Jul 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix run_passes semantics, but default to old transitive behavior (#1242)
parent
ad12723b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
manager.cpp
src/ngraph/pass/manager.cpp
+9
-3
manager.hpp
src/ngraph/pass/manager.hpp
+1
-1
No files found.
src/ngraph/pass/manager.cpp
View file @
e8fa980a
...
@@ -56,14 +56,20 @@ void ngraph::pass::Manager::initialize_default_passes()
...
@@ -56,14 +56,20 @@ void ngraph::pass::Manager::initialize_default_passes()
{
{
}
}
void
ngraph
::
pass
::
Manager
::
run_passes
(
shared_ptr
<
Function
>
func
)
void
ngraph
::
pass
::
Manager
::
run_passes
(
shared_ptr
<
Function
>
func
,
bool
transitive
)
{
{
bool
profile_enabled
=
getenv
(
"NGRAPH_PROFILE_PASS_ENABLE"
)
!=
nullptr
;
bool
profile_enabled
=
getenv
(
"NGRAPH_PROFILE_PASS_ENABLE"
)
!=
nullptr
;
// find all functions
vector
<
shared_ptr
<
Function
>>
fs
;
vector
<
shared_ptr
<
Function
>>
fs
;
if
(
transitive
)
{
// find all functions
traverse_functions
(
func
,
[
&
](
shared_ptr
<
Function
>
f
)
{
fs
.
push_back
(
f
);
});
traverse_functions
(
func
,
[
&
](
shared_ptr
<
Function
>
f
)
{
fs
.
push_back
(
f
);
});
}
else
{
fs
=
{
func
};
}
set
<
shared_ptr
<
Function
>>
tfs
(
begin
(
fs
),
end
(
fs
));
set
<
shared_ptr
<
Function
>>
tfs
(
begin
(
fs
),
end
(
fs
));
get_state
().
set_functions
(
tfs
);
get_state
().
set_functions
(
tfs
);
...
...
src/ngraph/pass/manager.hpp
View file @
e8fa980a
...
@@ -54,7 +54,7 @@ public:
...
@@ -54,7 +54,7 @@ public:
}
}
}
}
void
run_passes
(
std
::
shared_ptr
<
Function
>
);
void
run_passes
(
std
::
shared_ptr
<
Function
>
,
bool
transitive
=
true
);
ManagerState
&
get_state
();
ManagerState
&
get_state
();
void
set_pass_visualization
(
bool
new_state
)
{
m_visualize
=
new_state
;
}
void
set_pass_visualization
(
bool
new_state
)
{
m_visualize
=
new_state
;
}
...
...
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