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

@ -26,7 +26,7 @@ void ProgramWithZebinFixture::TearDown() {
}
void ProgramWithZebinFixture::addEmptyZebin(NEO::MockProgram *program) {
auto zebin = ZebinTestData::ValidEmptyProgram();
auto zebin = ZebinTestData::ValidEmptyProgram<>();
program->buildInfos[rootDeviceIndex].unpackedDeviceBinarySize = zebin.storage.size();
program->buildInfos[rootDeviceIndex].unpackedDeviceBinary.reset(new char[zebin.storage.size()]);
@ -36,7 +36,7 @@ void ProgramWithZebinFixture::addEmptyZebin(NEO::MockProgram *program) {
void ProgramWithZebinFixture::populateProgramWithSegments(NEO::MockProgram *program) {
kernelInfo = std::make_unique<KernelInfo>();
kernelInfo->kernelDescriptor.kernelMetadata.kernelName = ZebinTestData::ValidEmptyProgram::kernelName;
kernelInfo->kernelDescriptor.kernelMetadata.kernelName = ZebinTestData::ValidEmptyProgram<>::kernelName;
mockAlloc = std::make_unique<MockGraphicsAllocation>();
kernelInfo->kernelAllocation = mockAlloc.get();

View File

@ -40,7 +40,7 @@ TEST_F(ProgramWithZebinFixture, givenZebinSegmentsThenSegmentsArePopulated) {
};
checkGPUSeg(program->buildInfos[rootDeviceIndex].constantSurface, segments.constData);
checkGPUSeg(program->buildInfos[rootDeviceIndex].globalSurface, segments.varData);
checkGPUSeg(program->getKernelInfoArray(rootDeviceIndex)[0]->getGraphicsAllocation(), segments.nameToSegMap[ZebinTestData::ValidEmptyProgram::kernelName]);
checkGPUSeg(program->getKernelInfoArray(rootDeviceIndex)[0]->getGraphicsAllocation(), segments.nameToSegMap[ZebinTestData::ValidEmptyProgram<>::kernelName]);
EXPECT_EQ(reinterpret_cast<uintptr_t>(program->buildInfos[rootDeviceIndex].constStringSectionData.initData), segments.stringData.address);
EXPECT_EQ(reinterpret_cast<const char *>(program->buildInfos[rootDeviceIndex].constStringSectionData.initData), strings);