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();
}
}
}