Ocloc: New AOT approach implementation

Ocloc will handle any new values that may be
passed to the -device argument.

Supported acronyms are available under cmd:
ocloc compile --help

Supported patterns:
- device acronym
- release acronym
- family acronym
- version (major.minor.revision)

Fatbinary will no longer handle major.minor.revision variances,
only acronyms allowed.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
This commit is contained in:
Daria Hinz
2022-05-13 10:00:27 +00:00
committed by Compute-Runtime-Automation
parent 552c91bf07
commit a44f1b43aa
76 changed files with 1966 additions and 1866 deletions

View File

@@ -2034,13 +2034,14 @@ HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromNativeBinaryThenSetsUpPacked
PatchTokensTestData::ValidEmptyProgram programTokens;
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(productFamily);
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo;
auto productConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
AheadOfTimeConfig aotConfig = {0};
aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
NEO::Ar::ArEncoder encoder;
std::string requiredProduct = NEO::hardwarePrefix[productFamily];
std::string requiredStepping = std::to_string(programTokens.header->SteppingId);
std::string requiredPointerSize = (programTokens.header->GPUPointerSizeInBytes == 4) ? "32" : "64";
std::string requiredProductConfig = NEO::ProductConfigHelper::parseMajorMinorRevisionValue(productConfig);
std::string requiredProductConfig = ProductConfigHelper::parseMajorMinorRevisionValue(aotConfig);
ASSERT_TRUE(encoder.appendFileEntry(requiredPointerSize, programTokens.storage));
ASSERT_TRUE(encoder.appendFileEntry(requiredPointerSize + "." + requiredProduct, programTokens.storage));
@@ -2049,7 +2050,7 @@ HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromNativeBinaryThenSetsUpPacked
NEO::TargetDevice target;
target.coreFamily = static_cast<GFXCORE_FAMILY>(programTokens.header->Device);
target.productConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
target.aotConfig.ProductConfig = hwInfoConfig.getProductConfigFromHwInfo(hwInfo);
target.stepping = programTokens.header->SteppingId;
target.maxPointerSizeInBytes = programTokens.header->GPUPointerSizeInBytes;