SWDEV-305016 - Check for HW event ready

Runtime can skip the marker if HW event was completed already.

Change-Id: Ie9fbc08b06b375c5586cbe1aa93922f1880608e4
Ta zmiana jest zawarta w:
%! (template.HTML=German Andryeyev)złożyło 2021-11-01 10:07:08 -04:00
1 rodzic 17cc99c05d
złożenie 21a2fdb80a
Plik 1 zmieniony
+4 -2
+4 -2
Wyświetl plik
@@ -200,10 +200,12 @@ hipError_t Event::enqueueStreamWaitCommand(hipStream_t stream, amd::Command* com
hipError_t Event::streamWait(hipStream_t stream, uint flags) {
amd::HostQueue* queue = hip::getQueue(stream);
if ((event_ == nullptr) || (event_->command().queue() == queue)) {
// Access to event_ object must be lock protected
amd::ScopedLock lock(lock_);
if ((event_ == nullptr) || (event_->command().queue() == queue) || ready()) {
return hipSuccess;
}
amd::ScopedLock lock(lock_);
if (!(this->flags & hipEventInterprocess)) {
if (!event_->notifyCmdQueue()) {
return hipErrorLaunchOutOfResources;