mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
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:
committed by
Compute-Runtime-Automation
parent
61fb19caab
commit
aea5f435db
@@ -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;
|
||||
}
|
||||
|
||||
@@ -60,8 +60,9 @@ struct CommandQueue : _ze_command_queue_handle_t {
|
||||
|
||||
bool peekIsCopyOnlyCommandQueue() const { return this->isCopyOnlyCommandQueue; }
|
||||
|
||||
uint32_t getClientId() { return this->clientId; }
|
||||
uint32_t getClientId() const { return this->clientId; }
|
||||
void setClientId(uint32_t value) { this->clientId = value; }
|
||||
virtual void unregisterCsrClient() = 0;
|
||||
|
||||
static constexpr uint32_t clientNotRegistered = std::numeric_limits<uint32_t>::max();
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ struct CommandQueueImp : public CommandQueue {
|
||||
void makeResidentAndMigrate(bool performMigration, const NEO::ResidencyContainer &residencyContainer) override;
|
||||
void printKernelsPrintfOutput(bool hangDetected);
|
||||
void checkAssert();
|
||||
void unregisterCsrClient() override;
|
||||
|
||||
protected:
|
||||
MOCKABLE_VIRTUAL NEO::SubmissionStatus submitBatchBuffer(size_t offset, NEO::ResidencyContainer &residencyContainer, void *endingCmdPtr,
|
||||
|
||||
Reference in New Issue
Block a user