SWDEV-264244 - Hide Notifications from HIP

This fixes hipStreamQuery returning hipErrorNotReady when idle
Change-Id: I3f77666a00bc6a7162b6c660d79e76c09669d94f
Этот коммит содержится в:
Satyanvesh Dittakavi
2021-03-01 06:27:52 -05:00
родитель dc58078887
Коммит a711a49881
3 изменённых файлов: 25 добавлений и 22 удалений
+16 -13
Просмотреть файл
@@ -200,21 +200,24 @@ void HostQueue::append(Command& command) {
if (!IS_HIP) {
return;
}
// Set last submitted command
Command* prevLastEnqueueCommand;
command.retain();
{
// lastCmdLock_ ensures that lastEnqueueCommand() can retain the command before it is swapped
// out. We want to keep this critical section as short as possible, so the command should be
// released outside this section.
ScopedLock l(lastCmdLock_);
prevLastEnqueueCommand = lastEnqueueCommand_;
lastEnqueueCommand_ = &command;
}
if (command.waitingEvent() == nullptr) {
// Set last submitted command
Command* prevLastEnqueueCommand;
command.retain();
{
// lastCmdLock_ ensures that lastEnqueueCommand() can retain the command before it is swapped
// out. We want to keep this critical section as short as possible, so the command should be
// released outside this section.
ScopedLock l(lastCmdLock_);
if (prevLastEnqueueCommand != nullptr) {
prevLastEnqueueCommand->release();
prevLastEnqueueCommand = lastEnqueueCommand_;
lastEnqueueCommand_ = &command;
}
if (prevLastEnqueueCommand != nullptr) {
prevLastEnqueueCommand->release();
}
}
}