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); }