From 96e7dcecd1ca5d84abf5af56ebd3bc34cf62f8ae Mon Sep 17 00:00:00 2001 From: Sarbojit Sarkar Date: Mon, 4 Oct 2021 15:44:32 +0000 Subject: [PATCH] SWDEV-292547 - To match cuda behavior Change-Id: I3577609fcc5443949f73644196e8310fc49d887f [ROCm/clr commit: 930807fd209667f4eee603a950b31a9a6866b412] --- projects/clr/hipamd/src/hip_stream.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index f6f56ca983..280f132e0a 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -402,7 +402,9 @@ hipError_t hipStreamDestroy(hipStream_t stream) { if (stream == nullptr) { HIP_RETURN(hipErrorInvalidHandle); } - + if (stream == hipStreamPerThread) { + HIP_RETURN(hipErrorInvalidResourceHandle); + } if (!hip::isValid(stream)) { HIP_RETURN(hipErrorContextIsDestroyed); }