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

This reverts commit 3afbe3a155.

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:
Ajay GunaShekar
2023-01-15 10:01:14 -05:00
rodič e72db4a957
revize 01fe2ea09e
2 změnil soubory, kde provedl 3 přidání a 7 odebrání
+1 -1
Zobrazit soubor
@@ -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
Zobrazit soubor
@@ -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;
}
}