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
composable_kernel
Commits
99e2f186
Commit
99e2f186
authored
Jul 26, 2023
by
rocking
Browse files
Fix the bug
parent
cefd8a72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
include/ck/host_utility/kernel_launch.hpp
include/ck/host_utility/kernel_launch.hpp
+6
-4
No files found.
include/ck/host_utility/kernel_launch.hpp
View file @
99e2f186
...
...
@@ -108,19 +108,21 @@ float launch_and_time_kernel_multi_stream(const StreamConfig& stream_config,
for
(
int
i
=
0
;
i
<
nrepeat
;
++
i
)
{
hip_check_error
(
hipEventRecord
(
starts
[
i
],
stream_
config
.
stream_id_
));
hip_check_error
(
hipEventRecord
(
starts
[
i
],
stream_
ids
[
i
]
));
kernel
<<<
grid_dim
,
block_dim
,
lds_byte
,
stream_ids
[
i
]
>>>
(
args
...);
hip_check_error
(
hipEventRecord
(
stops
[
i
],
stream_ids
[
i
]));
hip_check_error
(
hipEventSynchronize
(
stops
[
i
]));
}
for
(
int
i
=
0
;
i
<
nrepeat
;
++
i
)
hip_check_error
(
hipEventSynchronize
(
stops
[
i
]));
for
(
int
i
=
0
;
i
<
nrepeat
;
++
i
)
{
float
tmp
=
0
;
hip_check_error
(
hipEventElapsedTime
(
&
tmp
,
starts
[
i
],
stops
[
i
]));
total_time
+
=
tmp
;
hip_check_error
(
hipEventElapsedTime
(
&
tmp
,
starts
[
0
],
stops
[
i
]));
total_time
=
std
::
max
(
total_time
,
tmp
)
;
}
return
total_time
/
nrepeat
;
...
...
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