diff --git a/unit_tests/CMakeLists.txt b/unit_tests/CMakeLists.txt index 11a65d40a4..f914871566 100644 --- a/unit_tests/CMakeLists.txt +++ b/unit_tests/CMakeLists.txt @@ -381,11 +381,19 @@ foreach(GEN_NUM RANGE ${MAX_GEN}) if(MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 8) neo_gen_kernels(test_kernels_${PLATFORM_IT_LOWER} ${PLATFORM_IT_LOWER} ${TEST_KERNELS}) neo_gen_kernel_with_options(test_kernel_${PLATFORM_IT_LOWER} ${PLATFORM_IT_LOWER} ${TEST_KERNEL} ${TEST_KERNEL_options}) - neo_gen_kernel_with_internal_options(test_kernel_internal_options_${PLATFORM_IT_LOWER} ${PLATFORM_IT_LOWER} ${TEST_KERNEL} ${TEST_KERNEL_internal_options}) + + # Temporarily disabled debug kernel generation on gen8 + if(NOT ("gen${GEN_NUM}" STREQUAL "gen8")) + neo_gen_kernel_with_internal_options(test_kernel_internal_options_${PLATFORM_IT_LOWER} ${PLATFORM_IT_LOWER} ${TEST_KERNEL} ${TEST_KERNEL_internal_options}) + endif() add_dependencies(unit_tests test_kernels_${PLATFORM_IT_LOWER}) add_dependencies(unit_tests test_kernel_${PLATFORM_IT_LOWER}) - add_dependencies(unit_tests test_kernel_internal_options_${PLATFORM_IT_LOWER}) + + # Temporarily disabled debug kernel generation on gen8 + if(NOT ("gen${GEN_NUM}" STREQUAL "gen8")) + add_dependencies(unit_tests test_kernel_internal_options_${PLATFORM_IT_LOWER}) + endif() set(sip_kernel_file_name) set(sip_kernel_output_file) diff --git a/unit_tests/program/program_with_kernel_debug_tests.cpp b/unit_tests/program/program_with_kernel_debug_tests.cpp index 62ebfe8ed9..297cf8e2ef 100644 --- a/unit_tests/program/program_with_kernel_debug_tests.cpp +++ b/unit_tests/program/program_with_kernel_debug_tests.cpp @@ -77,40 +77,46 @@ class ProgramWithKernelDebuggingTest : public ProgramSimpleFixture, }; TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenInternalOptionsIncludeDebugFlag) { - std::string receivedInternalOptions; + if (pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE) { + std::string receivedInternalOptions; - auto debugVars = OCLRT::getFclDebugVars(); - debugVars.receivedInternalOptionsOutput = &receivedInternalOptions; - gEnvironment->fclPushDebugVars(debugVars); + auto debugVars = OCLRT::getFclDebugVars(); + debugVars.receivedInternalOptionsOutput = &receivedInternalOptions; + gEnvironment->fclPushDebugVars(debugVars); - cl_int retVal = pProgram->compile(1, &device, nullptr, - 0, nullptr, nullptr, - nullptr, - nullptr); - EXPECT_EQ(CL_SUCCESS, retVal); + cl_int retVal = pProgram->compile(1, &device, nullptr, + 0, nullptr, nullptr, + nullptr, + nullptr); + EXPECT_EQ(CL_SUCCESS, retVal); - EXPECT_THAT(receivedInternalOptions, ::testing::HasSubstr(CompilerOptions::debugKernelEnable)); - gEnvironment->fclPopDebugVars(); + EXPECT_THAT(receivedInternalOptions, ::testing::HasSubstr(CompilerOptions::debugKernelEnable)); + gEnvironment->fclPopDebugVars(); + } } TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenInternalOptionsIncludeDebugFlag) { - std::string receivedInternalOptions; + if (pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE) { + std::string receivedInternalOptions; - auto debugVars = OCLRT::getFclDebugVars(); - debugVars.receivedInternalOptionsOutput = &receivedInternalOptions; - gEnvironment->fclPushDebugVars(debugVars); + auto debugVars = OCLRT::getFclDebugVars(); + debugVars.receivedInternalOptionsOutput = &receivedInternalOptions; + gEnvironment->fclPushDebugVars(debugVars); - cl_int retVal = pProgram->build(1, &device, nullptr, nullptr, nullptr, false); - EXPECT_EQ(CL_SUCCESS, retVal); + cl_int retVal = pProgram->build(1, &device, nullptr, nullptr, nullptr, false); + EXPECT_EQ(CL_SUCCESS, retVal); - EXPECT_THAT(receivedInternalOptions, ::testing::HasSubstr(CompilerOptions::debugKernelEnable)); - gEnvironment->fclPopDebugVars(); + EXPECT_THAT(receivedInternalOptions, ::testing::HasSubstr(CompilerOptions::debugKernelEnable)); + gEnvironment->fclPopDebugVars(); + } } TEST_F(ProgramWithKernelDebuggingTest, givenProgramWithKernelDebugEnabledWhenBuiltThenPatchTokenAllocateSipSurfaceHasSizeGreaterThanZero) { - retVal = pProgram->build(1, &device, CompilerOptions::debugKernelEnable, nullptr, nullptr, false); - EXPECT_EQ(CL_SUCCESS, retVal); + if (pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE) { + retVal = pProgram->build(1, &device, CompilerOptions::debugKernelEnable, nullptr, nullptr, false); + EXPECT_EQ(CL_SUCCESS, retVal); - auto kernelInfo = pProgram->getKernelInfo("CopyBuffer"); - EXPECT_NE(0u, kernelInfo->patchInfo.pAllocateSystemThreadSurface->PerThreadSystemThreadSurfaceSize); + auto kernelInfo = pProgram->getKernelInfo("CopyBuffer"); + EXPECT_NE(0u, kernelInfo->patchInfo.pAllocateSystemThreadSurface->PerThreadSystemThreadSurfaceSize); + } }