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
675a25c8
Commit
675a25c8
authored
Aug 23, 2023
by
Paul
Browse files
Print the problem and slowest solution
parent
c0dc2156
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/targets/gpu/compile_ops.cpp
src/targets/gpu/compile_ops.cpp
+3
-0
No files found.
src/targets/gpu/compile_ops.cpp
View file @
675a25c8
...
...
@@ -181,6 +181,7 @@ struct compile_plan
MIGRAPHX_THROW
(
"Multiple kernels without config"
);
std
::
cout
<<
"Benchmarking "
<<
preop
.
name
()
<<
": "
<<
results
.
size
()
<<
" configs"
<<
std
::
endl
;
std
::
cout
<<
"Problem: "
<<
config
->
problem
<<
std
::
endl
;
std
::
vector
<
double
>
times
;
times
.
reserve
(
results
.
size
());
std
::
transform
(
...
...
@@ -191,7 +192,9 @@ struct compile_plan
.
first
;
});
auto
i
=
std
::
distance
(
times
.
begin
(),
std
::
min_element
(
times
.
begin
(),
times
.
end
()));
auto
j
=
std
::
distance
(
times
.
begin
(),
std
::
max_element
(
times
.
begin
(),
times
.
end
()));
std
::
cout
<<
"Fastest solution: "
<<
config
->
solutions
.
at
(
i
)
<<
std
::
endl
;
std
::
cout
<<
"Slowest solution: "
<<
config
->
solutions
.
at
(
j
)
<<
std
::
endl
;
std
::
cout
<<
"Fastest time: "
<<
*
std
::
min_element
(
times
.
begin
(),
times
.
end
())
<<
std
::
endl
;
std
::
cout
<<
"Slowest time: "
<<
*
std
::
max_element
(
times
.
begin
(),
times
.
end
())
<<
std
::
endl
;
pc
.
insert
(
preop
.
name
(),
config
->
problem
,
config
->
solutions
.
at
(
i
));
...
...
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