fix: return the appropriate KernelInfo when calling the getKernelInfo

The indexes of all returned kernelInfo values greater than or equal to
exportedFunctionsKernelId should be incremented by one

Related-To: NEO-7820

Signed-off-by: Andrzej Koska <andrzej.koska@intel.com>
This commit is contained in:
Andrzej Koska
2023-04-27 16:55:37 +00:00
committed by Compute-Runtime-Automation
parent e351a90f81
commit 7230120060
2 changed files with 11 additions and 1 deletions

View File

@@ -67,7 +67,7 @@ size_t Program::getNumKernels() const {
const KernelInfo *Program::getKernelInfo(size_t ordinal, uint32_t rootDeviceIndex) const {
auto &kernelInfoArray = buildInfos[rootDeviceIndex].kernelInfoArray;
if (exportedFunctionsKernelId == ordinal) {
if (exportedFunctionsKernelId <= ordinal) {
ordinal++;
}
DEBUG_BREAK_IF(ordinal >= kernelInfoArray.size());