From 51dd60a64f4e3b3b948e14ba8b511a8349bfef78 Mon Sep 17 00:00:00 2001 From: "Belton-Schure, Aidan" Date: Thu, 22 May 2025 18:47:57 +0100 Subject: [PATCH] SWDEV-508977 - return error in global capture mode for hipEventQuery (#388) --- hipamd/src/hip_event.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hipamd/src/hip_event.cpp b/hipamd/src/hip_event.cpp index 8bce85adbd..e8dd8f3c5c 100644 --- a/hipamd/src/hip_event.cpp +++ b/hipamd/src/hip_event.cpp @@ -479,6 +479,9 @@ hipError_t ihipEventQuery(hipEvent_t event) { s->SetCaptureStatus(hipStreamCaptureStatusInvalidated); HIP_RETURN(hipErrorCapturedEvent); } + if (hip::Stream::StreamCaptureOngoing(e->GetCaptureStream())) { + HIP_RETURN(hipErrorStreamCaptureUnsupported); + } return e->query(); }