32bit zebin support

This commit adds support for 32 bit zebinary in NEO runtime and in
ocloc validate.

Resolves: NEO-7288

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
Krystian Chmielewski
2022-09-22 11:03:51 +00:00
committed by Compute-Runtime-Automation
parent b5b9c3500f
commit 596e9f815c
16 changed files with 147 additions and 61 deletions

View File

@@ -56,8 +56,15 @@ int validate(const std::vector<std::string> &args, OclocArgHelper *argHelper) {
return -2;
}
auto elf = NEO::Elf::decodeElf<NEO::Elf::EI_CLASS_64>(deviceBinary, errors, warnings);
auto decodeResult = NEO::decodeZebin(programInfo, elf, errors, warnings);
NEO::DecodeError decodeResult;
if (NEO::Elf::isElf<NEO::Elf::EI_CLASS_32>(deviceBinary)) {
auto elf = NEO::Elf::decodeElf<NEO::Elf::EI_CLASS_32>(deviceBinary, errors, warnings);
decodeResult = NEO::decodeZebin(programInfo, elf, errors, warnings);
} else {
auto elf = NEO::Elf::decodeElf<NEO::Elf::EI_CLASS_64>(deviceBinary, errors, warnings);
decodeResult = NEO::decodeZebin(programInfo, elf, errors, warnings);
}
if (false == warnings.empty()) {
argHelper->printf("Validator detected potential problems :\n%s\n", warnings.c_str());
}