Skip to content

Commit 27a847f

Browse files
authored
Add missing hipEventDestroy calls in tests to solve mem leak (#580)
1 parent c878b05 commit 27a847f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/common.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ namespace rocwmma
664664
CHECK_HIP_ERROR(
665665
hipMemcpy(&maxRelativeError, d_relativeError, sizeof(double), hipMemcpyDeviceToHost));
666666

667+
CHECK_HIP_ERROR(hipEventDestroy(syncEvent));
668+
667669
// Free allocated device memory
668670
CHECK_HIP_ERROR(hipFree(d_relativeError));
669671

@@ -745,6 +747,8 @@ namespace rocwmma
745747
CHECK_HIP_ERROR(
746748
hipMemcpy(&maxRelativeError, d_relativeError, sizeof(double), hipMemcpyDeviceToHost));
747749

750+
CHECK_HIP_ERROR(hipEventDestroy(syncEvent));
751+
748752
// Free allocated device memory
749753
CHECK_HIP_ERROR(hipFree(d_relativeError));
750754

0 commit comments

Comments
 (0)