feature: unregister CSR client on Event host synchronize

Related-To: NEO-7458

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2023-06-22 16:38:44 +00:00
committed by Compute-Runtime-Automation
parent 61fb19caab
commit aea5f435db
10 changed files with 145 additions and 6 deletions

View File

@@ -53,9 +53,7 @@ CommandQueueImp::CommandQueueImp(Device *device, NEO::CommandStreamReceiver *csr
}
ze_result_t CommandQueueImp::destroy() {
if (this->clientId != CommandQueue::clientNotRegistered) {
this->csr->unregisterClient();
}
unregisterCsrClient();
if (commandStream.getCpuBase() != nullptr) {
commandStream.replaceGraphicsAllocation(nullptr);
@@ -252,6 +250,13 @@ CommandQueue *CommandQueue::create(uint32_t productFamily, Device *device, NEO::
return commandQueue;
}
void CommandQueueImp::unregisterCsrClient() {
if (getClientId() != CommandQueue::clientNotRegistered) {
this->csr->unregisterClient();
setClientId(CommandQueue::clientNotRegistered);
}
}
ze_command_queue_mode_t CommandQueueImp::getSynchronousMode() const {
return desc.mode;
}