SWDEV-372757 - Don't destroy null queue in MT
This reverts commit3afbe3a155. Reason for revert: patch does not fix all stream hangs. So another patch was merged which fixes all issues. Change-Id: I332d1ea29c23747b46b7667fe3e34e0ceefd2b23 [ROCm/clr commit:1f4176062b]
Tento commit je obsažen v:
@@ -409,7 +409,7 @@ namespace hip {
|
||||
Device(amd::Context* ctx, int devId): context_(ctx),
|
||||
deviceId_(devId),
|
||||
null_stream_(this, Stream::Priority::Normal, 0, true),
|
||||
flags_(hipDeviceScheduleSpin),
|
||||
flags_(hipDeviceScheduleSpin),
|
||||
isActive_(false),
|
||||
default_mem_pool_(nullptr),
|
||||
current_mem_pool_(nullptr)
|
||||
|
||||
@@ -48,12 +48,8 @@ Stream::~Stream() {
|
||||
amd::ScopedLock lock(streamSetLock);
|
||||
streamSet.erase(this);
|
||||
|
||||
// Skip queue destruction for null stream in MT. Queue worker thread can be destroyed on
|
||||
// the app exit, during the stream destruction, causing a race condition.
|
||||
if (!null_ || AMD_DIRECT_DISPATCH) {
|
||||
queue_->release();
|
||||
queue_ = nullptr;
|
||||
}
|
||||
queue_->release();
|
||||
queue_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele