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
3591803e
Commit
3591803e
authored
Jun 15, 2023
by
Ted Themistokleous
Browse files
Rename trace_mod param to trace_pass
More representative naming for what this trace flag does
parent
57ee17f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/include/migraphx/matcher.hpp
src/include/migraphx/matcher.hpp
+6
-6
No files found.
src/include/migraphx/matcher.hpp
View file @
3591803e
...
@@ -374,7 +374,7 @@ MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_VALIDATE_MATCHES)
...
@@ -374,7 +374,7 @@ MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_VALIDATE_MATCHES)
/// Find matches for an instruction in the module for per section of matchers
/// Find matches for an instruction in the module for per section of matchers
template
<
class
Mod
,
class
...
Ms
>
template
<
class
Mod
,
class
...
Ms
>
void
find_matches
(
size_t
trace_
mod
,
Mod
&
mod
,
instruction_ref
ins
,
Ms
&&
...
ms
)
void
find_matches
(
size_t
trace_
pass
,
Mod
&
mod
,
instruction_ref
ins
,
Ms
&&
...
ms
)
{
{
#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5
#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ > 5
const
const
...
@@ -389,12 +389,12 @@ void find_matches(size_t trace_mod, Mod& mod, instruction_ref ins, Ms&&... ms)
...
@@ -389,12 +389,12 @@ void find_matches(size_t trace_mod, Mod& mod, instruction_ref ins, Ms&&... ms)
[
&
](
auto
&&
m
)
{
[
&
](
auto
&&
m
)
{
if
(
match
)
if
(
match
)
return
;
return
;
if
(
trace
>
1
or
trace_
mod
>
1
)
if
(
trace
>
1
or
trace_
pass
>
1
)
std
::
cout
<<
"Match: "
<<
get_type_name
(
m
)
<<
std
::
endl
;
std
::
cout
<<
"Match: "
<<
get_type_name
(
m
)
<<
std
::
endl
;
auto
r
=
match_instruction
(
get_module
(
mod
),
ins
,
m
.
matcher
());
auto
r
=
match_instruction
(
get_module
(
mod
),
ins
,
m
.
matcher
());
if
(
r
.
result
==
get_module
(
mod
).
end
())
if
(
r
.
result
==
get_module
(
mod
).
end
())
return
;
return
;
if
(
trace
>
0
or
trace_
mod
>
0
)
if
(
trace
>
0
or
trace_
pass
>
0
)
{
{
std
::
cout
<<
"Matched by "
<<
get_type_name
(
m
)
<<
std
::
endl
;
std
::
cout
<<
"Matched by "
<<
get_type_name
(
m
)
<<
std
::
endl
;
get_module
(
mod
).
debug_print
(
ins
);
get_module
(
mod
).
debug_print
(
ins
);
...
@@ -428,13 +428,13 @@ void find_matches(Mod& mod, Ms&&... ms)
...
@@ -428,13 +428,13 @@ void find_matches(Mod& mod, Ms&&... ms)
}
}
}
}
/// Find matches in a
module
/// Find matches in a
pass
template
<
class
Mod
,
class
...
Ms
>
template
<
class
Mod
,
class
...
Ms
>
void
find_matches
(
size_t
trace_
mod
,
Mod
&
mod
,
Ms
&&
...
ms
)
void
find_matches
(
size_t
trace_
pass
,
Mod
&
mod
,
Ms
&&
...
ms
)
{
{
for
(
auto
ins
:
iterator_for
(
get_module
(
mod
)))
for
(
auto
ins
:
iterator_for
(
get_module
(
mod
)))
{
{
find_matches
(
trace_
mod
,
mod
,
ins
,
ms
...);
find_matches
(
trace_
pass
,
mod
,
ins
,
ms
...);
}
}
}
}
...
...
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