mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
Revert "fix ocloc/ult: set default PVC device id to pvc xt device id"
This reverts commit bd84ba819b.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
007f5d70bf
commit
e79fb5f39b
@@ -490,10 +490,8 @@ TEST(DebugSession, givenDifferentThreadsWhenGettingPerThreadScratchOffsetThenCor
|
|||||||
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, 0));
|
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, 0));
|
||||||
Mock<L0::DeviceImp> deviceImp(neoDevice, neoDevice->getExecutionEnvironment());
|
Mock<L0::DeviceImp> deviceImp(neoDevice, neoDevice->getExecutionEnvironment());
|
||||||
auto debugSession = std::make_unique<DebugSessionMock>(zet_debug_config_t{0x1234}, &deviceImp);
|
auto debugSession = std::make_unique<DebugSessionMock>(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);
|
||||||
const uint32_t numThreadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount) * multiplyFactor;
|
|
||||||
EuThread::ThreadId thread0Eu0 = {0, 0, 0, 0, 0};
|
EuThread::ThreadId thread0Eu0 = {0, 0, 0, 0, 0};
|
||||||
EuThread::ThreadId thread0Eu1 = {0, 0, 0, 1, 0};
|
EuThread::ThreadId thread0Eu1 = {0, 0, 0, 1, 0};
|
||||||
EuThread::ThreadId thread2Subslice1 = {0, 0, 1, 0, 2};
|
EuThread::ThreadId thread2Subslice1 = {0, 0, 1, 0, 2};
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ PVCTEST_F(PvcMultiRootDeviceCommandStreamReceiverBufferTests, givenMultipleEvent
|
|||||||
csHwParser.parseCommands<FamilyType>(pCmdQ1->getCS(0));
|
csHwParser.parseCommands<FamilyType>(pCmdQ1->getCS(0));
|
||||||
auto semaphores = findAll<MI_SEMAPHORE_WAIT *>(csHwParser.cmdList.begin(), csHwParser.cmdList.end());
|
auto semaphores = findAll<MI_SEMAPHORE_WAIT *>(csHwParser.cmdList.begin(), csHwParser.cmdList.end());
|
||||||
|
|
||||||
EXPECT_EQ(2u, semaphores.size());
|
EXPECT_EQ(3u, semaphores.size());
|
||||||
|
|
||||||
auto semaphoreCmd0 = genCmdCast<MI_SEMAPHORE_WAIT *>(*(semaphores[0]));
|
auto semaphoreCmd0 = genCmdCast<MI_SEMAPHORE_WAIT *>(*(semaphores[0]));
|
||||||
EXPECT_EQ(1u, semaphoreCmd0->getSemaphoreDataDword());
|
EXPECT_EQ(1u, semaphoreCmd0->getSemaphoreDataDword());
|
||||||
@@ -316,7 +316,7 @@ PVCTEST_F(PvcMultiRootDeviceCommandStreamReceiverBufferTests, givenMultipleEvent
|
|||||||
csHwParser.parseCommands<FamilyType>(pCmdQ2->getCS(0));
|
csHwParser.parseCommands<FamilyType>(pCmdQ2->getCS(0));
|
||||||
auto semaphores = findAll<MI_SEMAPHORE_WAIT *>(csHwParser.cmdList.begin(), csHwParser.cmdList.end());
|
auto semaphores = findAll<MI_SEMAPHORE_WAIT *>(csHwParser.cmdList.begin(), csHwParser.cmdList.end());
|
||||||
|
|
||||||
EXPECT_EQ(2u, semaphores.size());
|
EXPECT_EQ(3u, semaphores.size());
|
||||||
|
|
||||||
auto semaphoreCmd0 = genCmdCast<MI_SEMAPHORE_WAIT *>(*(semaphores[0]));
|
auto semaphoreCmd0 = genCmdCast<MI_SEMAPHORE_WAIT *>(*(semaphores[0]));
|
||||||
EXPECT_EQ(1u, semaphoreCmd0->getSemaphoreDataDword());
|
EXPECT_EQ(1u, semaphoreCmd0->getSemaphoreDataDword());
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
|
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
|
||||||
#include "shared/source/command_stream/preemption_mode.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/gen9/hw_cmds_cfl.h"
|
||||||
#include "shared/source/helpers/compiler_product_helper.h"
|
#include "shared/source/helpers/compiler_product_helper.h"
|
||||||
#include "shared/source/helpers/constants.h"
|
#include "shared/source/helpers/constants.h"
|
||||||
@@ -24,11 +23,11 @@ const PLATFORM CFL::platform = {
|
|||||||
PCH_UNKNOWN,
|
PCH_UNKNOWN,
|
||||||
IGFX_GEN9_CORE,
|
IGFX_GEN9_CORE,
|
||||||
IGFX_GEN9_CORE,
|
IGFX_GEN9_CORE,
|
||||||
PLATFORM_NONE, // default init
|
PLATFORM_NONE, // default init
|
||||||
cflDeviceIds[0], // usDeviceID
|
0, // usDeviceID
|
||||||
9, // usRevId. 0 sets the stepping to A0
|
9, // usRevId. 0 sets the stepping to A0
|
||||||
0, // usDeviceID_PCH
|
0, // usDeviceID_PCH
|
||||||
0, // usRevId_PCH
|
0, // usRevId_PCH
|
||||||
GTTYPE_UNDEFINED};
|
GTTYPE_UNDEFINED};
|
||||||
|
|
||||||
const RuntimeCapabilityTable CFL::capabilityTable{
|
const RuntimeCapabilityTable CFL::capabilityTable{
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
|
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
|
||||||
#include "shared/source/command_stream/preemption_mode.h"
|
#include "shared/source/command_stream/preemption_mode.h"
|
||||||
#include "shared/source/gen9/hw_cmds_kbl.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/compiler_product_helper.h"
|
||||||
#include "shared/source/helpers/constants.h"
|
#include "shared/source/helpers/constants.h"
|
||||||
|
|
||||||
@@ -24,11 +23,11 @@ const PLATFORM KBL::platform = {
|
|||||||
PCH_UNKNOWN,
|
PCH_UNKNOWN,
|
||||||
IGFX_GEN9_CORE,
|
IGFX_GEN9_CORE,
|
||||||
IGFX_GEN9_CORE,
|
IGFX_GEN9_CORE,
|
||||||
PLATFORM_NONE, // default init
|
PLATFORM_NONE, // default init
|
||||||
kblDeviceIds[0], // usDeviceID
|
0, // usDeviceID
|
||||||
9, // usRevId. 0 sets the stepping to A0
|
9, // usRevId. 0 sets the stepping to A0
|
||||||
0, // usDeviceID_PCH
|
0, // usDeviceID_PCH
|
||||||
0, // usRevId_PCH
|
0, // usRevId_PCH
|
||||||
GTTYPE_UNDEFINED};
|
GTTYPE_UNDEFINED};
|
||||||
|
|
||||||
const RuntimeCapabilityTable KBL::capabilityTable{
|
const RuntimeCapabilityTable KBL::capabilityTable{
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
#include "shared/source/helpers/constants.h"
|
#include "shared/source/helpers/constants.h"
|
||||||
#include "shared/source/unified_memory/usm_memory_support.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/hw_cmds_pvc.h"
|
||||||
#include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h"
|
|
||||||
|
|
||||||
#include "aubstream/engine_node.h"
|
#include "aubstream/engine_node.h"
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
@@ -26,11 +25,11 @@ const PLATFORM PVC::platform = {
|
|||||||
PCH_UNKNOWN,
|
PCH_UNKNOWN,
|
||||||
IGFX_XE_HPC_CORE,
|
IGFX_XE_HPC_CORE,
|
||||||
IGFX_XE_HPC_CORE,
|
IGFX_XE_HPC_CORE,
|
||||||
PLATFORM_NONE, // default init
|
PLATFORM_NONE, // default init
|
||||||
pvcXtDeviceIds[0], // usDeviceID
|
0, // usDeviceID
|
||||||
3, // usRevId. 0 sets the stepping to A0
|
0, // usRevId. 0 sets the stepping to A0
|
||||||
0, // usDeviceID_PCH
|
0, // usDeviceID_PCH
|
||||||
0, // usRevId_PCH
|
0, // usRevId_PCH
|
||||||
GTTYPE_UNDEFINED};
|
GTTYPE_UNDEFINED};
|
||||||
|
|
||||||
const RuntimeCapabilityTable PVC::capabilityTable{
|
const RuntimeCapabilityTable PVC::capabilityTable{
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||||
#include "shared/test/common/test_macros/hw_test.h"
|
#include "shared/test/common/test_macros/hw_test.h"
|
||||||
#include "shared/test/common/test_macros/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/fixtures/command_container_fixture.h"
|
||||||
#include "shared/test/unit_test/mocks/mock_dispatch_kernel_encoder_interface.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<STATE_COMPUTE_MODE *>(*itorCmd);
|
auto cmd = genCmdCast<STATE_COMPUTE_MODE *>(*itorCmd);
|
||||||
EXPECT_EQ(productHelper.isGrfNumReportedWithScm(), cmd->getLargeGrfMode());
|
EXPECT_EQ(productHelper.isGrfNumReportedWithScm(), cmd->getLargeGrfMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using CommandEncodeStatesTestHpc = Test<CommandEncodeStatesFixture>;
|
||||||
|
HWTEST2_F(CommandEncodeStatesTestHpc, GivenVariousSlmTotalSizesAndSettingRevIDToDifferentValuesWhenSetAdditionalInfoIsCalledThenCorrectValuesAreSet, IsPVC) {
|
||||||
|
using PREFERRED_SLM_ALLOCATION_SIZE = typename FamilyType::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||||
|
|
||||||
|
const std::vector<PreferredSlmTestValues<FamilyType>> 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<PreferredSlmTestValues<FamilyType>> 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<REVID, 5> 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<FamilyType>(valuesToTestForPvcAStep, pDevice->getRootDeviceEnvironment());
|
||||||
|
} else {
|
||||||
|
verifyPreferredSlmValues<FamilyType>(valuesToTest, pDevice->getRootDeviceEnvironment());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -41,12 +41,4 @@ HWTEST2_P(ProductConfigHwInfoTests, givenAotConfigWhenGetProductConfigThenCorrec
|
|||||||
hwInfo.ipVersion.revision = aotConfig.revision;
|
hwInfo.ipVersion.revision = aotConfig.revision;
|
||||||
auto ret = productHelper->getProductConfigFromHwInfo(hwInfo);
|
auto ret = productHelper->getProductConfigFromHwInfo(hwInfo);
|
||||||
EXPECT_EQ(ret, productConfig);
|
EXPECT_EQ(ret, productConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ProductConfigHwInfoTest, givenDefaultAotConfigWhenGetProductConfigThenSameValueIsReturned) {
|
|
||||||
MockExecutionEnvironment mockExecutionEnvironment{};
|
|
||||||
auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<ProductHelper>();
|
|
||||||
auto hwInfo = *defaultHwInfo;
|
|
||||||
auto ret = productHelper.getProductConfigFromHwInfo(hwInfo);
|
|
||||||
EXPECT_EQ(ret, hwInfo.ipVersion.value);
|
|
||||||
}
|
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
#include "shared/source/command_container/command_encoder.h"
|
#include "shared/source/command_container/command_encoder.h"
|
||||||
#include "shared/source/helpers/gfx_core_helper.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/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/cmd_parse/hw_parse.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/helpers/gfx_core_helper_tests.h"
|
#include "shared/test/common/helpers/gfx_core_helper_tests.h"
|
||||||
@@ -34,7 +33,6 @@ PVCTEST_F(GfxCoreHelperTestsPvc, givenRevisionEnumAndPlatformFamilyTypeThenPrope
|
|||||||
const auto &productHelper = getHelper<ProductHelper>();
|
const auto &productHelper = getHelper<ProductHelper>();
|
||||||
|
|
||||||
for (auto stepping : steppings) {
|
for (auto stepping : steppings) {
|
||||||
hardwareInfo.platform.usDeviceID = pvcXlDeviceIds[0];
|
|
||||||
hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(stepping, hardwareInfo);
|
hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(stepping, hardwareInfo);
|
||||||
|
|
||||||
if (stepping == REVISION_A0) {
|
if (stepping == REVISION_A0) {
|
||||||
@@ -63,14 +61,14 @@ PVCTEST_F(GfxCoreHelperTestsPvc, givenRevisionEnumAndPlatformFamilyTypeThenPrope
|
|||||||
}
|
}
|
||||||
|
|
||||||
PVCTEST_F(GfxCoreHelperTestsPvc, givenDefaultMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
|
PVCTEST_F(GfxCoreHelperTestsPvc, givenDefaultMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
|
||||||
EXPECT_EQ(sizeof(typename FamilyType::MI_MEM_FENCE), MemorySynchronizationCommands<XeHpcCoreFamily>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
|
EXPECT_EQ(NEO::EncodeSemaphore<FamilyType>::getSizeMiSemaphoreWait(), MemorySynchronizationCommands<XeHpcCoreFamily>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
|
||||||
}
|
}
|
||||||
|
|
||||||
PVCTEST_F(GfxCoreHelperTestsPvc, givenDebugMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
|
PVCTEST_F(GfxCoreHelperTestsPvc, givenDebugMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
|
||||||
DebugManagerStateRestore restorer;
|
DebugManagerStateRestore restorer;
|
||||||
DebugManager.flags.DisablePipeControlPrecedingPostSyncCommand.set(1);
|
DebugManager.flags.DisablePipeControlPrecedingPostSyncCommand.set(1);
|
||||||
|
|
||||||
EXPECT_EQ(2 * sizeof(typename FamilyType::MI_MEM_FENCE), MemorySynchronizationCommands<XeHpcCoreFamily>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
|
EXPECT_EQ(2 * NEO::EncodeSemaphore<FamilyType>::getSizeMiSemaphoreWait(), MemorySynchronizationCommands<XeHpcCoreFamily>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
|
||||||
}
|
}
|
||||||
|
|
||||||
PVCTEST_F(GfxCoreHelperTestsPvc, givenRevisionIdWhenGetComputeUnitsUsedForScratchThenReturnValidValue) {
|
PVCTEST_F(GfxCoreHelperTestsPvc, givenRevisionIdWhenGetComputeUnitsUsedForScratchThenReturnValidValue) {
|
||||||
|
|||||||
@@ -9,13 +9,11 @@
|
|||||||
#include "shared/source/xe_hpc_core/hw_cmds_pvc.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/source/xe_hpc_core/pvc/device_ids_configs_pvc.h"
|
||||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.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/helpers/default_hw_info.h"
|
||||||
#include "shared/test/common/mocks/mock_device.h"
|
#include "shared/test/common/mocks/mock_device.h"
|
||||||
#include "shared/test/common/mocks/mock_execution_environment.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/header/per_product_test_definitions.h"
|
||||||
#include "shared/test/common/test_macros/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/fixtures/command_container_fixture.h"
|
||||||
#include "shared/test/unit_test/mocks/mock_dispatch_kernel_encoder_interface.h"
|
#include "shared/test/unit_test/mocks/mock_dispatch_kernel_encoder_interface.h"
|
||||||
|
|
||||||
@@ -134,76 +132,4 @@ PVCTEST_F(EncodeKernelPvcTest, givenRevisionBAndAboveWhenSpecialModeRequiredAndA
|
|||||||
cmdContainer->reset();
|
cmdContainer->reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
using CommandEncodeStatesTestPvc = Test<CommandEncodeStatesFixture>;
|
|
||||||
PVCTEST_F(CommandEncodeStatesTestPvc, GivenVariousSlmTotalSizesAndSettingRevIDToDifferentValuesWhenSetAdditionalInfoIsCalledThenCorrectValuesAreSet) {
|
|
||||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename FamilyType::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
|
||||||
|
|
||||||
const std::vector<PreferredSlmTestValues<FamilyType>> 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<PreferredSlmTestValues<FamilyType>> 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<REVID, 5> 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<FamilyType>(valuesToTestForPvcAStep, pDevice->getRootDeviceEnvironment());
|
|
||||||
} else {
|
|
||||||
verifyPreferredSlmValues<FamilyType>(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<unsigned short> hwRevId{&hwInfo.platform.usRevId};
|
|
||||||
hwRevId = productHelper.getHwRevIdFromStepping(REVISION_A0, hwInfo);
|
|
||||||
|
|
||||||
uint32_t dims[] = {1, 1, 1};
|
|
||||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
|
||||||
dispatchInterface->getCrossThreadDataSizeResult = 0u;
|
|
||||||
|
|
||||||
bool requiresUncachedMocs = false;
|
|
||||||
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
|
|
||||||
dispatchArgs.isKernelUsingSystemAllocation = true;
|
|
||||||
dispatchArgs.isHostScopeSignalEvent = true;
|
|
||||||
|
|
||||||
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr);
|
|
||||||
|
|
||||||
GenCmdList commands;
|
|
||||||
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
|
|
||||||
|
|
||||||
auto itor = find<WALKER_TYPE *>(commands.begin(), commands.end());
|
|
||||||
ASSERT_NE(itor, commands.end());
|
|
||||||
|
|
||||||
auto walkerCmd = genCmdCast<WALKER_TYPE *>(*itor);
|
|
||||||
auto &postSyncData = walkerCmd->getPostSync();
|
|
||||||
EXPECT_FALSE(postSyncData.getSystemMemoryFenceRequest());
|
|
||||||
}
|
|
||||||
@@ -49,7 +49,6 @@ PVCTEST_F(PvcProductHelper, givenPVCRevId0WhenGettingThreadEuRatioForScratchThen
|
|||||||
|
|
||||||
PVCTEST_F(PvcProductHelper, givenPVCWithDifferentSteppingsThenImplicitScalingIsEnabledForBAndHigher) {
|
PVCTEST_F(PvcProductHelper, givenPVCWithDifferentSteppingsThenImplicitScalingIsEnabledForBAndHigher) {
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hwInfo.platform.usDeviceID = pvcXlDeviceIds[0];
|
|
||||||
|
|
||||||
for (uint32_t stepping = 0; stepping < 0x10; stepping++) {
|
for (uint32_t stepping = 0; stepping < 0x10; stepping++) {
|
||||||
auto hwRevIdFromStepping = productHelper->getHwRevIdFromStepping(stepping, hwInfo);
|
auto hwRevIdFromStepping = productHelper->getHwRevIdFromStepping(stepping, hwInfo);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "shared/source/kernel/kernel_descriptor.h"
|
#include "shared/source/kernel/kernel_descriptor.h"
|
||||||
#include "shared/source/os_interface/product_helper.h"
|
#include "shared/source/os_interface/product_helper.h"
|
||||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.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_device.h"
|
||||||
#include "shared/test/common/mocks/mock_execution_environment.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/header/per_product_test_definitions.h"
|
||||||
@@ -359,6 +360,41 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenFenceAsPostSyncOperationInComp
|
|||||||
EXPECT_TRUE(postSyncData.getSystemMemoryFenceRequest());
|
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<unsigned short> hwRevId{&hwInfo.platform.usRevId};
|
||||||
|
hwRevId = productHelper.getHwRevIdFromStepping(REVISION_A0, hwInfo);
|
||||||
|
|
||||||
|
uint32_t dims[] = {1, 1, 1};
|
||||||
|
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||||
|
dispatchInterface->getCrossThreadDataSizeResult = 0u;
|
||||||
|
|
||||||
|
bool requiresUncachedMocs = false;
|
||||||
|
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
|
||||||
|
dispatchArgs.isKernelUsingSystemAllocation = true;
|
||||||
|
dispatchArgs.isHostScopeSignalEvent = true;
|
||||||
|
|
||||||
|
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr);
|
||||||
|
|
||||||
|
GenCmdList commands;
|
||||||
|
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
|
||||||
|
|
||||||
|
auto itor = find<WALKER_TYPE *>(commands.begin(), commands.end());
|
||||||
|
ASSERT_NE(itor, commands.end());
|
||||||
|
|
||||||
|
auto walkerCmd = genCmdCast<WALKER_TYPE *>(*itor);
|
||||||
|
auto &postSyncData = walkerCmd->getPostSync();
|
||||||
|
EXPECT_FALSE(postSyncData.getSystemMemoryFenceRequest());
|
||||||
|
}
|
||||||
|
|
||||||
XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenKernelUsesSystemMemoryFlagTrueAndNoHostSignalEventThenNotUseSystemFence) {
|
XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenKernelUsesSystemMemoryFlagTrueAndNoHostSignalEventThenNotUseSystemFence) {
|
||||||
using WALKER_TYPE = typename FamilyType::WALKER_TYPE;
|
using WALKER_TYPE = typename FamilyType::WALKER_TYPE;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
if(TESTS_PVC)
|
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)
|
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user