refactor(zebin): prioritize AOT config when validating

When validating zebin for target device. If AOT config (device
identification number) is present then use it for device validation,
and skip old checks (Core Family, Product Family).

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
Krystian Chmielewski
2023-01-23 12:11:56 +00:00
committed by Compute-Runtime-Automation
parent 0499a72451
commit 2ed168dc15
2 changed files with 8 additions and 9 deletions

View File

@@ -48,14 +48,14 @@ bool validateTargetDevice(const TargetDevice &targetDevice, Elf::ELF_IDENTIFIER_
return false;
}
if (gfxCore == IGFX_UNKNOWN_CORE && productFamily == IGFX_UNKNOWN && productConfig == AOT::UNKNOWN_ISA) {
if (productConfig != AOT::UNKNOWN_ISA) {
return targetDevice.aotConfig.value == productConfig;
}
if (gfxCore == IGFX_UNKNOWN_CORE && productFamily == IGFX_UNKNOWN) {
return false;
}
if (productConfig != AOT::UNKNOWN_ISA) {
if (targetDevice.aotConfig.value != productConfig) {
return false;
}
}
if (gfxCore != IGFX_UNKNOWN_CORE) {
if (targetDevice.coreFamily != gfxCore) {
return false;