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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user