diff --git a/opencl/test/unit_test/api/cl_build_program_tests.inl b/opencl/test/unit_test/api/cl_build_program_tests.inl index a9e22a4e93..9d959399a5 100644 --- a/opencl/test/unit_test/api/cl_build_program_tests.inl +++ b/opencl/test/unit_test/api/cl_build_program_tests.inl @@ -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); diff --git a/opencl/test/unit_test/program/program_data_tests.cpp b/opencl/test/unit_test/program/program_data_tests.cpp index 097b8022ac..18fd44a794 100644 --- a/opencl/test/unit_test/program/program_data_tests.cpp +++ b/opencl/test/unit_test/program/program_data_tests.cpp @@ -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); diff --git a/opencl/test/unit_test/program/program_tests.cpp b/opencl/test/unit_test/program/program_tests.cpp index e315f45746..38b554f799 100644 --- a/opencl/test/unit_test/program/program_tests.cpp +++ b/opencl/test/unit_test/program/program_tests.cpp @@ -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(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(nullptr, false, toClDeviceVector(*pClDevice)); diff --git a/shared/source/device_binary_format/device_binary_formats.h b/shared/source/device_binary_format/device_binary_formats.h index 7ee4f4aac8..c5547e09d7 100644 --- a/shared/source/device_binary_format/device_binary_formats.h +++ b/shared/source/device_binary_format/device_binary_formats.h @@ -198,7 +198,8 @@ inline std::pair decodeSingleDeviceBinary(Progr ret.first = decodeSingleDeviceBinary(dst, src, outErrReason, outWarning, gfxCoreHelper); } else if (isDeviceBinaryFormat(src.deviceBinary)) { ret.second = DeviceBinaryFormat::patchtokens; - ret.first = decodeSingleDeviceBinary(dst, src, outErrReason, outWarning, gfxCoreHelper); + ret.first = DecodeError::invalidBinary; + outErrReason = "Deprecated format - patchtokens"; } else if (isDeviceBinaryFormat(src.deviceBinary)) { ret.second = DeviceBinaryFormat::archive; ret.first = decodeSingleDeviceBinary(dst, src, outErrReason, outWarning, gfxCoreHelper); diff --git a/shared/test/unit_test/device_binary_format/device_binary_formats_tests.cpp b/shared/test/unit_test/device_binary_format/device_binary_formats_tests.cpp index a874795856..8684e610bf 100644 --- a/shared/test/unit_test/device_binary_format/device_binary_formats_tests.cpp +++ b/shared/test/unit_test/device_binary_format/device_binary_formats_tests.cpp @@ -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(); 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) {