SWDEV-478921 - Destroy Queue created by Coop Launch

Change-Id: I7f31ce05421479ff1de138cae26aafa071e956e2
This commit is contained in:
Rahul Manocha
2024-08-19 14:20:46 -07:00
committed by Rahul Manocha
parent 450eca293b
commit ddbd7039b0
3 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -3221,7 +3221,7 @@ hsa_queue_t* Device::acquireQueue(uint32_t queue_size_hint, bool coop_queue,
return queue;
}
void Device::releaseQueue(hsa_queue_t* queue, const std::vector<uint32_t>& cuMask) {
void Device::releaseQueue(hsa_queue_t* queue, const std::vector<uint32_t>& cuMask, bool coop_queue) {
for (auto& it : cuMask.size() == 0 ? queuePool_ : queueWithCUMaskPool_) {
auto qIter = it.find(queue);
if (qIter != it.end()) {
@@ -3248,6 +3248,12 @@ void Device::releaseQueue(hsa_queue_t* queue, const std::vector<uint32_t>& cuMas
}
}
}
if (coop_queue) { // cooperative queue
ClPrint(amd::LOG_INFO, amd::LOG_QUEUE, "Deleting CG enabled hardware queue %p ",
queue->base_address);
hsa_queue_destroy(queue);
}
}
void* Device::getOrCreateHostcallBuffer(hsa_queue_t* queue, bool coop_queue,