fix: disable support for deprecated patchtokens format

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-09-24 10:45:22 +00:00
committed by Compute-Runtime-Automation
parent 3dad0b3e92
commit 506d5837df
5 changed files with 20 additions and 19 deletions

View File

@@ -242,7 +242,7 @@ TEST_F(ClBuildProgramTests, GivenProgramCreatedFromBinaryWhenBuildProgramWithOpt
EXPECT_EQ(CL_SUCCESS, retVal);
}
TEST_F(ClBuildProgramTests, GivenSpirAsInputWhenCreatingProgramFromBinaryThenProgramBuildSucceeds) {
TEST_F(ClBuildProgramTests, GivenSpirAsInputWhenCreatingProgramFromBinaryThenProgramBuildFails) {
cl_program pProgram = nullptr;
cl_int binaryStatus = CL_SUCCESS;
unsigned char llvm[16] = "BC\xc0\xde_unique";
@@ -280,7 +280,7 @@ TEST_F(ClBuildProgramTests, GivenSpirAsInputWhenCreatingProgramFromBinaryThenPro
nullptr);
setIgcDebugVars(prevDebugVars);
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(CL_INVALID_BINARY, retVal);
retVal = clReleaseProgram(pProgram);
EXPECT_EQ(CL_SUCCESS, retVal);

View File

@@ -179,11 +179,11 @@ void ProgramDataTestBase::buildAndDecodeProgramPatchList() {
using ProgramDataTest = ProgramDataTestBase;
TEST_F(ProgramDataTest, GivenEmptyProgramBinaryHeaderWhenBuildingAndDecodingThenSuccessIsReturned) {
TEST_F(ProgramDataTest, DISABLED_GivenEmptyProgramBinaryHeaderWhenBuildingAndDecodingThenSuccessIsReturned) {
buildAndDecodeProgramPatchList();
}
TEST_F(ProgramDataTest, WhenAllocatingConstantMemorySurfaceThenUnderlyingBufferIsSetCorrectly) {
TEST_F(ProgramDataTest, DISABLED_WhenAllocatingConstantMemorySurfaceThenUnderlyingBufferIsSetCorrectly) {
auto constSize = setupConstantAllocation();
@@ -195,7 +195,7 @@ TEST_F(ProgramDataTest, WhenAllocatingConstantMemorySurfaceThenUnderlyingBufferI
EXPECT_EQ(0, memcmp(constValue, surface->getUnderlyingBuffer(), constSize));
}
TEST_F(ProgramDataTest, givenProgramWhenAllocatingConstantMemorySurfaceThenProperDeviceBitfieldIsPassed) {
TEST_F(ProgramDataTest, DISABLED_givenProgramWhenAllocatingConstantMemorySurfaceThenProperDeviceBitfieldIsPassed) {
auto executionEnvironment = pClDevice->getExecutionEnvironment();
auto memoryManager = new MockMemoryManager(*executionEnvironment);
@@ -497,7 +497,7 @@ TEST_F(ProgramDataBindlessTest, givenBindlessKernelAndGlobalVariablesMemorySurfa
EXPECT_EQ(nullptr, ssInHeap.heapAllocation);
}
TEST_F(ProgramDataTest, givenConstantAllocationThatIsInUseByGpuWhenProgramIsBeingDestroyedThenItIsAddedToTemporaryAllocationList) {
TEST_F(ProgramDataTest, DISABLED_givenConstantAllocationThatIsInUseByGpuWhenProgramIsBeingDestroyedThenItIsAddedToTemporaryAllocationList) {
setupConstantAllocation();
@@ -517,7 +517,7 @@ TEST_F(ProgramDataTest, givenConstantAllocationThatIsInUseByGpuWhenProgramIsBein
EXPECT_EQ(constantSurface, csr.getDeferredAllocations().peekHead());
}
TEST_F(ProgramDataTest, givenGlobalAllocationThatIsInUseByGpuWhenProgramIsBeingDestroyedThenItIsAddedToTemporaryAllocationList) {
TEST_F(ProgramDataTest, DISABLED_givenGlobalAllocationThatIsInUseByGpuWhenProgramIsBeingDestroyedThenItIsAddedToTemporaryAllocationList) {
setupGlobalAllocation();
buildAndDecodeProgramPatchList();
@@ -536,7 +536,7 @@ TEST_F(ProgramDataTest, givenGlobalAllocationThatIsInUseByGpuWhenProgramIsBeingD
EXPECT_EQ(globalSurface, csr.getDeferredAllocations().peekHead());
}
TEST_F(ProgramDataTest, GivenDeviceForcing32BitMessagesWhenConstAllocationIsPresentInProgramBinariesThen32BitStorageIsAllocated) {
TEST_F(ProgramDataTest, DISABLED_GivenDeviceForcing32BitMessagesWhenConstAllocationIsPresentInProgramBinariesThen32BitStorageIsAllocated) {
auto constSize = setupConstantAllocation();
this->pContext->getDevice(0)->getMemoryManager()->setForce32BitAllocations(true);
@@ -552,7 +552,7 @@ TEST_F(ProgramDataTest, GivenDeviceForcing32BitMessagesWhenConstAllocationIsPres
}
}
TEST_F(ProgramDataTest, WhenAllocatingGlobalMemorySurfaceThenUnderlyingBufferIsSetCorrectly) {
TEST_F(ProgramDataTest, DISABLED_WhenAllocatingGlobalMemorySurfaceThenUnderlyingBufferIsSetCorrectly) {
auto globalSize = setupGlobalAllocation();
buildAndDecodeProgramPatchList();
auto surface = pProgram->getGlobalSurface(pContext->getDevice(0)->getRootDeviceIndex());
@@ -561,7 +561,7 @@ TEST_F(ProgramDataTest, WhenAllocatingGlobalMemorySurfaceThenUnderlyingBufferIsS
EXPECT_EQ(0, memcmp(globalValue, surface->getUnderlyingBuffer(), globalSize));
}
TEST_F(ProgramDataTest, givenProgramWhenAllocatingGlobalMemorySurfaceThenProperDeviceBitfieldIsPassed) {
TEST_F(ProgramDataTest, DISABLED_givenProgramWhenAllocatingGlobalMemorySurfaceThenProperDeviceBitfieldIsPassed) {
auto executionEnvironment = pClDevice->getExecutionEnvironment();
auto memoryManager = new MockMemoryManager(*executionEnvironment);
@@ -577,7 +577,7 @@ TEST_F(ProgramDataTest, givenProgramWhenAllocatingGlobalMemorySurfaceThenProperD
std::swap(memoryManagerBackup, executionEnvironment->memoryManager);
}
TEST_F(ProgramDataTest, Given32BitDeviceWhenGlobalMemorySurfaceIsPresentThenItHas32BitStorage) {
TEST_F(ProgramDataTest, DISABLED_Given32BitDeviceWhenGlobalMemorySurfaceIsPresentThenItHas32BitStorage) {
char globalValue[] = "55667788";
size_t globalSize = strlen(globalValue) + 1;
this->pContext->getDevice(0)->getMemoryManager()->setForce32BitAllocations(true);

View File

@@ -2096,7 +2096,7 @@ TEST_F(ProgramTests, whenCreatingFromZebinThenDontAppendEnableZebinFlagToBuildOp
EXPECT_STREQ(expectedOptions, program->options.c_str());
}
TEST_F(ProgramTests, givenProgramFromGenBinaryWhenSLMSizeIsBiggerThenDeviceLimitThenPrintDebugMsgAndReturnError) {
TEST_F(ProgramTests, DISABLED_givenProgramFromGenBinaryWhenSLMSizeIsBiggerThenDeviceLimitThenPrintDebugMsgAndReturnError) {
DebugManagerStateRestore dbgRestorer;
debugManager.flags.PrintDebugMessages.set(true);
@@ -2121,7 +2121,7 @@ TEST_F(ProgramTests, givenProgramFromGenBinaryWhenSLMSizeIsBiggerThenDeviceLimit
EXPECT_EQ(expectedOutput, output);
}
TEST_F(ProgramTests, givenExistingConstantSurfacesWhenProcessGenBinaryThenCleanupTheSurfaceOnlyForSpecificDevice) {
TEST_F(ProgramTests, DISABLED_givenExistingConstantSurfacesWhenProcessGenBinaryThenCleanupTheSurfaceOnlyForSpecificDevice) {
PatchTokensTestData::ValidProgramWithKernelUsingSlm patchtokensProgram;
auto program = std::make_unique<MockProgram>(nullptr, false, toClDeviceVector(*pClDevice));
@@ -2149,7 +2149,7 @@ TEST_F(ProgramTests, givenExistingConstantSurfacesWhenProcessGenBinaryThenCleanu
EXPECT_EQ(CL_SUCCESS, retVal);
}
TEST_F(ProgramTests, givenExistingGlobalSurfacesWhenProcessGenBinaryThenCleanupTheSurfaceOnlyForSpecificDevice) {
TEST_F(ProgramTests, DISABLED_givenExistingGlobalSurfacesWhenProcessGenBinaryThenCleanupTheSurfaceOnlyForSpecificDevice) {
PatchTokensTestData::ValidProgramWithKernelUsingSlm patchtokensProgram;
auto program = std::make_unique<MockProgram>(nullptr, false, toClDeviceVector(*pClDevice));

View File

@@ -198,7 +198,8 @@ inline std::pair<DecodeError, DeviceBinaryFormat> decodeSingleDeviceBinary(Progr
ret.first = decodeSingleDeviceBinary<DeviceBinaryFormat::oclElf>(dst, src, outErrReason, outWarning, gfxCoreHelper);
} else if (isDeviceBinaryFormat<DeviceBinaryFormat::patchtokens>(src.deviceBinary)) {
ret.second = DeviceBinaryFormat::patchtokens;
ret.first = decodeSingleDeviceBinary<DeviceBinaryFormat::patchtokens>(dst, src, outErrReason, outWarning, gfxCoreHelper);
ret.first = DecodeError::invalidBinary;
outErrReason = "Deprecated format - patchtokens";
} else if (isDeviceBinaryFormat<DeviceBinaryFormat::archive>(src.deviceBinary)) {
ret.second = DeviceBinaryFormat::archive;
ret.first = decodeSingleDeviceBinary<DeviceBinaryFormat::archive>(dst, src, outErrReason, outWarning, gfxCoreHelper);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -289,7 +289,7 @@ TEST(DecodeSingleDeviceBinary, GivenUnknownFormatThenReturnFalse) {
EXPECT_STREQ("Unknown format", decodeErrors.c_str());
}
TEST(DecodeSingleDeviceBinary, GivenPatchTokensFormatThenDecodingSucceeds) {
TEST(DecodeSingleDeviceBinary, GivenPatchTokensFormatThenDecodingFails) {
NEO::MockExecutionEnvironment mockExecutionEnvironment{};
auto &gfxCoreHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<NEO::GfxCoreHelper>();
PatchTokensTestData::ValidEmptyProgram patchtokensProgram;
@@ -302,10 +302,10 @@ TEST(DecodeSingleDeviceBinary, GivenPatchTokensFormatThenDecodingSucceeds) {
NEO::DecodeError status;
NEO::DeviceBinaryFormat format;
std::tie(status, format) = NEO::decodeSingleDeviceBinary(programInfo, bin, decodeErrors, decodeWarnings, gfxCoreHelper);
EXPECT_EQ(NEO::DecodeError::success, status);
EXPECT_EQ(NEO::DecodeError::invalidBinary, status);
EXPECT_EQ(NEO::DeviceBinaryFormat::patchtokens, format);
EXPECT_TRUE(decodeWarnings.empty());
EXPECT_TRUE(decodeErrors.empty());
EXPECT_STREQ("Deprecated format - patchtokens", decodeErrors.c_str());
}
TEST(DecodeSingleDeviceBinary, GivenZebinFormatThenDecodingSucceeds) {