From 674ed4785207720872054cfd95c69ffc5cc0e64a Mon Sep 17 00:00:00 2001 From: Aidan Belton-Schure Date: Fri, 4 Oct 2024 09:07:58 +0000 Subject: [PATCH] SWDEV-489364 - Free memory in hipAPIStreamDisable Change-Id: I4f740fe803bcc4bbf57865173d92c567de65fdbb --- catch/unit/stream/hipAPIStreamDisable.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/catch/unit/stream/hipAPIStreamDisable.cc b/catch/unit/stream/hipAPIStreamDisable.cc index e1163471ef..aad3ed06ca 100644 --- a/catch/unit/stream/hipAPIStreamDisable.cc +++ b/catch/unit/stream/hipAPIStreamDisable.cc @@ -68,4 +68,10 @@ TEST_CASE("Unit_hipStreamCreate_MultistreamBasicFunctionalities") { HIP_CHECK(hipMemcpy(&x, xd, sizeof(float), hipMemcpyDeviceToHost)); HIP_CHECK(hipMemcpy(&y, yd, sizeof(float), hipMemcpyDeviceToHost)); REQUIRE(x == y); + + HIP_CHECK(hipFree(yd)); + HIP_CHECK(hipFree(xd)); + for (int i = 0; i < NUM_STREAMS; ++i) { + HIP_CHECK(hipFree(data[i])); + } }