diff --git a/level_zero/core/source/module/module_imp.cpp b/level_zero/core/source/module/module_imp.cpp index e1b980d250..2b581947f4 100644 --- a/level_zero/core/source/module/module_imp.cpp +++ b/level_zero/core/source/module/module_imp.cpp @@ -17,6 +17,7 @@ #include "shared/source/device_binary_format/elf/elf_encoder.h" #include "shared/source/device_binary_format/elf/ocl_elf.h" #include "shared/source/helpers/api_specific_config.h" +#include "shared/source/helpers/compiler_hw_info_config.h" #include "shared/source/helpers/constants.h" #include "shared/source/helpers/kernel_helpers.h" #include "shared/source/helpers/string.h" @@ -240,7 +241,10 @@ bool ModuleTranslationUnit::createFromNativeBinary(const char *input, size_t inp UNRECOVERABLE_IF((nullptr == device) || (nullptr == device->getNEODevice())); auto productAbbreviation = NEO::hardwarePrefix[device->getNEODevice()->getHardwareInfo().platform.eProductFamily]; - NEO::TargetDevice targetDevice = NEO::targetDeviceFromHwInfo(device->getNEODevice()->getHardwareInfo()); + auto copyHwInfo = device->getNEODevice()->getHardwareInfo(); + const auto &compilerHwInfoConfig = *NEO::CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily); + compilerHwInfoConfig.adjustHwInfoForIgc(copyHwInfo); + NEO::TargetDevice targetDevice = NEO::targetDeviceFromHwInfo(copyHwInfo); std::string decodeErrors; std::string decodeWarnings; ArrayRef archive(reinterpret_cast(input), inputSize); diff --git a/level_zero/core/source/xe_hpc_core/l0_hw_helper_xe_hpc_core.cpp b/level_zero/core/source/xe_hpc_core/l0_hw_helper_xe_hpc_core.cpp index 334de646f4..24270fd45b 100644 --- a/level_zero/core/source/xe_hpc_core/l0_hw_helper_xe_hpc_core.cpp +++ b/level_zero/core/source/xe_hpc_core/l0_hw_helper_xe_hpc_core.cpp @@ -24,7 +24,6 @@ void populateFactoryTable>() { template <> bool L0HwHelperHw::isIpSamplingSupported(const NEO::HardwareInfo &hwInfo) const { - if (hwInfo.platform.usDeviceID == NEO::XE_HPC_CORE::pvcXtDeviceIds[0] || hwInfo.platform.usDeviceID == NEO::XE_HPC_CORE::pvcXtDeviceIds[1] || hwInfo.platform.usDeviceID == NEO::XE_HPC_CORE::pvcXtDeviceIds[2] || diff --git a/level_zero/core/test/unit_tests/sources/module/test_module.cpp b/level_zero/core/test/unit_tests/sources/module/test_module.cpp index 10de181dde..53af4e4458 100644 --- a/level_zero/core/test/unit_tests/sources/module/test_module.cpp +++ b/level_zero/core/test/unit_tests/sources/module/test_module.cpp @@ -2445,7 +2445,7 @@ TEST_F(ModuleWithZebinTest, givenNonZebinaryFormatWhenGettingDebugInfoThenDebugZ EXPECT_EQ(retCode, ZE_RESULT_SUCCESS); } -TEST_F(ModuleWithZebinTest, givenZebinWithKernelCallingExternalFunctionThenUpdateKernelsBarrierCount) { +HWTEST_F(ModuleWithZebinTest, givenZebinWithKernelCallingExternalFunctionThenUpdateKernelsBarrierCount) { ZebinTestData::ZebinWithExternalFunctionsInfo zebin; zebin.setProductFamily(static_cast(device->getHwInfo().platform.eProductFamily)); diff --git a/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdlist_xe_hpc_core.cpp b/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdlist_xe_hpc_core.cpp index 8a19abcabb..6ccb99dc80 100644 --- a/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdlist_xe_hpc_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdlist_xe_hpc_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -164,6 +164,10 @@ HWTEST2_F(CommandListEventFenceTestsXeHpcCore, givenCommandListWithProfilingEven using GfxFamily = typename NEO::GfxFamilyMapper::GfxFamily; using MI_MEM_FENCE = typename FamilyType::MI_MEM_FENCE; + if (defaultHwInfo->platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + auto commandList = std::make_unique>>(); commandList->initialize(device, NEO::EngineGroupType::Compute, 0u); ze_event_pool_desc_t eventPoolDesc = {}; diff --git a/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdqueue_xe_hpc_core.cpp b/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdqueue_xe_hpc_core.cpp index ca7f63dffe..a0cc858f4b 100644 --- a/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdqueue_xe_hpc_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdqueue_xe_hpc_core.cpp @@ -168,6 +168,10 @@ HWTEST2_F(CommandQueueCommandsPvc, whenExecuteCommandListsIsCalledThenAdditional GTEST_SKIP(); } + if (defaultHwInfo->platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + DebugManagerStateRestore restorer; DebugManager.flags.AllowMixingRegularAndCooperativeKernels.set(1); DebugManager.flags.AllowPatchingVfeStateInCommandLists.set(1); diff --git a/level_zero/core/test/unit_tests/xe_hpc_core/test_device_xe_hpc_core.cpp b/level_zero/core/test/unit_tests/xe_hpc_core/test_device_xe_hpc_core.cpp index 4de633f3f1..57c2c8da81 100644 --- a/level_zero/core/test/unit_tests/xe_hpc_core/test_device_xe_hpc_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpc_core/test_device_xe_hpc_core.cpp @@ -19,14 +19,18 @@ namespace ult { HWTEST_EXCLUDE_PRODUCT(AppendMemoryCopy, givenCopyOnlyCommandListAndHostPointersWhenMemoryCopyCalledThenPipeControlWithDcFlushAddedIsNotAddedAfterBlitCopy, IGFX_XE_HPC_CORE); -using DeviceTestPVC = Test; +using DeviceTestXeHpc = Test; -HWTEST2_F(DeviceTestPVC, whenCallingGetMemoryPropertiesWithNonNullPtrThenPropertiesAreReturned, IsXeHpcCore) { +HWTEST2_F(DeviceTestXeHpc, whenCallingGetMemoryPropertiesWithNonNullPtrThenPropertiesAreReturned, IsXeHpcCore) { uint32_t count = 0; ze_result_t res = device->getMemoryProperties(&count, nullptr); EXPECT_EQ(res, ZE_RESULT_SUCCESS); EXPECT_EQ(1u, count); + if (defaultHwInfo->platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + ze_device_memory_properties_t memProperties = {}; res = device->getMemoryProperties(&count, &memProperties); EXPECT_EQ(res, ZE_RESULT_SUCCESS); @@ -37,7 +41,7 @@ HWTEST2_F(DeviceTestPVC, whenCallingGetMemoryPropertiesWithNonNullPtrThenPropert EXPECT_EQ(memProperties.totalSize, this->neoDevice->getDeviceInfo().globalMemSize); } -HWTEST2_F(DeviceTestPVC, whenCallingGetMemoryPropertiesWithNonNullPtrAndBdRevisionIsNotA0ThenmaxClockRateReturnedIsZero, IsXeHpcCore) { +HWTEST2_F(DeviceTestXeHpc, whenCallingGetMemoryPropertiesWithNonNullPtrAndBdRevisionIsNotA0ThenmaxClockRateReturnedIsZero, IsXeHpcCore) { uint32_t count = 0; auto device = driverHandle->devices[0]; auto hwInfo = device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo(); @@ -55,7 +59,7 @@ HWTEST2_F(DeviceTestPVC, whenCallingGetMemoryPropertiesWithNonNullPtrAndBdRevisi EXPECT_EQ(memProperties.maxClockRate, 0u); } -HWTEST2_F(DeviceTestPVC, givenPvcAStepWhenCreatingMultiTileDeviceThenExpectImplicitScalingDisabled, IsXeHpcCore) { +HWTEST2_F(DeviceTestXeHpc, givenXeHpcAStepWhenCreatingMultiTileDeviceThenExpectImplicitScalingDisabled, IsXeHpcCore) { DebugManagerStateRestore restorer; DebugManager.flags.CreateMultipleSubDevices.set(2); VariableBackup apiSupportBackup(&NEO::ImplicitScaling::apiSupport, true); @@ -65,6 +69,10 @@ HWTEST2_F(DeviceTestPVC, givenPvcAStepWhenCreatingMultiTileDeviceThenExpectImpli auto hwInfo = *NEO::defaultHwInfo; hwInfo.platform.usRevId = 0x3; + if (hwInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + auto neoDevice = std::unique_ptr(NEO::MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); auto device = Device::create(driverHandle.get(), neoDevice.release(), false, &returnValue); ASSERT_NE(nullptr, device); @@ -75,7 +83,7 @@ HWTEST2_F(DeviceTestPVC, givenPvcAStepWhenCreatingMultiTileDeviceThenExpectImpli delete device; } -HWTEST2_F(DeviceTestPVC, givenPvcAStepAndDebugFlagOverridesWhenCreatingMultiTileDeviceThenExpectImplicitScalingEnabled, IsXeHpcCore) { +HWTEST2_F(DeviceTestXeHpc, givenXeHpcAStepAndDebugFlagOverridesWhenCreatingMultiTileDeviceThenExpectImplicitScalingEnabled, IsXeHpcCore) { DebugManagerStateRestore restorer; DebugManager.flags.CreateMultipleSubDevices.set(2); DebugManager.flags.EnableImplicitScaling.set(1); @@ -96,7 +104,7 @@ HWTEST2_F(DeviceTestPVC, givenPvcAStepAndDebugFlagOverridesWhenCreatingMultiTile delete device; } -HWTEST2_F(DeviceTestPVC, givenPvcBStepWhenCreatingMultiTileDeviceThenExpectImplicitScalingEnabled, IsXeHpcCore) { +HWTEST2_F(DeviceTestXeHpc, givenXeHpcBStepWhenCreatingMultiTileDeviceThenExpectImplicitScalingEnabled, IsXeHpcCore) { DebugManagerStateRestore restorer; DebugManager.flags.CreateMultipleSubDevices.set(2); VariableBackup apiSupportBackup(&NEO::ImplicitScaling::apiSupport, true); @@ -201,7 +209,7 @@ HWTEST2_F(DeviceCopyQueueGroupTest, } } -HWTEST2_F(DeviceTestPVC, givenReturnedDevicePropertiesThenExpectedPropertyFlagsSet, IsPVC) { +HWTEST2_F(DeviceTestXeHpc, givenReturnedDevicePropertiesThenExpectedPropertyFlagsSet, IsXeHpcCore) { ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES}; device->getProperties(&deviceProps); diff --git a/opencl/source/program/program.cpp b/opencl/source/program/program.cpp index 874d023f33..64f0bcf175 100644 --- a/opencl/source/program/program.cpp +++ b/opencl/source/program/program.cpp @@ -16,6 +16,7 @@ #include "shared/source/device_binary_format/elf/ocl_elf.h" #include "shared/source/device_binary_format/patchtokens_decoder.h" #include "shared/source/helpers/api_specific_config.h" +#include "shared/source/helpers/compiler_hw_info_config.h" #include "shared/source/helpers/compiler_options_parser.h" #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/hw_helper.h" @@ -162,6 +163,10 @@ cl_int Program::createProgramFromBinary( auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo(); auto productAbbreviation = hardwarePrefix[hwInfo->platform.eProductFamily]; + auto copyHwInfo = *hwInfo; + const auto &compilerHwInfoConfig = *CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily); + compilerHwInfoConfig.adjustHwInfoForIgc(copyHwInfo); + TargetDevice targetDevice = targetDeviceFromHwInfo(*hwInfo); std::string decodeErrors; std::string decodeWarnings; diff --git a/opencl/test/unit_test/aub_tests/xe_hp_core/aub_mem_dump_tests_xe_hp_core.cpp b/opencl/test/unit_test/aub_tests/xe_hp_core/aub_mem_dump_tests_xe_hp_core.cpp index e152e6507b..f918c858ef 100644 --- a/opencl/test/unit_test/aub_tests/xe_hp_core/aub_mem_dump_tests_xe_hp_core.cpp +++ b/opencl/test/unit_test/aub_tests/xe_hp_core/aub_mem_dump_tests_xe_hp_core.cpp @@ -20,7 +20,7 @@ XE_HP_CORE_TEST_F(XeHpCoreAubMemDumpTests, GivenCcsThenExpectationsAreMet) { setupAUB(pDevice, aub_stream::ENGINE_CCS); } -HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCoreAubMemDumpTests, whenAubCsrIsCreatedThenCreateHardwareContext) { +XE_HP_CORE_TEST_F(XeHpCoreAubMemDumpTests, whenAubCsrIsCreatedThenCreateHardwareContext) { DebugManagerStateRestore restore; VariableBackup backup(&ultHwConfig); ultHwConfig.useHwCsr = true; diff --git a/opencl/test/unit_test/aub_tests/xe_hpc_core/aub_mem_dump_tests_xe_hpc_core.cpp b/opencl/test/unit_test/aub_tests/xe_hpc_core/aub_mem_dump_tests_xe_hpc_core.cpp index 22e2ab7857..2facd1e6fc 100644 --- a/opencl/test/unit_test/aub_tests/xe_hpc_core/aub_mem_dump_tests_xe_hpc_core.cpp +++ b/opencl/test/unit_test/aub_tests/xe_hpc_core/aub_mem_dump_tests_xe_hpc_core.cpp @@ -11,5 +11,10 @@ using XeHpcCoreAubMemDumpTests = Test; XE_HPC_CORETEST_F(XeHpcCoreAubMemDumpTests, GivenCcsThenExpectationsAreMet) { + + if (NEO::defaultHwInfo->platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + setupAUB(pDevice, aub_stream::ENGINE_CCS); } diff --git a/opencl/test/unit_test/aub_tests/xe_hpg_core/aub_mem_dump_tests_xe_hpg_core.cpp b/opencl/test/unit_test/aub_tests/xe_hpg_core/aub_mem_dump_tests_xe_hpg_core.cpp index 5ebe32cec6..a2f92314ff 100644 --- a/opencl/test/unit_test/aub_tests/xe_hpg_core/aub_mem_dump_tests_xe_hpg_core.cpp +++ b/opencl/test/unit_test/aub_tests/xe_hpg_core/aub_mem_dump_tests_xe_hpg_core.cpp @@ -20,7 +20,7 @@ XE_HPG_CORETEST_F(XeHpgCoreAubMemDumpTests, GivenCcsThenExpectationsAreMet) { setupAUB(pDevice, aub_stream::ENGINE_CCS); } -HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpgCoreAubMemDumpTests, whenAubCsrIsCreatedThenCreateHardwareContext) { +XE_HPG_CORETEST_F(XeHpgCoreAubMemDumpTests, whenAubCsrIsCreatedThenCreateHardwareContext) { DebugManagerStateRestore restore; VariableBackup backup(&ultHwConfig); ultHwConfig.useHwCsr = true; diff --git a/opencl/test/unit_test/xe_hpc_core/command_stream_receiver_hw_tests_xe_hpc_core.cpp b/opencl/test/unit_test/xe_hpc_core/command_stream_receiver_hw_tests_xe_hpc_core.cpp index b554652b2b..77271ee9c7 100644 --- a/opencl/test/unit_test/xe_hpc_core/command_stream_receiver_hw_tests_xe_hpc_core.cpp +++ b/opencl/test/unit_test/xe_hpc_core/command_stream_receiver_hw_tests_xe_hpc_core.cpp @@ -262,6 +262,11 @@ XE_HPC_CORETEST_F(SystemMemoryFenceInDefaultConfigurationTest, whenEnqueueKernel using MI_MEM_FENCE = typename FamilyType::MI_MEM_FENCE; VariableBackup revisionId(&defaultHwInfo->platform.usRevId); + + if (defaultHwInfo->platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + unsigned short revisions[] = {0x0, 0x3}; for (auto revision : revisions) { revisionId = revision; diff --git a/opencl/test/unit_test/xe_hpc_core/excludes_ocl_xe_hpc_core.cpp b/opencl/test/unit_test/xe_hpc_core/excludes_ocl_xe_hpc_core.cpp index 9a90ad8642..319bbafb18 100644 --- a/opencl/test/unit_test/xe_hpc_core/excludes_ocl_xe_hpc_core.cpp +++ b/opencl/test/unit_test/xe_hpc_core/excludes_ocl_xe_hpc_core.cpp @@ -23,7 +23,7 @@ HWTEST_EXCLUDE_PRODUCT(DrmMemoryManagerTest, givenDrmAllocationWithHostPtrWhenIt HWTEST_EXCLUDE_PRODUCT(DrmMemoryManagerTest, givenDrmAllocationWithWithAlignmentFromUserptrWhenItIsCreatedWithIncorrectCacheRegionThenReturnNull, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(ClDeviceHelperTests, givenDeviceWithoutClosBasedCacheReservationSupportWhenQueryingNumCacheClosDeviceInfoThenReturnZeroCacheClosRegions, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(HwHelperTest, whenGettingNumberOfCacheRegionsThenReturnZero, IGFX_XE_HPC_CORE); -HWTEST_EXCLUDE_PRODUCT(HwHelperTest, givenHwHelperWhenGettingISAPaddingThenCorrectValueIsReturned, IGFX_PVC); +HWTEST_EXCLUDE_PRODUCT(HwHelperTest, givenHwHelperWhenGettingISAPaddingThenCorrectValueIsReturned, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(LocalWorkSizeTest, givenDispatchInfoWhenWorkSizeInfoIsCreatedThenTestEuFusionFtr, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, whenCallingGetDeviceMemoryNameThenDdrIsReturned, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHardwareInfoWhenCallingIsMaxThreadsForWorkgroupWARequiredThenFalseIsReturned, IGFX_XE_HPC_CORE); diff --git a/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp b/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp index 7cf53eaea3..cd810a96b3 100644 --- a/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp +++ b/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp @@ -156,6 +156,11 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, whenQueryingMaxNumSamplersThenReturnZe XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenDeviceIdThenProperMaxThreadsForWorkgroupIsReturned) { auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily); + + if (hardwareInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + hardwareInfo.platform.usDeviceID = FamilyType::pvcXlDeviceId; EXPECT_EQ(64u, hwInfoConfig.getMaxThreadsForWorkgroupInDSSOrSS(hardwareInfo, 64u, 64u)); auto xtDevicesCount = 3; @@ -175,6 +180,10 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenRevisionEnumAndPlatformFamilyType CommonConstants::invalidStepping, }; + if (hardwareInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + const auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily); const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily); @@ -615,6 +624,10 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenHwHelperWhenAskedIfFenceAllocatio XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenDefaultMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) { using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT; + if (hardwareInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + EXPECT_EQ(sizeof(MI_SEMAPHORE_WAIT), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(*defaultHwInfo)); } @@ -623,6 +636,10 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenDebugMemorySynchronizationCommand DebugManager.flags.DisablePipeControlPrecedingPostSyncCommand.set(1); using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT; + if (hardwareInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + EXPECT_EQ(2 * sizeof(MI_SEMAPHORE_WAIT), MemorySynchronizationCommands::getSizeForAdditonalSynchronization(*defaultHwInfo)); } @@ -667,6 +684,11 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenMemorySynchronizationCommandsWhen DebugManagerStateRestore debugRestorer; auto hardwareInfo = *defaultHwInfo; + + if (hardwareInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + hardwareInfo.featureTable.flags.ftrLocalMemory = true; uint8_t buffer[128] = {}; uint64_t gpuAddress = 0x12345678; @@ -1032,6 +1054,10 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, GivenRevisionIdWhenGetComputeUnitsUsed auto hwInfo = *defaultHwInfo; hwInfo.gtSystemInfo.EUCount *= 2; + if (hwInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + uint32_t expectedValue = hwInfo.gtSystemInfo.MaxSubSlicesSupported * hwInfo.gtSystemInfo.MaxEuPerSubSlice; struct { 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 b8636d337b..cd4974fcbf 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 @@ -33,8 +33,8 @@ using namespace NEO; -HWTEST_EXCLUDE_PRODUCT(CommandStreamReceiverFlushTaskTests, givenOverrideThreadArbitrationPolicyDebugVariableSetWhenFlushingThenRequestRequiredMode, IGFX_PVC); -HWTEST_EXCLUDE_PRODUCT(XeHPAndLaterAubCommandStreamReceiverWithoutFixtureTests, GivenCopyHostPtrAndHostNoAccessAndReadOnlyFlagsWhenAllocatingBufferThenAllocationIsCopiedToEveryTile, IGFX_PVC); +HWTEST_EXCLUDE_PRODUCT(CommandStreamReceiverFlushTaskTests, givenOverrideThreadArbitrationPolicyDebugVariableSetWhenFlushingThenRequestRequiredMode, IGFX_XE_HPC_CORE); +HWTEST_EXCLUDE_PRODUCT(XeHPAndLaterAubCommandStreamReceiverWithoutFixtureTests, GivenCopyHostPtrAndHostNoAccessAndReadOnlyFlagsWhenAllocatingBufferThenAllocationIsCopiedToEveryTile, IGFX_XE_HPC_CORE); using PvcCommandStreamReceiverFlushTaskTests = UltCommandStreamReceiverTest; PVCTEST_F(PvcCommandStreamReceiverFlushTaskTests, givenOverrideThreadArbitrationPolicyDebugVariableSetForPvcWhenFlushingThenRequestRequiredMode) { diff --git a/opencl/test/unit_test/xe_hpc_core/pvc/get_device_info_pvc.cpp b/opencl/test/unit_test/xe_hpc_core/pvc/get_device_info_pvc.cpp index e3535ebff4..4858dfc2b5 100644 --- a/opencl/test/unit_test/xe_hpc_core/pvc/get_device_info_pvc.cpp +++ b/opencl/test/unit_test/xe_hpc_core/pvc/get_device_info_pvc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,7 +11,7 @@ using namespace NEO; -HWTEST_EXCLUDE_PRODUCT(GetDeviceInfoMemCapabilitiesTest, GivenValidParametersWhenGetDeviceInfoIsCalledForXE_HP_COREThenClSuccessIsReturned, IGFX_PVC); +HWTEST_EXCLUDE_PRODUCT(GetDeviceInfoMemCapabilitiesTest, GivenValidParametersWhenGetDeviceInfoIsCalledForXE_HP_COREThenClSuccessIsReturned, IGFX_XE_HPC_CORE); PVCTEST_F(GetDeviceInfoMemCapabilitiesTest, GivenValidParametersWhenGetDeviceInfoIsCalledForPVCThenClSuccessIsReturned) { std::vector params = { diff --git a/platforms.cmake b/platforms.cmake index 2f8a485e1c..35b6ff146f 100644 --- a/platforms.cmake +++ b/platforms.cmake @@ -147,11 +147,11 @@ macro(SET_FLAGS_FOR CORE_TYPE) if(SUPPORT_${SKU_NAME}) if(NOT SUPPORT_${CORE_TYPE}) message(STATUS "Auto-Enabling ${CORE_TYPE} support for ${SKU_NAME}") - set(SUPPORT_${CORE_TYPE} TRUE CACHE BOOL "Support ${CORE_TYPE} devices") + set(SUPPORT_${CORE_TYPE} TRUE CACHE BOOL "Support ${CORE_TYPE} devices" FORCE) endif() - if(NOT DEFINED TESTS_${CORE_TYPE}) + if(NOT TESTS_${CORE_TYPE}) message(STATUS "Auto-Enabling ${CORE_TYPE} tests for ${SKU_NAME}") - set(TESTS_${CORE_TYPE} TRUE CACHE BOOL "Build ULTs for ${CORE_TYPE} devices") + set(TESTS_${CORE_TYPE} TRUE CACHE BOOL "Build ULTs for ${CORE_TYPE} devices" FORCE) endif() endif() endforeach() diff --git a/shared/offline_compiler/source/offline_compiler.cpp b/shared/offline_compiler/source/offline_compiler.cpp index 1478010ace..78144b9c37 100644 --- a/shared/offline_compiler/source/offline_compiler.cpp +++ b/shared/offline_compiler/source/offline_compiler.cpp @@ -601,8 +601,15 @@ int OfflineCompiler::initialize(size_t numArgs, const std::vector & if ((igcPlatform == nullptr) || (igcGtSystemInfo == nullptr) || (igcFtrWa == nullptr)) { return OUT_OF_HOST_MEMORY; } - IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform.get(), hwInfo.platform); - IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo.get(), hwInfo.gtSystemInfo); + + auto compilerHwInfoConfig = CompilerHwInfoConfig::get(hwInfo.platform.eProductFamily); + auto copyHwInfo = hwInfo; + if (compilerHwInfoConfig) { + compilerHwInfoConfig->adjustHwInfoForIgc(copyHwInfo); + } + + IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform.get(), copyHwInfo.platform); + IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo.get(), copyHwInfo.gtSystemInfo); // populate with features igcFtrWa.get()->SetFtrDesktop(hwInfo.featureTable.flags.ftrDesktop); @@ -611,7 +618,6 @@ int OfflineCompiler::initialize(size_t numArgs, const std::vector & igcFtrWa.get()->SetFtrSGTPVSKUStrapPresent(hwInfo.featureTable.flags.ftrSGTPVSKUStrapPresent); igcFtrWa.get()->SetFtr5Slice(hwInfo.featureTable.flags.ftr5Slice); - auto compilerHwInfoConfig = CompilerHwInfoConfig::get(hwInfo.platform.eProductFamily); if (compilerHwInfoConfig) { igcFtrWa.get()->SetFtrGpGpuMidThreadLevelPreempt(compilerHwInfoConfig->isMidThreadPreemptionSupported(hwInfo)); } diff --git a/shared/source/compiler_interface/compiler_interface.cpp b/shared/source/compiler_interface/compiler_interface.cpp index d89f1ad603..b908bb5ab9 100644 --- a/shared/source/compiler_interface/compiler_interface.cpp +++ b/shared/source/compiler_interface/compiler_interface.cpp @@ -435,8 +435,13 @@ IGC::IgcOclDeviceCtxTagOCL *CompilerInterface::getIgcDeviceCtx(const Device &dev if (productFamily != "unk") { getHwInfoForPlatformString(productFamily, hwInfo); } - IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform, hwInfo->platform); - IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo, hwInfo->gtSystemInfo); + + auto copyHwInfo = *hwInfo; + const auto &compilerHwInfoConfig = *CompilerHwInfoConfig::get(copyHwInfo.platform.eProductFamily); + compilerHwInfoConfig.adjustHwInfoForIgc(copyHwInfo); + + IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform, copyHwInfo.platform); + IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo, copyHwInfo.gtSystemInfo); igcFtrWa.get()->SetFtrDesktop(device.getHardwareInfo().featureTable.flags.ftrDesktop); igcFtrWa.get()->SetFtrChannelSwizzlingXOREnabled(device.getHardwareInfo().featureTable.flags.ftrChannelSwizzlingXOREnabled); diff --git a/shared/source/helpers/compiler_hw_info_config.h b/shared/source/helpers/compiler_hw_info_config.h index ba25e9fb7f..661d6e270d 100644 --- a/shared/source/helpers/compiler_hw_info_config.h +++ b/shared/source/helpers/compiler_hw_info_config.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,6 +27,7 @@ class CompilerHwInfoConfig { virtual bool isForceEmuInt32DivRemSPRequired() const = 0; virtual bool isStatelessToStatefulBufferOffsetSupported() const = 0; virtual bool isForceToStatelessRequired() const = 0; + virtual void adjustHwInfoForIgc(HardwareInfo &hwInfo) const = 0; }; template @@ -41,6 +42,7 @@ class CompilerHwInfoConfigHw : public CompilerHwInfoConfig { bool isForceEmuInt32DivRemSPRequired() const override; bool isStatelessToStatefulBufferOffsetSupported() const override; bool isForceToStatelessRequired() const override; + void adjustHwInfoForIgc(HardwareInfo &hwInfo) const override; protected: CompilerHwInfoConfigHw() = default; diff --git a/shared/source/helpers/compiler_hw_info_config_base.inl b/shared/source/helpers/compiler_hw_info_config_base.inl index d61241f95d..082b967feb 100644 --- a/shared/source/helpers/compiler_hw_info_config_base.inl +++ b/shared/source/helpers/compiler_hw_info_config_base.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,4 +20,8 @@ bool CompilerHwInfoConfigHw::isStatelessToStatefulBufferOffsetSuppor return true; } +template +void CompilerHwInfoConfigHw::adjustHwInfoForIgc(HardwareInfo &hwInfo) const { +} + } // namespace NEO diff --git a/shared/source/xe_hpc_core/CMakeLists.txt b/shared/source/xe_hpc_core/CMakeLists.txt index bdd5ce5ea5..46ee9c4309 100644 --- a/shared/source/xe_hpc_core/CMakeLists.txt +++ b/shared/source/xe_hpc_core/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -9,6 +9,10 @@ if(SUPPORT_XE_HPC_CORE) ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}hw_cmds_pvc.inl ) + set(NEO_CORE_HELPERS + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/compiler_hw_info_config_pvc.inl + ) set_property(GLOBAL APPEND PROPERTY CORE_SRCS_GENX_ALL_BASE ${HW_DEFINITIONS_XE_HPC_CORE}) add_subdirectories() diff --git a/shared/source/xe_hpc_core/hw_cmds_base.h b/shared/source/xe_hpc_core/hw_cmds_base.h index 17b828c193..bfbbf8ef06 100644 --- a/shared/source/xe_hpc_core/hw_cmds_base.h +++ b/shared/source/xe_hpc_core/hw_cmds_base.h @@ -38,6 +38,10 @@ struct XE_HPC_CORE { static constexpr bool supportsSampler = false; static constexpr bool isUsingGenericMediaStateClear = true; + static bool isPvc(const HardwareInfo &hwInfo) { + return hwInfo.platform.eProductFamily == IGFX_PVC; + } + static bool isXlA0(const HardwareInfo &hwInfo) { auto revId = hwInfo.platform.usRevId & pvcSteppingBits; return (revId < 0x3) && !isXtTemporary(hwInfo); @@ -49,7 +53,7 @@ struct XE_HPC_CORE { } static bool isXtTemporary(const HardwareInfo &hwInfo) { - return hwInfo.platform.usDeviceID == pvcXtTemporaryDeviceId; + return (hwInfo.platform.usDeviceID == pvcXtTemporaryDeviceId) || !isPvc(hwInfo); } struct DataPortBindlessSurfaceExtendedMessageDescriptor { diff --git a/shared/test/common/test_macros/header/per_product_test_selector.h b/shared/test/common/test_macros/header/per_product_test_selector.h index e275926183..982d43d96a 100644 --- a/shared/test/common/test_macros/header/per_product_test_selector.h +++ b/shared/test/common/test_macros/header/per_product_test_selector.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -30,7 +30,7 @@ XEHPG_TYPED_TEST(methodName) \ break; \ case IGFX_XE_HPC_CORE: \ - PVC_TYPED_TEST(methodName) \ + XEHPC_TYPED_TEST(methodName) \ break; \ default: \ ASSERT_TRUE((false && "Unknown hardware family")); \ @@ -60,7 +60,7 @@ supported = XEHPG_SUPPORTED_TEST(cmdSetBase); \ break; \ case IGFX_XE_HPC_CORE: \ - supported = PVC_SUPPORTED_TEST(cmdSetBase); \ + supported = XEHPC_SUPPORTED_TEST(cmdSetBase); \ break; \ default: \ ASSERT_TRUE((false && "Unknown hardware family")); \ diff --git a/shared/test/common/test_macros/header/per_product_test_selector_definitions.h b/shared/test/common/test_macros/header/per_product_test_selector_definitions.h index e986c9c1f2..7fe287219c 100644 --- a/shared/test/common/test_macros/header/per_product_test_selector_definitions.h +++ b/shared/test/common/test_macros/header/per_product_test_selector_definitions.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -50,9 +50,9 @@ #define XEHPG_SUPPORTED_TEST(cmdSetBase) false #endif #ifdef TESTS_XE_HPC_CORE -#define PVC_TYPED_TEST(method) method::GfxFamily>(); -#define PVC_SUPPORTED_TEST(cmdSetBase) NEO::GfxFamilyMapper::GfxFamily::supportsCmdSet(cmdSetBase) +#define XEHPC_TYPED_TEST(method) method::GfxFamily>(); +#define XEHPC_SUPPORTED_TEST(cmdSetBase) NEO::GfxFamilyMapper::GfxFamily::supportsCmdSet(cmdSetBase) #else -#define PVC_TYPED_TEST(method) -#define PVC_SUPPORTED_TEST(cmdSetBase) false +#define XEHPC_TYPED_TEST(method) +#define XEHPC_SUPPORTED_TEST(cmdSetBase) false #endif diff --git a/shared/test/common/xe_hpc_core/test_encode_xe_hpc_core.cpp b/shared/test/common/xe_hpc_core/test_encode_xe_hpc_core.cpp index 9d19c1d070..88e9b13527 100644 --- a/shared/test/common/xe_hpc_core/test_encode_xe_hpc_core.cpp +++ b/shared/test/common/xe_hpc_core/test_encode_xe_hpc_core.cpp @@ -434,6 +434,11 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, whenSizeForEncodeSystemMemoryFenceQ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenRevisionBAndAboveWhenSpecialModeRequiredThenDontReprogramPipelineSelect) { bool requiresUncachedMocs = false; auto hwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); + + if (hwInfo->platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + uint32_t dims[] = {1, 1, 1}; std::unique_ptr dispatchInterface(new MockDispatchKernelEncoder()); dispatchInterface->kernelDescriptor.kernelAttributes.flags.usesSpecialPipelineSelectMode = true; @@ -464,6 +469,11 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenRevisionBAndAboveWhenSpecialMo XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenRevisionBAndAboveWhenSpecialModeRequiredAndAdjustPipelineSelectCalledThenDontEnableSystolicMode) { using PIPELINE_SELECT = typename FamilyType::PIPELINE_SELECT; auto hwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); + + if (hwInfo->platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + std::unique_ptr dispatchInterface(new MockDispatchKernelEncoder()); dispatchInterface->kernelDescriptor.kernelAttributes.flags.usesSpecialPipelineSelectMode = true; diff --git a/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp b/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp index 1e48d99583..9ad304f87f 100644 --- a/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp +++ b/shared/test/unit_test/compiler_interface/compiler_interface_tests.cpp @@ -873,7 +873,7 @@ TEST_F(CompilerInterfaceTest, GivenRequestForNewIgcTranslationCtxWhenCouldNotPop setIgcDebugVars(prevDebugVars); } -TEST_F(CompilerInterfaceTest, givenNoDbgKeyForceUseDifferentPlatformWhenRequestForNewTranslationCtxThenUseDefaultPlatform) { +HWTEST_F(CompilerInterfaceTest, givenNoDbgKeyForceUseDifferentPlatformWhenRequestForNewTranslationCtxThenUseDefaultPlatform) { auto device = this->pDevice; auto retIgc = pCompilerInterface->createIgcTranslationCtx(*device, IGC::CodeType::spirV, IGC::CodeType::oclGenBin); EXPECT_NE(nullptr, retIgc); 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 5584423b47..e752797a62 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 @@ -85,7 +85,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTestPvcAndLater, givenCommandCon EXPECT_TRUE(cmd->getLargeGrfMode()); } -HWTEST2_F(CommandEncodeStatesTestPvcAndLater, GivenVariousSlmTotalSizesAndSettingRevIDToDifferentValuesWhenSetAdditionalInfoIsCalledThenCorrectValuesAreSet, IsXeHpcCore) { +using CommandEncodeStatesTestHpc = Test; +HWTEST2_F(CommandEncodeStatesTestHpc, GivenVariousSlmTotalSizesAndSettingRevIDToDifferentValuesWhenSetAdditionalInfoIsCalledThenCorrectValuesAreSet, IsXeHpcCore) { using PREFERRED_SLM_ALLOCATION_SIZE = typename FamilyType::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE; const std::vector> valuesToTest = { @@ -108,6 +109,11 @@ HWTEST2_F(CommandEncodeStatesTestPvcAndLater, GivenVariousSlmTotalSizesAndSettin const std::array revs{REVISION_A0, REVISION_B, REVISION_C, REVISION_D, REVISION_K}; auto &hwInfo = *pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); + + if (hwInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + for (auto rev : revs) { hwInfo.platform.usRevId = HwInfoConfig::get(productFamily)->getHwRevIdFromStepping(rev, hwInfo); if ((hwInfo.platform.eProductFamily == IGFX_PVC) && (rev == REVISION_A0)) { diff --git a/shared/test/unit_test/encoders/walker_partition_tests_pvc_and_later.cpp b/shared/test/unit_test/encoders/walker_partition_tests_pvc_and_later.cpp index 15edccb7fa..63a9d44aa8 100644 --- a/shared/test/unit_test/encoders/walker_partition_tests_pvc_and_later.cpp +++ b/shared/test/unit_test/encoders/walker_partition_tests_pvc_and_later.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -60,7 +60,7 @@ HWTEST2_F(WalkerPartitionPvcAndLaterTests, givenProgramBatchBufferStartCommandWh ASSERT_NE(nullptr, batchBufferStart); EXPECT_EQ(expectedUsedSize, totalBytesProgrammed); - if (productFamily == IGFX_PVC) { + if (gfxCoreFamily == IGFX_XE_HPC_CORE) { //bits 57-63 are zeroed EXPECT_EQ((gpuAddress & 0x1FFFFFFFFFFFFFF), batchBufferStart->getBatchBufferStartAddress()); } else { diff --git a/shared/test/unit_test/xe_hpc_core/compute_mode_tests_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/compute_mode_tests_xe_hpc_core.cpp index 13c60a66e8..b21c5cdfc0 100644 --- a/shared/test/unit_test/xe_hpc_core/compute_mode_tests_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/compute_mode_tests_xe_hpc_core.cpp @@ -14,14 +14,14 @@ using namespace NEO; -using ThreadArbitrationPvc = ::testing::Test; -PVCTEST_F(ThreadArbitrationPvc, givenPvcWhenCallgetDefaultThreadArbitrationPolicyThenAgeBasedisReturned) { +using ThreadArbitrationXeHpc = ::testing::Test; +HWTEST2_F(ThreadArbitrationXeHpc, givenXeHpcWhenCallgetDefaultThreadArbitrationPolicyThenAgeBasedisReturned, IsXeHpcCore) { EXPECT_EQ(ThreadArbitrationPolicy::AgeBased, HwHelperHw::get().getDefaultThreadArbitrationPolicy()); } -using PvcComputeModeRequirements = ComputeModeRequirements; +using XeHpcComputeModeRequirements = ComputeModeRequirements; -PVCTEST_F(PvcComputeModeRequirements, givenNewRequiredThreadArbitrationPolicyWhenComputeModeIsProgrammedThenStateComputeIsProgrammedAgain) { +HWTEST2_F(XeHpcComputeModeRequirements, givenNewRequiredThreadArbitrationPolicyWhenComputeModeIsProgrammedThenStateComputeIsProgrammedAgain, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -49,7 +49,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenNewRequiredThreadArbitrationPolicyWhe EXPECT_EQ(expectedEuThreadSchedulingMode, static_cast(ptrOffset(stream.getCpuBase(), sizeof(PIPE_CONTROL)))->getEuThreadSchedulingModeOverride()); } -PVCTEST_F(PvcComputeModeRequirements, givenRequiredThreadArbitrationPolicyAlreadySetWhenComputeModeIsProgrammedThenStateComputeIsNotProgrammedAgain) { +HWTEST2_F(XeHpcComputeModeRequirements, givenRequiredThreadArbitrationPolicyAlreadySetWhenComputeModeIsProgrammedThenStateComputeIsNotProgrammedAgain, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; @@ -70,7 +70,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenRequiredThreadArbitrationPolicyAlread EXPECT_NE(STATE_COMPUTE_MODE::EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_ROUND_ROBIN, static_cast(stream.getCpuBase())->getEuThreadSchedulingModeOverride()); } -PVCTEST_F(PvcComputeModeRequirements, givenCoherencyWithoutSharedHandlesWhenCommandSizeIsCalculatedThenCorrectCommandSizeIsReturned) { +HWTEST2_F(XeHpcComputeModeRequirements, givenCoherencyWithoutSharedHandlesWhenCommandSizeIsCalculatedThenCorrectCommandSizeIsReturned, IsXeHpcCore) { using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -87,7 +87,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenCoherencyWithoutSharedHandlesWhenComm EXPECT_EQ(cmdsSize, retSize); } -PVCTEST_F(PvcComputeModeRequirements, givenNumGrfRequiredChangedWhenCommandSizeIsCalculatedThenCorrectCommandSizeIsReturned) { +HWTEST2_F(XeHpcComputeModeRequirements, givenNumGrfRequiredChangedWhenCommandSizeIsCalculatedThenCorrectCommandSizeIsReturned, IsXeHpcCore) { using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -103,7 +103,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenNumGrfRequiredChangedWhenCommandSizeI EXPECT_EQ(sizeof(STATE_COMPUTE_MODE) + sizeof(PIPE_CONTROL), getCsrHw()->getCmdSizeForComputeMode()); } -PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfModeDoesntChangeButRequiredThreadArbitrationPolicyIsNewThenSCMIsReloaded) { +HWTEST2_F(XeHpcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfModeDoesntChangeButRequiredThreadArbitrationPolicyIsNewThenSCMIsReloaded, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -117,7 +117,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfMod EXPECT_EQ(cmdsSize, stream.getUsed()); } -PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfModeChangedThenSCMIsReloadedAndLargeGrfModeProgrammed) { +HWTEST2_F(XeHpcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfModeChangedThenSCMIsReloadedAndLargeGrfModeProgrammed, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -134,7 +134,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfMod EXPECT_TRUE(static_cast(ptrOffset(stream.getCpuBase(), sizeof(PIPE_CONTROL)))->getLargeGrfMode()); } -PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfRequiredChangedButValueIsDefaultThenSCMIsReloadedButLargeGrfModeNotProgrammed) { +HWTEST2_F(XeHpcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfRequiredChangedButValueIsDefaultThenSCMIsReloadedButLargeGrfModeNotProgrammed, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -150,7 +150,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfReq EXPECT_FALSE(static_cast(stream.getCpuBase())->getLargeGrfMode()); } -PVCTEST_F(PvcComputeModeRequirements, giventhreadArbitrationPolicyWithoutSharedHandlesWhenFlushTaskCalledThenProgramCmdOnlyIfChanged) { +HWTEST2_F(XeHpcComputeModeRequirements, giventhreadArbitrationPolicyWithoutSharedHandlesWhenFlushTaskCalledThenProgramCmdOnlyIfChanged, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -205,7 +205,7 @@ PVCTEST_F(PvcComputeModeRequirements, giventhreadArbitrationPolicyWithoutSharedH csr->getMemoryManager()->freeGraphicsMemory(graphicAlloc); } -PVCTEST_F(PvcComputeModeRequirements, givenCoherencyWithoutSharedHandlesWhenComputeModeIsProgrammedThenCorrectCommandsAreAdded) { +HWTEST2_F(XeHpcComputeModeRequirements, givenCoherencyWithoutSharedHandlesWhenComputeModeIsProgrammedThenCorrectCommandsAreAdded, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -242,7 +242,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenCoherencyWithoutSharedHandlesWhenComp EXPECT_TRUE(memcmp(&expectedScmCmd, scmCmd, sizeof(STATE_COMPUTE_MODE)) == 0); } -PVCTEST_F(PvcComputeModeRequirements, givenCoherencyWithSharedHandlesWhenComputeModeIsProgrammedThenCorrectCommandsAreAdded) { +HWTEST2_F(XeHpcComputeModeRequirements, givenCoherencyWithSharedHandlesWhenComputeModeIsProgrammedThenCorrectCommandsAreAdded, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -287,7 +287,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenCoherencyWithSharedHandlesWhenCompute EXPECT_TRUE(memcmp(&expectedPcCmd, pcCmd, sizeof(PIPE_CONTROL)) == 0); } -PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfModeChangeIsRequiredThenCorrectCommandsAreAdded) { +HWTEST2_F(XeHpcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfModeChangeIsRequiredThenCorrectCommandsAreAdded, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -326,7 +326,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenLargeGrfMod EXPECT_TRUE(memcmp(&expectedScmCmd, scmCmd, sizeof(STATE_COMPUTE_MODE)) == 0); } -PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenRequiredGRFNumberIsLowerThan128ThenSmallGRFModeIsProgrammed) { +HWTEST2_F(XeHpcComputeModeRequirements, givenComputeModeProgrammingWhenRequiredGRFNumberIsLowerThan128ThenSmallGRFModeIsProgrammed, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; @@ -350,7 +350,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingWhenRequiredGRF EXPECT_TRUE(memcmp(&expectedScmCmd, scmCmd, sizeof(STATE_COMPUTE_MODE)) == 0); } -PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingThenCorrectCommandsAreAdded) { +HWTEST2_F(XeHpcComputeModeRequirements, givenComputeModeProgrammingThenCorrectCommandsAreAdded, IsXeHpcCore) { SetUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; @@ -392,7 +392,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenComputeModeProgrammingThenCorrectComm EXPECT_TRUE(memcmp(&expectedScmCmd, stateComputeModeCmd, sizeof(STATE_COMPUTE_MODE)) == 0); } -PVCTEST_F(PvcComputeModeRequirements, givenProgramExtendedPipeControlPriorToNonPipelinedStateCommandEnabledThenCorrectCommandsAreAdded) { +HWTEST2_F(XeHpcComputeModeRequirements, givenProgramExtendedPipeControlPriorToNonPipelinedStateCommandEnabledThenCorrectCommandsAreAdded, IsXeHpcCore) { DebugManagerStateRestore dbgRestorer; DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.set(true); @@ -440,7 +440,7 @@ PVCTEST_F(PvcComputeModeRequirements, givenProgramExtendedPipeControlPriorToNonP EXPECT_TRUE(memcmp(&expectedScmCmd, stateComputeModeCmd, sizeof(STATE_COMPUTE_MODE)) == 0); } -PVCTEST_F(PvcComputeModeRequirements, GivenSingleCCSEnabledSetupThenCorrectCommandsAreAdded) { +HWTEST2_F(XeHpcComputeModeRequirements, GivenSingleCCSEnabledSetupThenCorrectCommandsAreAdded, IsXeHpcCore) { HardwareInfo hwInfo = *defaultHwInfo; hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 1; diff --git a/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp index e7f0218ef9..cfe36e240e 100644 --- a/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp @@ -35,6 +35,10 @@ XE_HPC_CORETEST_F(WalkerDispatchTestsXeHpcCore, whenEncodeAdditionalWalkerFields auto &postSyncData = walkerCmd.getPostSync(); auto hwInfo = *defaultHwInfo; + if (hwInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + for (auto &testInput : testInputs) { hwInfo.platform.usRevId = testInput.revisionId; DebugManager.flags.ProgramGlobalFenceAsPostSyncOperationInComputeWalker.set( @@ -70,6 +74,11 @@ XE_HPC_CORETEST_F(WalkerDispatchTestsXeHpcCore, givenPvcXtTemporaryWhenEncodeAdd auto hwInfo = *defaultHwInfo; hwInfo.platform.usDeviceID = 0x0BE5; + + if (hwInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + auto walkerCmd = FamilyType::cmdInitGpgpuWalker; { diff --git a/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp b/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp index 3c1aac5649..1d550a89f2 100644 --- a/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp +++ b/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp @@ -14,7 +14,7 @@ using namespace NEO; using HwHelperXeHpcCoreTest = ::testing::Test; XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenSlmSizeWhenEncodingThenReturnCorrectValues) { - ComputeSlmTestInput computeSlmValuesPvcAndLaterTestsInput[] = { + ComputeSlmTestInput computeSlmValuesXeHpcTestsInput[] = { {0, 0 * KB}, {1, 0 * KB + 1}, {1, 1 * KB}, @@ -42,7 +42,7 @@ XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenSlmSizeWhenEncodingThenReturnCorre auto hwInfo = *defaultHwInfo; auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - for (auto &testInput : computeSlmValuesPvcAndLaterTestsInput) { + for (auto &testInput : computeSlmValuesXeHpcTestsInput) { EXPECT_EQ(testInput.expected, hwHelper.computeSlmValues(hwInfo, testInput.slmSize)); } diff --git a/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp index e63be061be..6827f442b0 100644 --- a/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp @@ -15,9 +15,15 @@ using namespace NEO; using PreambleCfeState = PreambleFixture; -XE_HPC_CORETEST_F(PreambleCfeState, givenPvcAndKernelExecutionTypeAndRevisionWhenCallingProgramVFEStateThenCFEStateParamsAreCorrectlySet) { + +XE_HPC_CORETEST_F(PreambleCfeState, givenXeHpcAndKernelExecutionTypeAndRevisionWhenCallingProgramVFEStateThenCFEStateParamsAreCorrectlySet) { using CFE_STATE = typename FamilyType::CFE_STATE; auto hwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); + + if (hwInfo->platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + const auto &hwInfoConfig = *NEO::HwInfoConfig::get(hwInfo->platform.eProductFamily); auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *hwInfo, EngineGroupType::RenderCompute); StreamProperties streamProperties{}; @@ -51,6 +57,10 @@ XE_HPC_CORETEST_F(PreambleCfeState, givenPvcXtTemporaryAndKernelExecutionTypeCon auto hwInfo = *defaultHwInfo; hwInfo.platform.usDeviceID = 0x0BE5; + if (hwInfo.platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + const auto &hwInfoConfig = *NEO::HwInfoConfig::get(hwInfo.platform.eProductFamily); hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, hwInfo); @@ -151,6 +161,10 @@ XE_HPC_CORETEST_F(PreamblePipelineSelectState, givenRevisionBAndAboveWhenCalling using PIPELINE_SELECT = typename FamilyType::PIPELINE_SELECT; auto hwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); + if (hwInfo->platform.eProductFamily != IGFX_PVC) { + GTEST_SKIP(); + } + PipelineSelectArgs pipelineArgs; pipelineArgs.specialPipelineSelectMode = true;