Store device binary per root device in program

Related-To: NEO-5001
Change-Id: I9834f6894625031c734c68ebf210e6042c470ec7
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-10-08 11:36:31 +02:00
committed by sys_ocldev
parent 9c1b818598
commit fc090f74c6
20 changed files with 194 additions and 178 deletions

View File

@@ -154,11 +154,12 @@ void ProgramDataTestBase::buildAndDecodeProgramPatchList() {
memcpy_s(pCurPtr, programPatchListSize, pProgramPatchList, programPatchListSize);
pCurPtr += programPatchListSize;
auto rootDeviceIndex = pPlatform->getClDevice(0)->getRootDeviceIndex();
//as we use mock compiler in unit test, replace the genBinary here.
pProgram->unpackedDeviceBinary = makeCopy(pProgramData, headerSize + programBinaryHeader.PatchListSize);
pProgram->unpackedDeviceBinarySize = headerSize + programBinaryHeader.PatchListSize;
pProgram->buildInfos[rootDeviceIndex].unpackedDeviceBinary = makeCopy(pProgramData, headerSize + programBinaryHeader.PatchListSize);
pProgram->buildInfos[rootDeviceIndex].unpackedDeviceBinarySize = headerSize + programBinaryHeader.PatchListSize;
error = pProgram->processGenBinary();
error = pProgram->processGenBinary(rootDeviceIndex);
patchlistDecodeErrorCode = error;
if (allowDecodeFailure == false) {
EXPECT_EQ(CL_SUCCESS, error);