fix(zebin): Enforce fallback to CTNI on TGL/ICL for nGEN dummy kernel

For TGL and ICL platforms - if on clCreateProgramWithSource()
call we detect a nGen dummy kernel usage - enforce fallback to the
patchtokens format (only for this kernel).
- corrected naming
- minor ULTs refactor (less dependencies).
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
Kacper Nowak
2023-01-11 16:46:43 +00:00
committed by Compute-Runtime-Automation
parent 0c3cde2141
commit d2a2656caa
19 changed files with 216 additions and 26 deletions

View File

@@ -117,6 +117,10 @@ cl_int Program::build(
NEO::CompilerOptions::concatenateAppend(internalOptions, NEO::DebugManager.flags.InjectInternalBuildOptions.get());
}
if (this->enforceFallbackToPatchtokens) {
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::disableZebin);
}
inputArgs.apiOptions = ArrayRef<const char>(options.c_str(), options.length());
inputArgs.internalOptions = ArrayRef<const char>(internalOptions.c_str(), internalOptions.length());
inputArgs.GTPinInput = gtpinGetIgcInit();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2022 Intel Corporation
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -78,6 +78,9 @@ T *Program::create(
}
program = new T(pContext, false, pContext->getDevices());
if (ail) {
ail->forceFallbackToPatchtokensIfRequired(combinedString, program->enforceFallbackToPatchtokens);
}
program->sourceCode.swap(combinedString);
program->createdFrom = CreatedFrom::SOURCE;
}

View File

@@ -371,6 +371,7 @@ class Program : public BaseObject<_cl_program> {
bool isBuiltIn = false;
bool kernelDebugEnabled = false;
bool enforceFallbackToPatchtokens = false;
uint32_t maxRootDeviceIndex = std::numeric_limits<uint32_t>::max();
std::mutex lockMutex;
uint32_t exposedKernels = 0;