From 081d8b47398b1752d41be03210bb2a080383393e Mon Sep 17 00:00:00 2001 From: haoyuan2 <98923620+haoyuan2@users.noreply.github.com> Date: Fri, 20 May 2022 08:13:17 -0700 Subject: [PATCH] SWDEV-334272 - fix test hang issue (#2683) destroy stream before exit [ROCm/hip-tests commit: 1f7b336400e327980d95560911aa8ea23343cc52] --- projects/hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc b/projects/hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc index 182d064f99..7efa2ef909 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc @@ -1,5 +1,5 @@ /* -Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -393,6 +393,7 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_ExtentValidation") { // DeAllocating the Memory HIP_CHECK(hipFree(A_d)); + HIP_CHECK(hipStreamDestroy(stream)); HipTest::freeArrays(nullptr, nullptr, nullptr, A_h, B_h, C_h, false); } @@ -483,6 +484,7 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_Negative") { // DeAllocating the memory HIP_CHECK(hipFree(A_d)); HIP_CHECK(hipStreamSynchronize(stream)); + HIP_CHECK(hipStreamDestroy(stream)); HipTest::freeArrays(nullptr, nullptr, nullptr, A_h, B_h, C_h, false); }