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


[ROCm/clr commit: 544318fffe]
Этот коммит содержится в:
sdashmiz authored and Shadi Dashmiz committed 2023-05-01 13:38:59 -04:00
1 родитель 2278d7e0ad
Коммит ebcab6e910
2 files changed
+24 -3

No files matched your search

+8
Просмотреть файл
@@ -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);
}