diff --git a/projects/hip-tests/catch/unit/stream/hipStreamCreateWithPriority.cc b/projects/hip-tests/catch/unit/stream/hipStreamCreateWithPriority.cc index de1f35de61..4031063099 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamCreateWithPriority.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamCreateWithPriority.cc @@ -768,6 +768,8 @@ template void TestForMultipleStreamWithPriority(void) { for (int i = 0; i < LOW_PRIORITY_STREAMCOUNT; i++) { if (enable_priority_low) { + HIP_CHECK(hipFree(src_d_low[i])); + HIP_CHECK(hipFree(dst_d_low[i])); HIP_CHECK(hipEventDestroy(event_start_low[i])); HIP_CHECK(hipEventDestroy(event_end_low[i])); } @@ -777,6 +779,8 @@ template void TestForMultipleStreamWithPriority(void) { for (int i = 0; i < NORMAL_PRIORITY_STREAMCOUNT; i++) { if (enable_priority_normal) { + HIP_CHECK(hipFree(src_d_normal[i])); + HIP_CHECK(hipFree(dst_d_normal[i])); HIP_CHECK(hipEventDestroy(event_start_normal[i])); HIP_CHECK(hipEventDestroy(event_end_normal[i])); } @@ -786,6 +790,8 @@ template void TestForMultipleStreamWithPriority(void) { for (int i = 0; i < HIGH_PRIORITY_STREAMCOUNT; i++) { if (enable_priority_high) { + HIP_CHECK(hipFree(src_d_high[i])); + HIP_CHECK(hipFree(dst_d_high[i])); HIP_CHECK(hipEventDestroy(event_start_high[i])); HIP_CHECK(hipEventDestroy(event_end_high[i])); } diff --git a/projects/hip-tests/catch/unit/stream/hipStreamLegacy.cc b/projects/hip-tests/catch/unit/stream/hipStreamLegacy.cc index 04bfebdc7e..a6651596fb 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamLegacy.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamLegacy.cc @@ -40,8 +40,6 @@ TEST_CASE("Unit_hipMemcpyAsync_H2H-H2D-D2H-H2PinMem") { int *A_h{nullptr}, *B_h{nullptr}; int *A_Ph{nullptr}, *B_Ph{nullptr}; HIP_CHECK(hipSetDevice(0)); - hipStream_t stream; - HIP_CHECK(hipStreamCreate(&stream)); HipTest::initArrays(&A_d, &B_d, nullptr, &A_h, &B_h, nullptr, NUM_ELM * sizeof(int)); HipTest::initArrays(nullptr, nullptr, nullptr, &A_Ph, &B_Ph, nullptr, NUM_ELM * sizeof(int), true); @@ -153,6 +151,7 @@ TEST_CASE("Unit_hipStreamGetCaptureInfo_hipStreamLegacy_CaptureInfo") { REQUIRE(C_h[i] == D_h[i]); } + HIP_CHECK(hipGraphExecDestroy(graphExec)); HIP_CHECK(hipGraphDestroy(graph)); HIP_CHECK(hipStreamDestroy(stream)); HIP_CHECK(hipStreamDestroy(streamForGraph)); diff --git a/projects/hip-tests/catch/unit/stream/hipStreamValue.cc b/projects/hip-tests/catch/unit/stream/hipStreamValue.cc index 50cba300f0..6424f82eda 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamValue.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamValue.cc @@ -650,6 +650,7 @@ TEMPLATE_TEST_CASE("Unit_hipStreamWaitValue_Default", "", uint32_t, uint64_t) { HIP_CHECK(hipFree(d_a)); HIP_CHECK(hipFree(d_b)); HIP_CHECK(hipFree(d_c)); + HIP_CHECK(hipHostUnregister(hostPtr.get())); HIP_CHECK(hipStreamDestroy(dataCopyStream)); HIP_CHECK(hipStreamDestroy(kernelExecStream)); REQUIRE(a == c);