Ocloc: New AOT design 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-06-13 23:13:43 +00:00
committed by Compute-Runtime-Automation
parent 2a71266708
commit 6d365cbfc3
77 changed files with 1962 additions and 1869 deletions

View File

@@ -2036,13 +2036,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));
@@ -2051,7 +2052,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;