Zebin improvements

* cleaning-up per-thread buffer size calculations
* fixing default slm alignment to 16
* adding scratch space slots
* renaming slm addressing mode
* adding support for zeinfo version

Change-Id: I0450353788b8488a685976d7f1dd26a44360383c
This commit is contained in:
Jaroslaw Chodor
2020-10-04 19:18:49 +02:00
committed by sys_ocldev
parent 20f4786423
commit 345e56a151
19 changed files with 553 additions and 84 deletions

View File

@ -82,7 +82,8 @@ TEST(OclocValidate, WhenWarningsEmitedThenRedirectsThemToStdout) {
TEST(OclocValidate, WhenErrorsEmitedThenRedirectsThemToStdout) {
ZebinTestData::ValidEmptyProgram zebin;
zebin.removeSection(NEO::Elf::SHT_ZEBIN_ZEINFO, NEO::Elf::SectionsNamesZebin::zeInfo);
zebin.appendSection(NEO::Elf::SHT_ZEBIN_ZEINFO, NEO::Elf::SectionsNamesZebin::zeInfo, ArrayRef<const char>("kernels : \nkernels :\n").toArrayRef<const uint8_t>());
std::string zeInfo = "version:" + toString(NEO::zeInfoDecoderVersion) + "\nkernels : \nkernels :\n";
zebin.appendSection(NEO::Elf::SHT_ZEBIN_ZEINFO, NEO::Elf::SectionsNamesZebin::zeInfo, ArrayRef<const char>(zeInfo).toArrayRef<const uint8_t>());
MockOclocArgHelper::FilesMap files{{"src.gen", MockOclocArgHelper::FileData(reinterpret_cast<const char *>(zebin.storage.data()),
reinterpret_cast<const char *>(zebin.storage.data()) + zebin.storage.size())}};
MockOclocArgHelper argHelper{files};