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
883312be
Commit
883312be
authored
May 13, 2022
by
umangyadav
Browse files
formatting
parent
d0fec7fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
src/include/migraphx/tracer.hpp
src/include/migraphx/tracer.hpp
+14
-14
No files found.
src/include/migraphx/tracer.hpp
View file @
883312be
...
...
@@ -29,20 +29,18 @@ struct tracer
// file_stream
bool
fs_enabled
()
const
{
return
!
dump_dir
.
empty
()
&&
!
os_enabled
();
}
// output_stream
bool
os_enabled
()
const
{
return
(
os
!=
nullptr
)
&&
!
fs_enabled
();}
bool
enabled
()
const
{
return
fs_enabled
()
or
os_enabled
();};
bool
os_enabled
()
const
{
return
(
os
!=
nullptr
)
&&
!
fs_enabled
();
}
bool
enabled
()
const
{
return
fs_enabled
()
or
os_enabled
();
};
/*
Dump any string to ostream, used for debug build or debugging purposes.
*/
void
operator
()(
const
std
::
string
&
s
=
""
)
const
{
std
::
cout
<<
s
<<
std
::
endl
;
}
void
operator
()(
const
std
::
string
&
s
=
""
)
const
{
std
::
cout
<<
s
<<
std
::
endl
;
}
/*
Based on user's envrionment flags, either dump IR passes' output to a file or ostream i.e. cout
or cerr,
:param pass_file_name : file_name to be used when dumping IR pass to a file, this param
is not used when IR is
dumped to ostream.
Based on user's envrionment flags, either dump IR passes' output to a file or ostream i.e. cout
or cerr,
:param pass_file_name : file_name to be used when dumping IR pass to a file, this param
is not used when IR is
dumped to ostream.
*/
template
<
class
...
Ts
,
MIGRAPHX_REQUIRES
((
sizeof
...(
Ts
)
>
0
))
>
void
operator
()(
const
std
::
string
&
pass_file_name
,
const
Ts
&
...
xs
)
...
...
@@ -55,7 +53,9 @@ struct tracer
swallow
{
ofs
<<
xs
...};
ofs
<<
std
::
endl
;
ofs
.
close
();
}
else
if
(
os_enabled
())
{
}
else
if
(
os_enabled
())
{
swallow
{
*
os
<<
xs
...};
*
os
<<
std
::
endl
;
}
...
...
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