From 41bbdfca94f84d2319a0b930b3bb01587e43c34b Mon Sep 17 00:00:00 2001 From: sdashmiz Date: Tue, 27 Jun 2023 09:31:30 -0400 Subject: [PATCH] SWDEV-405485 - fix the error to match cuda Signed-off-by: sdashmiz Change-Id: Ia03a50e437c8eb189bc6578170b5ef20b470541c --- hipamd/src/hip_stream.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hipamd/src/hip_stream.cpp b/hipamd/src/hip_stream.cpp index f3dceeae80..fa471f3ee5 100644 --- a/hipamd/src/hip_stream.cpp +++ b/hipamd/src/hip_stream.cpp @@ -515,12 +515,9 @@ hipError_t hipStreamWaitEvent_common(hipStream_t stream, hipEvent_t event, unsig "[hipGraph] current capture node StreamWaitEvent on stream : %p, Event %p", stream, event); hipError_t status = hipSuccess; - if (event == nullptr) { + if (event == nullptr || !hip::isValid(stream)) { return hipErrorInvalidHandle; } - if (!hip::isValid(stream)) { - return hipErrorContextIsDestroyed; - } hip::Stream* waitStream = reinterpret_cast(stream); hip::Event* e = reinterpret_cast(event); hip::Stream* eventStream = reinterpret_cast(e->GetCaptureStream());