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
0d366e97
Commit
0d366e97
authored
Nov 08, 2021
by
Khalique Ahmed
Browse files
adjust perf report to account for batch size
parent
db439b30
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
src/driver/main.cpp
src/driver/main.cpp
+1
-1
src/include/migraphx/program.hpp
src/include/migraphx/program.hpp
+1
-1
src/program.cpp
src/program.cpp
+3
-2
test/perf_report.cpp
test/perf_report.cpp
+1
-0
No files found.
src/driver/main.cpp
View file @
0d366e97
...
@@ -480,7 +480,7 @@ struct perf : command<perf>
...
@@ -480,7 +480,7 @@ struct perf : command<perf>
std
::
cout
<<
"Allocating params ... "
<<
std
::
endl
;
std
::
cout
<<
"Allocating params ... "
<<
std
::
endl
;
auto
m
=
c
.
params
(
p
);
auto
m
=
c
.
params
(
p
);
std
::
cout
<<
"Running performance report ... "
<<
std
::
endl
;
std
::
cout
<<
"Running performance report ... "
<<
std
::
endl
;
p
.
perf_report
(
std
::
cout
,
n
,
m
);
p
.
perf_report
(
std
::
cout
,
n
,
m
,
c
.
l
.
batch
);
}
}
};
};
...
...
src/include/migraphx/program.hpp
View file @
0d366e97
...
@@ -67,7 +67,7 @@ struct program
...
@@ -67,7 +67,7 @@ struct program
void
finalize
();
void
finalize
();
void
perf_report
(
std
::
ostream
&
os
,
std
::
size_t
n
,
parameter_map
params
)
const
;
void
perf_report
(
std
::
ostream
&
os
,
std
::
size_t
n
,
parameter_map
params
,
std
::
size_t
batch
=
1
)
const
;
void
mark
(
const
parameter_map
&
params
,
marker
&&
m
);
void
mark
(
const
parameter_map
&
params
,
marker
&&
m
);
...
...
src/program.cpp
View file @
0d366e97
...
@@ -526,7 +526,7 @@ void program::mark(const parameter_map& params, marker&& m)
...
@@ -526,7 +526,7 @@ void program::mark(const parameter_map& params, marker&& m)
m
.
mark_stop
(
*
this
);
m
.
mark_stop
(
*
this
);
}
}
void
program
::
perf_report
(
std
::
ostream
&
os
,
std
::
size_t
n
,
parameter_map
params
)
const
void
program
::
perf_report
(
std
::
ostream
&
os
,
std
::
size_t
n
,
parameter_map
params
,
std
::
size_t
batch
)
const
{
{
auto
&
ctx
=
this
->
impl
->
ctx
;
auto
&
ctx
=
this
->
impl
->
ctx
;
// Run once by itself
// Run once by itself
...
@@ -619,7 +619,8 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
...
@@ -619,7 +619,8 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
os
<<
std
::
endl
;
os
<<
std
::
endl
;
os
<<
"Rate: "
<<
rate
<<
"/sec"
<<
std
::
endl
;
os
<<
"Batch size: "
<<
batch
<<
std
::
endl
;
os
<<
"Rate: "
<<
rate
*
batch
<<
"/sec"
<<
std
::
endl
;
os
<<
"Total time: "
<<
total_time
<<
"ms"
<<
std
::
endl
;
os
<<
"Total time: "
<<
total_time
<<
"ms"
<<
std
::
endl
;
os
<<
"Total instructions time: "
<<
total_instruction_time
<<
"ms"
<<
std
::
endl
;
os
<<
"Total instructions time: "
<<
total_instruction_time
<<
"ms"
<<
std
::
endl
;
os
<<
"Overhead time: "
<<
overhead_time
<<
"ms"
os
<<
"Overhead time: "
<<
overhead_time
<<
"ms"
...
...
test/perf_report.cpp
View file @
0d366e97
...
@@ -19,6 +19,7 @@ TEST_CASE(perf_report)
...
@@ -19,6 +19,7 @@ TEST_CASE(perf_report)
std
::
string
output
=
ss
.
str
();
std
::
string
output
=
ss
.
str
();
EXPECT
(
migraphx
::
contains
(
output
,
"Summary:"
));
EXPECT
(
migraphx
::
contains
(
output
,
"Summary:"
));
EXPECT
(
migraphx
::
contains
(
output
,
"Batch size:"
));
EXPECT
(
migraphx
::
contains
(
output
,
"Rate:"
));
EXPECT
(
migraphx
::
contains
(
output
,
"Rate:"
));
EXPECT
(
migraphx
::
contains
(
output
,
"Total time:"
));
EXPECT
(
migraphx
::
contains
(
output
,
"Total time:"
));
EXPECT
(
migraphx
::
contains
(
output
,
"Total instructions time:"
));
EXPECT
(
migraphx
::
contains
(
output
,
"Total instructions time:"
));
...
...
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