SWDEV-387810 - Fixes to verify if the current stream matches the capture stream

- invalid to synchronize or query the execution status of a capturing stream but non-capturing streams can.

- If any local thread has an ongoing or concurrent capture sequence initiated with hipStreamCaptureModeGlobal, it is prohibited from unsafe calls

Change-Id: Ifa641e807216d3b7c3e8c2fb1be2f7a50bd641df


[ROCm/clr commit: 7809d2846b]
This commit is contained in:
Sourabh Betigeri authored and Maneesh Gupta committed 2023-04-05 10:53:33 +00:00
1 parent 421c4149e4
commit 21d9eb467d
4 files changed
+19 -8

No files matched your search

@@ -518,7 +518,7 @@ hipError_t hipDeviceSynchronize ( void ) {
HIP_RETURN(hipErrorOutOfMemory);
}
if (hip::Stream::StreamCaptureOngoing() == true) {
if (hip::Stream::StreamCaptureOngoing(reinterpret_cast<hipStream_t>(stream)) == true) {
HIP_RETURN(hipErrorStreamCaptureUnsupported);
}