From 0567dd299ab795c990e020793b81cb60fefbc4f8 Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Fri, 24 Apr 2020 17:20:03 -0400 Subject: [PATCH] Don't attempt to reuse the cooperative queue Change-Id: I0e98e292a562715a7b395118f899af859f3e42bb [ROCm/clr commit: 082cbfa1f5a3ab482b74b1394ef9e0ae0c6f4b1c] --- projects/clr/rocclr/device/rocm/rocdevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/device/rocm/rocdevice.cpp b/projects/clr/rocclr/device/rocm/rocdevice.cpp index b9ee64ae79..461f0d8c18 100755 --- a/projects/clr/rocclr/device/rocm/rocdevice.cpp +++ b/projects/clr/rocclr/device/rocm/rocdevice.cpp @@ -1915,7 +1915,8 @@ hsa_queue_t* Device::acquireQueue(uint32_t queue_size_hint, bool coop_queue) { // If we have reached the max number of queues, reuse an existing queue, // choosing the one with the least number of users. - if (queuePool_.size() == GPU_MAX_HW_QUEUES) { + // Note: Don't attempt to reuse the cooperative queue, since it's single per device + if (!coop_queue && (queuePool_.size() == GPU_MAX_HW_QUEUES)) { typedef decltype(queuePool_)::const_reference PoolRef; auto lowest = std::min_element(queuePool_.begin(), queuePool_.end(), [] (PoolRef A, PoolRef B) {