SWDEV-311271 - Add dependency tracking for streams

Mempool has capability to track dependency between streams for
faster memory reuse. Enable that capability.

Change-Id: I28266a7e38d0fc4c5d027b9542d3719653840821


[ROCm/clr commit: 17d0c166d2]
Этот коммит содержится в:
German Andryeyev
2024-03-04 17:09:52 -05:00
родитель 396b3f8de7
Коммит 4bb028a49d
4 изменённых файлов: 45 добавлений и 7 удалений
+8 -4
Просмотреть файл
@@ -553,10 +553,14 @@ hipError_t hipStreamWaitEvent_common(hipStream_t stream, hipEvent_t event, unsig
if (flags != 0) {
return hipErrorInvalidValue;
}
if ((eventStream != nullptr) &&
(eventStream->GetCaptureStatus() == hipStreamCaptureStatusActive)) {
// If stream is capturing but event is not recorded on event's stream.
return hipErrorStreamCaptureIsolation;
if (eventStream != nullptr) {
if (eventStream->GetCaptureStatus() == hipStreamCaptureStatusActive) {
// If stream is capturing but event is not recorded on event's stream.
return hipErrorStreamCaptureIsolation;
}
if (eventStream->DeviceId() == waitStream->DeviceId()) {
eventStream->GetDevice()->AddSafeStream(eventStream, waitStream);
}
}
status = e->streamWait(stream, flags);
}