Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
b6f9911f
Commit
b6f9911f
authored
Jul 09, 2019
by
Paul
Browse files
Formatting
parent
a97323ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/include/migraphx/matcher.hpp
src/include/migraphx/matcher.hpp
+3
-3
No files found.
src/include/migraphx/matcher.hpp
View file @
b6f9911f
...
@@ -406,7 +406,7 @@ inline auto used_once_recursive(std::size_t depth)
...
@@ -406,7 +406,7 @@ inline auto used_once_recursive(std::size_t depth)
}
}
// Check for dead instructions
// Check for dead instructions
auto
is_dead
=
fix
<
bool
>
([
&
](
auto
self
,
auto
ins
,
auto
n
)
{
auto
is_dead
=
fix
<
bool
>
([
&
](
auto
self
,
auto
ins
,
auto
n
)
{
if
(
n
==
0
)
if
(
n
==
0
)
return
false
;
return
false
;
if
(
ins
->
get_shape
().
elements
()
==
0
)
if
(
ins
->
get_shape
().
elements
()
==
0
)
return
false
;
return
false
;
...
@@ -416,10 +416,10 @@ inline auto used_once_recursive(std::size_t depth)
...
@@ -416,10 +416,10 @@ inline auto used_once_recursive(std::size_t depth)
return
self
(
i
,
n
-
1
);
return
self
(
i
,
n
-
1
);
});
});
});
});
auto
dead
=
std
::
count_if
(
start
->
outputs
().
begin
(),
start
->
outputs
().
end
(),
[
&
](
auto
i
)
{
auto
dead
=
std
::
count_if
(
start
->
outputs
().
begin
(),
start
->
outputs
().
end
(),
[
&
](
auto
i
)
{
return
is_dead
(
i
,
depth
);
return
is_dead
(
i
,
depth
);
});
});
if
(
dead
+
1
==
start
->
outputs
().
size
())
if
(
dead
+
1
==
start
->
outputs
().
size
())
return
start
;
return
start
;
return
ctx
.
not_found
();
return
ctx
.
not_found
();
});
});
...
...
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