Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
f5c3cebe
Commit
f5c3cebe
authored
May 05, 2022
by
Paul
Browse files
Add more verbose tracing
parent
7bfc9422
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/include/migraphx/matcher.hpp
src/include/migraphx/matcher.hpp
+4
-2
No files found.
src/include/migraphx/matcher.hpp
View file @
f5c3cebe
...
@@ -286,16 +286,18 @@ void find_matches(module& mod, instruction_ref ins, Ms&&... ms)
...
@@ -286,16 +286,18 @@ void find_matches(module& mod, instruction_ref ins, Ms&&... ms)
#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5
#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5
const
const
#endif
#endif
bool
trace
=
enabled
(
MIGRAPHX_TRACE_MATCHES
{});
int
trace
=
value_of
(
MIGRAPHX_TRACE_MATCHES
{});
bool
match
=
false
;
bool
match
=
false
;
each_args
(
each_args
(
[
&
](
auto
&&
m
)
{
[
&
](
auto
&&
m
)
{
if
(
match
)
if
(
match
)
return
;
return
;
if
(
trace
>
1
)
std
::
cout
<<
"Match: "
<<
get_type_name
(
m
)
<<
std
::
endl
;
auto
r
=
match_instruction
(
mod
,
ins
,
m
.
matcher
());
auto
r
=
match_instruction
(
mod
,
ins
,
m
.
matcher
());
if
(
r
.
result
==
mod
.
end
())
if
(
r
.
result
==
mod
.
end
())
return
;
return
;
if
(
trace
)
if
(
trace
>
0
)
{
{
std
::
cout
<<
"Matched by "
<<
get_type_name
(
m
)
<<
std
::
endl
;
std
::
cout
<<
"Matched by "
<<
get_type_name
(
m
)
<<
std
::
endl
;
mod
.
debug_print
(
ins
);
mod
.
debug_print
(
ins
);
...
...
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