Skip to content

Commit

Permalink
Fixes small memory leak from missing hipEventDestroy (#1554)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgmillette authored Oct 9, 2024
1 parent aa93244 commit ceaed8e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/ck/host_utility/kernel_launch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ float launch_and_time_kernel(const StreamConfig& stream_config,

hip_check_error(hipEventElapsedTime(&total_time, start, stop));

hip_check_error(hipEventDestroy(start));
hip_check_error(hipEventDestroy(stop));

return total_time / nrepeat;
}
else
Expand Down Expand Up @@ -143,6 +146,9 @@ float launch_and_time_kernel_with_preprocess(const StreamConfig& stream_config,

hip_check_error(hipEventElapsedTime(&total_time, start, stop));

hip_check_error(hipEventDestroy(start));
hip_check_error(hipEventDestroy(stop));

return total_time / nrepeat;
}
else
Expand Down

0 comments on commit ceaed8e

Please sign in to comment.