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