Removing dependent commandQueue kernels

Signed-off-by: Andrzej Koska <andrzej.koska@intel.com>
Related-To: NEO-6212
This commit is contained in:
Andrzej Koska
2021-08-31 15:44:43 +00:00
committed by Compute-Runtime-Automation
parent 34ad95ae12
commit bd9457262e
4 changed files with 62 additions and 1 deletions

View File

@ -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

View File

@ -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