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
This commit is contained in:
German Andryeyev
2024-03-04 17:09:52 -05:00
parent 11a6be1ede
commit 17d0c166d2
4 changed files with 45 additions and 7 deletions
+8 -4
View File
@@ -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);
}