Clean-up the list of blocking streams

- Insert the stream into the list on the host queue creation,
instead of stream creation

Change-Id: Ib25053019f7df97e5bc786922a6587b9514852d3
This commit is contained in:
German Andryeyev
2020-04-29 02:11:37 -04:00
committed by Christophe Paquot
parent 89b9befe42
commit bc65ca64fc
3 changed files with 63 additions and 47 deletions
+1 -5
View File
@@ -217,18 +217,14 @@ hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream) {
HIP_RETURN(hipErrorInvalidHandle);
}
hip::Event* e = reinterpret_cast<hip::Event*>(event);
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
amd::HostQueue* queue = hip::getQueue(stream);
amd::Command* command = queue->getLastQueuedCommand(true);
if (command == nullptr) {
command = new amd::Marker(*queue, false);
command->enqueue();
}
hip::Event* e = reinterpret_cast<hip::Event*>(event);
e->addMarker(queue, command);
HIP_RETURN(hipSuccess);