diff --git a/level_zero/tools/test/unit_tests/sources/debug/debug_session_thread_tests.cpp b/level_zero/tools/test/unit_tests/sources/debug/debug_session_thread_tests.cpp index 6e623309cb..f572baa00e 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/debug_session_thread_tests.cpp +++ b/level_zero/tools/test/unit_tests/sources/debug/debug_session_thread_tests.cpp @@ -490,10 +490,8 @@ TEST(DebugSession, givenDifferentThreadsWhenGettingPerThreadScratchOffsetThenCor NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); Mock deviceImp(neoDevice, neoDevice->getExecutionEnvironment()); auto debugSession = std::make_unique(zet_debug_config_t{0x1234}, &deviceImp); - auto &productHelper = neoDevice->getProductHelper(); - const uint32_t multiplyFactor = productHelper.getThreadEuRatioForScratch(hwInfo) / 8u; - const uint32_t numThreadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount) * multiplyFactor; + const uint32_t numThreadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount); EuThread::ThreadId thread0Eu0 = {0, 0, 0, 0, 0}; EuThread::ThreadId thread0Eu1 = {0, 0, 0, 1, 0}; EuThread::ThreadId thread2Subslice1 = {0, 0, 1, 0, 2}; diff --git a/opencl/test/unit_test/xe_hpc_core/pvc/command_stream_receiver_hw_tests_pvc.cpp b/opencl/test/unit_test/xe_hpc_core/pvc/command_stream_receiver_hw_tests_pvc.cpp index 2084636cf9..1e5a87e28e 100644 --- a/opencl/test/unit_test/xe_hpc_core/pvc/command_stream_receiver_hw_tests_pvc.cpp +++ b/opencl/test/unit_test/xe_hpc_core/pvc/command_stream_receiver_hw_tests_pvc.cpp @@ -288,7 +288,7 @@ PVCTEST_F(PvcMultiRootDeviceCommandStreamReceiverBufferTests, givenMultipleEvent csHwParser.parseCommands(pCmdQ1->getCS(0)); auto semaphores = findAll(csHwParser.cmdList.begin(), csHwParser.cmdList.end()); - EXPECT_EQ(2u, semaphores.size()); + EXPECT_EQ(3u, semaphores.size()); auto semaphoreCmd0 = genCmdCast(*(semaphores[0])); EXPECT_EQ(1u, semaphoreCmd0->getSemaphoreDataDword()); @@ -316,7 +316,7 @@ PVCTEST_F(PvcMultiRootDeviceCommandStreamReceiverBufferTests, givenMultipleEvent csHwParser.parseCommands(pCmdQ2->getCS(0)); auto semaphores = findAll(csHwParser.cmdList.begin(), csHwParser.cmdList.end()); - EXPECT_EQ(2u, semaphores.size()); + EXPECT_EQ(3u, semaphores.size()); auto semaphoreCmd0 = genCmdCast(*(semaphores[0])); EXPECT_EQ(1u, semaphoreCmd0->getSemaphoreDataDword()); diff --git a/shared/source/gen9/hw_info_cfl.cpp b/shared/source/gen9/hw_info_cfl.cpp index 8e1db4d059..27d829d2e0 100644 --- a/shared/source/gen9/hw_info_cfl.cpp +++ b/shared/source/gen9/hw_info_cfl.cpp @@ -7,7 +7,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen9/cfl/device_ids_configs_cfl.h" #include "shared/source/gen9/hw_cmds_cfl.h" #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" @@ -24,11 +23,11 @@ const PLATFORM CFL::platform = { PCH_UNKNOWN, IGFX_GEN9_CORE, IGFX_GEN9_CORE, - PLATFORM_NONE, // default init - cflDeviceIds[0], // usDeviceID - 9, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH + PLATFORM_NONE, // default init + 0, // usDeviceID + 9, // usRevId. 0 sets the stepping to A0 + 0, // usDeviceID_PCH + 0, // usRevId_PCH GTTYPE_UNDEFINED}; const RuntimeCapabilityTable CFL::capabilityTable{ diff --git a/shared/source/gen9/hw_info_kbl.cpp b/shared/source/gen9/hw_info_kbl.cpp index e38b0437c3..15b0d69416 100644 --- a/shared/source/gen9/hw_info_kbl.cpp +++ b/shared/source/gen9/hw_info_kbl.cpp @@ -8,7 +8,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen9/hw_cmds_kbl.h" -#include "shared/source/gen9/kbl/device_ids_configs_kbl.h" #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" @@ -24,11 +23,11 @@ const PLATFORM KBL::platform = { PCH_UNKNOWN, IGFX_GEN9_CORE, IGFX_GEN9_CORE, - PLATFORM_NONE, // default init - kblDeviceIds[0], // usDeviceID - 9, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH + PLATFORM_NONE, // default init + 0, // usDeviceID + 9, // usRevId. 0 sets the stepping to A0 + 0, // usDeviceID_PCH + 0, // usRevId_PCH GTTYPE_UNDEFINED}; const RuntimeCapabilityTable KBL::capabilityTable{ diff --git a/shared/source/xe_hpc_core/hw_info_pvc.cpp b/shared/source/xe_hpc_core/hw_info_pvc.cpp index b5024276af..02871891b6 100644 --- a/shared/source/xe_hpc_core/hw_info_pvc.cpp +++ b/shared/source/xe_hpc_core/hw_info_pvc.cpp @@ -12,7 +12,6 @@ #include "shared/source/helpers/constants.h" #include "shared/source/unified_memory/usm_memory_support.h" #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" -#include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h" #include "aubstream/engine_node.h" #include "platforms.h" @@ -26,11 +25,11 @@ const PLATFORM PVC::platform = { PCH_UNKNOWN, IGFX_XE_HPC_CORE, IGFX_XE_HPC_CORE, - PLATFORM_NONE, // default init - pvcXtDeviceIds[0], // usDeviceID - 3, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH + PLATFORM_NONE, // default init + 0, // usDeviceID + 0, // usRevId. 0 sets the stepping to A0 + 0, // usDeviceID_PCH + 0, // usRevId_PCH GTTYPE_UNDEFINED}; const RuntimeCapabilityTable PVC::capabilityTable{ diff --git a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_pvc_and_later.cpp b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_pvc_and_later.cpp index a3d6ab07c7..0003561077 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_pvc_and_later.cpp +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_pvc_and_later.cpp @@ -14,6 +14,7 @@ #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/test_macros/test.h" +#include "shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h" #include "shared/test/unit_test/fixtures/command_container_fixture.h" #include "shared/test/unit_test/mocks/mock_dispatch_kernel_encoder_interface.h" @@ -97,3 +98,39 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTestPvcAndLater, givenCommandCon auto cmd = genCmdCast(*itorCmd); EXPECT_EQ(productHelper.isGrfNumReportedWithScm(), cmd->getLargeGrfMode()); } + +using CommandEncodeStatesTestHpc = Test; +HWTEST2_F(CommandEncodeStatesTestHpc, GivenVariousSlmTotalSizesAndSettingRevIDToDifferentValuesWhenSetAdditionalInfoIsCalledThenCorrectValuesAreSet, IsPVC) { + using PREFERRED_SLM_ALLOCATION_SIZE = typename FamilyType::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE; + + const std::vector> valuesToTest = { + {0, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K}, + {16 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_16K}, + {32 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_32K}, + {64 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_64K}, + {96 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K}, + {128 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_128K}, + }; + + const std::vector> valuesToTestForPvcAStep = { + {0, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_16K}, + {16 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_16K}, + {32 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_32K}, + {64 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_64K}, + {96 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K}, + {128 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_128K}, + }; + + const std::array revs{REVISION_A0, REVISION_B, REVISION_C, REVISION_D, REVISION_K}; + auto &hwInfo = *pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); + auto &productHelper = pDevice->getRootDeviceEnvironment().getProductHelper(); + + for (auto rev : revs) { + hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(rev, hwInfo); + if ((hwInfo.platform.eProductFamily == IGFX_PVC) && (rev == REVISION_A0)) { + verifyPreferredSlmValues(valuesToTestForPvcAStep, pDevice->getRootDeviceEnvironment()); + } else { + verifyPreferredSlmValues(valuesToTest, pDevice->getRootDeviceEnvironment()); + } + } +} diff --git a/shared/test/unit_test/helpers/hw_aot_config_tests.cpp b/shared/test/unit_test/helpers/hw_aot_config_tests.cpp index 6351cd24f6..6fb3c7ae05 100644 --- a/shared/test/unit_test/helpers/hw_aot_config_tests.cpp +++ b/shared/test/unit_test/helpers/hw_aot_config_tests.cpp @@ -41,12 +41,4 @@ HWTEST2_P(ProductConfigHwInfoTests, givenAotConfigWhenGetProductConfigThenCorrec hwInfo.ipVersion.revision = aotConfig.revision; auto ret = productHelper->getProductConfigFromHwInfo(hwInfo); EXPECT_EQ(ret, productConfig); -} - -TEST(ProductConfigHwInfoTest, givenDefaultAotConfigWhenGetProductConfigThenSameValueIsReturned) { - MockExecutionEnvironment mockExecutionEnvironment{}; - auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper(); - auto hwInfo = *defaultHwInfo; - auto ret = productHelper.getProductConfigFromHwInfo(hwInfo); - EXPECT_EQ(ret, hwInfo.ipVersion.value); -} +} \ No newline at end of file diff --git a/shared/test/unit_test/xe_hpc_core/pvc/gfx_core_helper_tests_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/gfx_core_helper_tests_pvc.cpp index 0aa61ff171..39271c0b1e 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/gfx_core_helper_tests_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/gfx_core_helper_tests_pvc.cpp @@ -8,7 +8,6 @@ #include "shared/source/command_container/command_encoder.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" -#include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h" #include "shared/test/common/cmd_parse/hw_parse.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/gfx_core_helper_tests.h" @@ -34,7 +33,6 @@ PVCTEST_F(GfxCoreHelperTestsPvc, givenRevisionEnumAndPlatformFamilyTypeThenPrope const auto &productHelper = getHelper(); for (auto stepping : steppings) { - hardwareInfo.platform.usDeviceID = pvcXlDeviceIds[0]; hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(stepping, hardwareInfo); if (stepping == REVISION_A0) { @@ -63,14 +61,14 @@ PVCTEST_F(GfxCoreHelperTestsPvc, givenRevisionEnumAndPlatformFamilyTypeThenPrope } PVCTEST_F(GfxCoreHelperTestsPvc, givenDefaultMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) { - EXPECT_EQ(sizeof(typename FamilyType::MI_MEM_FENCE), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); + EXPECT_EQ(NEO::EncodeSemaphore::getSizeMiSemaphoreWait(), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); } PVCTEST_F(GfxCoreHelperTestsPvc, givenDebugMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) { DebugManagerStateRestore restorer; DebugManager.flags.DisablePipeControlPrecedingPostSyncCommand.set(1); - EXPECT_EQ(2 * sizeof(typename FamilyType::MI_MEM_FENCE), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); + EXPECT_EQ(2 * NEO::EncodeSemaphore::getSizeMiSemaphoreWait(), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment())); } PVCTEST_F(GfxCoreHelperTestsPvc, givenRevisionIdWhenGetComputeUnitsUsedForScratchThenReturnValidValue) { diff --git a/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp index 122ef37d7e..408b62af96 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp @@ -9,13 +9,11 @@ #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" #include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h" #include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/test_macros/header/per_product_test_definitions.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h" #include "shared/test/unit_test/fixtures/command_container_fixture.h" #include "shared/test/unit_test/mocks/mock_dispatch_kernel_encoder_interface.h" @@ -134,76 +132,4 @@ PVCTEST_F(EncodeKernelPvcTest, givenRevisionBAndAboveWhenSpecialModeRequiredAndA cmdContainer->reset(); } } -} -using CommandEncodeStatesTestPvc = Test; -PVCTEST_F(CommandEncodeStatesTestPvc, GivenVariousSlmTotalSizesAndSettingRevIDToDifferentValuesWhenSetAdditionalInfoIsCalledThenCorrectValuesAreSet) { - using PREFERRED_SLM_ALLOCATION_SIZE = typename FamilyType::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE; - - const std::vector> valuesToTest = { - {0, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K}, - {16 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_16K}, - {32 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_32K}, - {64 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_64K}, - {96 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K}, - {128 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_128K}, - }; - - const std::vector> valuesToTestForPvcAStep = { - {0, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_16K}, - {16 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_16K}, - {32 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_32K}, - {64 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_64K}, - {96 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K}, - {128 * KB, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_128K}, - }; - - const std::array revs{REVISION_A0, REVISION_B, REVISION_C, REVISION_D, REVISION_K}; - auto &hwInfo = *pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); - auto &productHelper = pDevice->getRootDeviceEnvironment().getProductHelper(); - - hwInfo.platform.usDeviceID = pvcXlDeviceIds[0]; - for (auto rev : revs) { - hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(rev, hwInfo); - if ((hwInfo.platform.eProductFamily == IGFX_PVC) && (rev == REVISION_A0)) { - verifyPreferredSlmValues(valuesToTestForPvcAStep, pDevice->getRootDeviceEnvironment()); - } else { - verifyPreferredSlmValues(valuesToTest, pDevice->getRootDeviceEnvironment()); - } - } -} - -PVCTEST_F(EncodeKernelPvcTest, givenDefaultSettingForFenceAsPostSyncOperationInComputeWalkerWhenEnqueueKernelIsCalledThenDoNotGenerateFenceCommands) { - using WALKER_TYPE = typename FamilyType::WALKER_TYPE; - using MI_MEM_FENCE = typename FamilyType::MI_MEM_FENCE; - - DebugManagerStateRestore restore; - DebugManager.flags.ProgramGlobalFenceAsPostSyncOperationInComputeWalker.set(-1); - - auto &hwInfo = *pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); - auto &productHelper = pDevice->getProductHelper(); - - hwInfo.platform.usDeviceID = pvcXlDeviceIds[0]; - VariableBackup hwRevId{&hwInfo.platform.usRevId}; - hwRevId = productHelper.getHwRevIdFromStepping(REVISION_A0, hwInfo); - - uint32_t dims[] = {1, 1, 1}; - std::unique_ptr dispatchInterface(new MockDispatchKernelEncoder()); - dispatchInterface->getCrossThreadDataSizeResult = 0u; - - bool requiresUncachedMocs = false; - EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); - dispatchArgs.isKernelUsingSystemAllocation = true; - dispatchArgs.isHostScopeSignalEvent = true; - - EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); - - GenCmdList commands; - CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); - - auto itor = find(commands.begin(), commands.end()); - ASSERT_NE(itor, commands.end()); - - auto walkerCmd = genCmdCast(*itor); - auto &postSyncData = walkerCmd->getPostSync(); - EXPECT_FALSE(postSyncData.getSystemMemoryFenceRequest()); -} +} \ No newline at end of file diff --git a/shared/test/unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp index f36d5ac032..337e0d95f7 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp @@ -49,7 +49,6 @@ PVCTEST_F(PvcProductHelper, givenPVCRevId0WhenGettingThreadEuRatioForScratchThen PVCTEST_F(PvcProductHelper, givenPVCWithDifferentSteppingsThenImplicitScalingIsEnabledForBAndHigher) { auto hwInfo = *defaultHwInfo; - hwInfo.platform.usDeviceID = pvcXlDeviceIds[0]; for (uint32_t stepping = 0; stepping < 0x10; stepping++) { auto hwRevIdFromStepping = productHelper->getHwRevIdFromStepping(stepping, hwInfo); diff --git a/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp index 40f29b320c..f1077c235c 100644 --- a/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp @@ -14,6 +14,7 @@ #include "shared/source/kernel/kernel_descriptor.h" #include "shared/source/os_interface/product_helper.h" #include "shared/test/common/cmd_parse/gen_cmd_parse.h" +#include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/test_macros/header/per_product_test_definitions.h" @@ -359,6 +360,41 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenFenceAsPostSyncOperationInComp EXPECT_TRUE(postSyncData.getSystemMemoryFenceRequest()); } +XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceAsPostSyncOperationInComputeWalkerWhenEnqueueKernelIsCalledThenDoNotGenerateFenceCommands) { + using WALKER_TYPE = typename FamilyType::WALKER_TYPE; + using MI_MEM_FENCE = typename FamilyType::MI_MEM_FENCE; + + DebugManagerStateRestore restore; + DebugManager.flags.ProgramGlobalFenceAsPostSyncOperationInComputeWalker.set(-1); + + auto &hwInfo = *pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); + auto &productHelper = pDevice->getProductHelper(); + + VariableBackup hwRevId{&hwInfo.platform.usRevId}; + hwRevId = productHelper.getHwRevIdFromStepping(REVISION_A0, hwInfo); + + uint32_t dims[] = {1, 1, 1}; + std::unique_ptr dispatchInterface(new MockDispatchKernelEncoder()); + dispatchInterface->getCrossThreadDataSizeResult = 0u; + + bool requiresUncachedMocs = false; + EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); + dispatchArgs.isKernelUsingSystemAllocation = true; + dispatchArgs.isHostScopeSignalEvent = true; + + EncodeDispatchKernel::encode(*cmdContainer.get(), dispatchArgs, nullptr); + + GenCmdList commands; + CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); + + auto itor = find(commands.begin(), commands.end()); + ASSERT_NE(itor, commands.end()); + + auto walkerCmd = genCmdCast(*itor); + auto &postSyncData = walkerCmd->getPostSync(); + EXPECT_FALSE(postSyncData.getSystemMemoryFenceRequest()); +} + XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenKernelUsesSystemMemoryFlagTrueAndNoHostSignalEventThenNotUseSystemFence) { using WALKER_TYPE = typename FamilyType::WALKER_TYPE; diff --git a/target_unit_tests/xe_hpc_core/pvc/enable_pvc_testing.cmake b/target_unit_tests/xe_hpc_core/pvc/enable_pvc_testing.cmake index 308add06fa..0e588ed508 100644 --- a/target_unit_tests/xe_hpc_core/pvc/enable_pvc_testing.cmake +++ b/target_unit_tests/xe_hpc_core/pvc/enable_pvc_testing.cmake @@ -5,6 +5,6 @@ # if(TESTS_PVC) - set(unit_test_config "pvc/2/4/5/3") # non-zero values for unit tests + set(unit_test_config "pvc/2/4/5/0") # non-zero values for unit tests include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) endif()