SWDEV-487988 - Destroy event and free memory.

Change-Id: I95ceaac5b343132c0660de0dabba548fb6a29034
This commit is contained in:
Jaydeep Patel
2024-10-05 12:09:58 +00:00
committed by Jaydeepkumar Patel
parent 8515ac9b2f
commit 80144befea
2 changed files with 7 additions and 2 deletions
+4 -2
View File
@@ -116,11 +116,13 @@ TEST_CASE("Unit_hipEventIpc") {
#endif
HIP_CHECK(hipEventDestroy(start));
HIP_CHECK(hipEventDestroy(stop));
#if HT_AMD
HIP_CHECK(hipEventDestroy(ipc_event));
#endif
HIP_CHECK(hipMemcpy(C_h, C_d, Nbytes, hipMemcpyDeviceToHost));
HipTest::checkVectorADD(A_h, B_h, C_h, N, true);
HipTest::freeArrays(A_d, B_d, C_d, A_h, B_h, C_h, false);
}
/**
@@ -170,6 +170,9 @@ void thread_run(const int iThread) {
} else {
fprintf(stderr, "[%d] PASSED\n", iThread);
}
HIP_CHECK(hipEventDestroy(start));
HIP_CHECK(hipEventDestroy(stop));
// free the resources on device side
HIP_CHECK(hipFree(gpuMatrix));
HIP_CHECK(hipFree(gpuTransposeMatrix));