SWDEV-547526 - Add missing free calls (#531)

Co-authored-by: Vladana Stojiljkovic <Vladana.Stojiljkovic@amd.com>
Este commit está contenido en:
systems-assistant[bot]
2025-11-13 11:16:41 +01:00
cometido por GitHub
padre 7450910e53
commit 720a5bcf9a
Se han modificado 2 ficheros con 6 adiciones y 7 borrados
@@ -119,6 +119,7 @@ TEST_CASE("Unit_hipExtLaunchMultiKernelMultiDevice_Functional") {
for (int j = 0; j < nGpu; j++) {
HIP_CHECK(hipStreamSynchronize(stream[j]));
HIP_CHECK(hipStreamDestroy(stream[j]));
hipDeviceProp_t props;
HIP_CHECK(hipGetDeviceProperties(&props, j));
@@ -130,15 +131,12 @@ TEST_CASE("Unit_hipExtLaunchMultiKernelMultiDevice_Functional") {
for (size_t i = 0; i < N; i++) {
REQUIRE(fabs(C_h[i] - (A_h[i] * A_h[i])) < 0.00000000001);
}
HIP_CHECK(hipFree(A_d[j]));
HIP_CHECK(hipFree(C_d[j]));
}
for (int i = 0; i < nGpu; i++) {
HIP_CHECK(hipFree(A_d[i]));
HIP_CHECK(hipFree(C_d[i]));
HIP_CHECK(hipStreamDestroy(stream[i]));
}
free(launchParamsList);
free(A_h);
free(C_h);
free(launchParamsList);
}
@@ -91,6 +91,7 @@ bool testCodeObjFile(const char* codeObjFile) {
HIP_CHECK(hipModuleLaunchKernel(Function, 1, 1, 1, LEN, 1, 1, 0, stream, NULL,
reinterpret_cast<void**>(&config)));
HIP_CHECK(hipStreamSynchronize(stream));
HIP_CHECK(hipStreamDestroy(stream));
HIP_CHECK(hipMemcpy(B, Bd, SIZE, hipMemcpyDeviceToHost));