SWDEV-372757 - Don't destroy null queue in MT

This reverts commit f39655c0c8.

Reason for revert: patch does not fix all stream hangs. So another patch was merged which fixes all issues.

Change-Id: I332d1ea29c23747b46b7667fe3e34e0ceefd2b23
This commit is contained in:
Ajay GunaShekar
2023-01-15 10:01:14 -05:00
parent a4dd362a1d
commit 1f4176062b
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -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)
+2 -6
View File
@@ -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;
}
}