mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Removing dependent commandQueue kernels
Signed-off-by: Andrzej Koska <andrzej.koska@intel.com> Related-To: NEO-6212
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
34ad95ae12
commit
bd9457262e
@@ -125,6 +125,7 @@ CommandQueue::~CommandQueue() {
|
||||
if (context && !isSpecialCommandQueue) {
|
||||
context->decRefInternal();
|
||||
}
|
||||
gtpinRemoveCommandQueue(this);
|
||||
}
|
||||
|
||||
CommandStreamReceiver &CommandQueue::getGpgpuCommandStreamReceiver() const {
|
||||
|
||||
@@ -265,4 +265,18 @@ void gtpinSetIgcInit(void *pIgcInitPtr) {
|
||||
pIgcInit = static_cast<igc_init_t *>(pIgcInitPtr);
|
||||
}
|
||||
|
||||
void gtpinRemoveCommandQueue(void *pCmdQueue) {
|
||||
if (isGTPinInitialized) {
|
||||
std::unique_lock<GTPinLockType> lock{kernelExecQueueLock};
|
||||
size_t n = 0;
|
||||
while (n < kernelExecQueue.size()) {
|
||||
if (kernelExecQueue[n].pCommandQueue == pCmdQueue) {
|
||||
kernelExecQueue.erase(kernelExecQueue.begin() + n);
|
||||
} else {
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -27,4 +27,5 @@ void gtpinNotifyPlatformShutdown();
|
||||
inline bool gtpinIsGTPinInitialized() { return isGTPinInitialized; }
|
||||
void *gtpinGetIgcInit();
|
||||
void gtpinSetIgcInit(void *pIgcInitPtr);
|
||||
void gtpinRemoveCommandQueue(void *pCmdQueue);
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user