SWDEV-360031 - Correct APIs behaviour
- correct error for hipStreamWaitEvent when event recorded before capture - correct hipEventSync when event is synced during capture Signed-off-by: sdashmiz <shadi.dashmiz@amd.com> Change-Id: I7ecbed5621eaf323846d4ccb20ec112aaa8a5757
This commit is contained in:
@@ -522,6 +522,14 @@ hipError_t hipStreamWaitEvent_common(hipStream_t stream, hipEvent_t event, unsig
|
||||
}
|
||||
|
||||
hip::Event* e = reinterpret_cast<hip::Event*>(event);
|
||||
if ((e->GetCaptureStream() != nullptr) &&
|
||||
(reinterpret_cast<hip::Stream*>(e->GetCaptureStream())->GetCaptureStatus()
|
||||
== hipStreamCaptureStatusActive)) {
|
||||
// If stream is capturing but event is not recorded on event's stream.
|
||||
if (e->GetCaptureStatus() == false) {
|
||||
return hipErrorStreamCaptureIsolation;
|
||||
}
|
||||
}
|
||||
return e->streamWait(stream, flags);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user