SWDEV-329789 - Avoid a race condition with the last command
Runtime can reset the last command only if it didn't change
since the query at the beginning of finish()
Change-Id: I629f2d788e9bbaa17ca4e96b1a753f8131e32463
[ROCm/clr commit: 9e74f1c7f8]
这个提交包含在:
@@ -136,7 +136,8 @@ void HostQueue::finish() {
|
||||
if (IS_HIP) {
|
||||
ScopedLock sl(vdev()->execution());
|
||||
ScopedLock l(lastCmdLock_);
|
||||
if (lastEnqueueCommand_ != nullptr) {
|
||||
// Runtime can clear the last command only if no other submissions occured during finish()
|
||||
if (command == lastEnqueueCommand_) {
|
||||
lastEnqueueCommand_->release();
|
||||
lastEnqueueCommand_ = nullptr;
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户