mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
refactor: remove unused code
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
af6798f257
commit
1434872427
@@ -731,7 +731,7 @@ HWTEST_F(PauseOnGpuWithImmediateCommandListTests, givenPauseModeSetToBeforeAndAf
|
||||
|
||||
using CmdListPipelineSelectStateTest = Test<CmdListPipelineSelectStateFixture>;
|
||||
|
||||
using SystolicSupport = IsAnyProducts<IGFX_ALDERLAKE_P, IGFX_XE_HP_SDV, IGFX_DG2, IGFX_PVC>;
|
||||
using SystolicSupport = IsAnyProducts<IGFX_ALDERLAKE_P, IGFX_DG2, IGFX_PVC>;
|
||||
|
||||
HWTEST2_F(CmdListPipelineSelectStateTest,
|
||||
givenAppendSystolicKernelToCommandListWhenExecutingCommandListThenPipelineSelectStateIsTrackedCorrectly, SystolicSupport) {
|
||||
@@ -763,7 +763,7 @@ HWTEST2_F(CmdListThreadArbitrationTest,
|
||||
|
||||
using CmdListLargeGrfTest = Test<CmdListLargeGrfFixture>;
|
||||
|
||||
using LargeGrfSupport = IsAnyProducts<IGFX_XE_HP_SDV, IGFX_DG2, IGFX_PVC>;
|
||||
using LargeGrfSupport = IsAnyProducts<IGFX_DG2, IGFX_PVC>;
|
||||
HWTEST2_F(CmdListLargeGrfTest,
|
||||
givenAppendLargeGrfKernelToCommandListWhenExecutingCommandListThenStateComputeModeStateIsTrackedCorrectly, LargeGrfSupport) {
|
||||
testBody<FamilyType>();
|
||||
|
||||
@@ -1,180 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/gen_common/reg_configs_common.h"
|
||||
#include "shared/source/helpers/preamble.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/xe_hp_core/hw_cmds.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist.h"
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h"
|
||||
#include "level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/sources/debugger/l0_debugger_fixture.h"
|
||||
#include <level_zero/ze_api.h>
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using CommandQueueDebugCommandsForSldXeHP = Test<ActiveDebuggerFixture>;
|
||||
using CommandQueueDebugCommandsDebuggerL0XeHP = Test<L0DebuggerHwFixture>;
|
||||
|
||||
XEHPTEST_F(CommandQueueDebugCommandsForSldXeHP, givenSteppingA0OrBWhenGlobalSipIsUsedThenMmioIsRestoredAtTheEndOfCmdBuffer) {
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
ze_command_queue_desc_t queueDesc = {};
|
||||
ze_result_t returnValue;
|
||||
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
||||
|
||||
std::array<uint32_t, 2> revisions = {productHelper.getHwRevIdFromStepping(REVID::REVISION_A0, hwInfo),
|
||||
productHelper.getHwRevIdFromStepping(REVID::REVISION_B, hwInfo)};
|
||||
|
||||
for (auto revision : revisions) {
|
||||
hwInfo.platform.usRevId = revision;
|
||||
|
||||
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, deviceL0, NEO::EngineGroupType::RenderCompute, 0u, returnValue)->toHandle()};
|
||||
|
||||
uint32_t globalSipFound = 0;
|
||||
uint32_t debugModeFound = 0;
|
||||
uint32_t tdCtlFound = 0;
|
||||
std::vector<MI_LOAD_REGISTER_IMM *> globalSip;
|
||||
|
||||
for (uint32_t execCount = 0; execCount < 2; execCount++) {
|
||||
auto startPointer = ptrOffset(commandQueue->commandStream.getCpuBase(), commandQueue->commandStream.getUsed());
|
||||
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
auto result = commandQueue->executeCommandLists(1, commandLists, nullptr, true);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
commandQueue->synchronize(0);
|
||||
|
||||
auto usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
EXPECT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::PARSE::parseCommandBuffer(cmdList, startPointer, usedSpaceAfter - usedSpaceBefore));
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
|
||||
for (size_t i = 0; i < miLoadImm.size(); i++) {
|
||||
MI_LOAD_REGISTER_IMM *miLoad = genCmdCast<MI_LOAD_REGISTER_IMM *>(*miLoadImm[i]);
|
||||
ASSERT_NE(nullptr, miLoad);
|
||||
|
||||
if (miLoad->getRegisterOffset() == GlobalSipRegister<FamilyType>::registerOffset) {
|
||||
globalSip.push_back(miLoad);
|
||||
globalSipFound++;
|
||||
} else if (miLoad->getRegisterOffset() == 0x20d8u) {
|
||||
debugModeFound++;
|
||||
} else if (miLoad->getRegisterOffset() == TdDebugControlRegisterOffset<FamilyType>::registerOffset) {
|
||||
tdCtlFound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EXPECT_EQ(1u, debugModeFound);
|
||||
EXPECT_EQ(1u, tdCtlFound);
|
||||
|
||||
ASSERT_EQ(4u, globalSipFound);
|
||||
|
||||
auto sipAddress = globalSip[0]->getDataDword();
|
||||
auto sipAllocation = SipKernel::getSipKernel(*device).getSipAllocation();
|
||||
EXPECT_EQ(sipAllocation->getGpuAddressToPatch(), sipAddress & 0xfffffff8);
|
||||
|
||||
auto sipAddress2 = globalSip[1]->getDataDword();
|
||||
EXPECT_EQ(0u, sipAddress2);
|
||||
|
||||
auto sipAddress3 = globalSip[2]->getDataDword();
|
||||
EXPECT_EQ(sipAllocation->getGpuAddressToPatch(), sipAddress3 & 0xfffffff8);
|
||||
|
||||
auto sipAddress4 = globalSip[3]->getDataDword();
|
||||
EXPECT_EQ(0u, sipAddress4);
|
||||
|
||||
auto commandList = CommandList::fromHandle(commandLists[0]);
|
||||
commandList->destroy();
|
||||
|
||||
commandQueue->destroy();
|
||||
}
|
||||
}
|
||||
|
||||
XEHPTEST_F(CommandQueueDebugCommandsDebuggerL0XeHP, givenSteppingA0OrBWhenGlobalSipIsUsedThenMmioIsRestoredAtTheEndOfCmdBuffer) {
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
ze_command_queue_desc_t queueDesc = {};
|
||||
ze_result_t returnValue;
|
||||
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
||||
|
||||
std::array<uint32_t, 2> revisions = {productHelper.getHwRevIdFromStepping(REVID::REVISION_A0, hwInfo),
|
||||
productHelper.getHwRevIdFromStepping(REVID::REVISION_B, hwInfo)};
|
||||
|
||||
for (auto revision : revisions) {
|
||||
hwInfo.platform.usRevId = revision;
|
||||
|
||||
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)->toHandle()};
|
||||
|
||||
uint32_t globalSipFound = 0;
|
||||
std::vector<MI_LOAD_REGISTER_IMM *> globalSip;
|
||||
|
||||
for (uint32_t execCount = 0; execCount < 2; execCount++) {
|
||||
auto startPointer = ptrOffset(commandQueue->commandStream.getCpuBase(), commandQueue->commandStream.getUsed());
|
||||
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
auto result = commandQueue->executeCommandLists(1, commandLists, nullptr, true);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
commandQueue->synchronize(0);
|
||||
|
||||
auto usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
EXPECT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::PARSE::parseCommandBuffer(cmdList, startPointer, usedSpaceAfter - usedSpaceBefore));
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
|
||||
for (size_t i = 0; i < miLoadImm.size(); i++) {
|
||||
MI_LOAD_REGISTER_IMM *miLoad = genCmdCast<MI_LOAD_REGISTER_IMM *>(*miLoadImm[i]);
|
||||
ASSERT_NE(nullptr, miLoad);
|
||||
|
||||
if (miLoad->getRegisterOffset() == GlobalSipRegister<FamilyType>::registerOffset) {
|
||||
globalSip.push_back(miLoad);
|
||||
globalSipFound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT_EQ(4u, globalSipFound);
|
||||
|
||||
auto sipAddress = globalSip[0]->getDataDword();
|
||||
auto sipAllocation = SipKernel::getSipKernel(*neoDevice).getSipAllocation();
|
||||
EXPECT_EQ(sipAllocation->getGpuAddressToPatch(), sipAddress & 0xfffffff8);
|
||||
|
||||
auto sipAddress2 = globalSip[1]->getDataDword();
|
||||
EXPECT_EQ(0u, sipAddress2);
|
||||
|
||||
auto sipAddress3 = globalSip[2]->getDataDword();
|
||||
EXPECT_EQ(sipAllocation->getGpuAddressToPatch(), sipAddress3 & 0xfffffff8);
|
||||
|
||||
auto sipAddress4 = globalSip[3]->getDataDword();
|
||||
EXPECT_EQ(0u, sipAddress4);
|
||||
|
||||
auto commandList = CommandList::fromHandle(commandLists[0]);
|
||||
commandList->destroy();
|
||||
|
||||
commandQueue->destroy();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/xe_hp_core/hw_cmds.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 "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(L0GfxCoreHelperTest, givenBitmaskWithAttentionBitsForSingleThreadWhenGettingThreadsThenSingleCorrectThreadReturned, IGFX_XE_HP_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(L0GfxCoreHelperTest, givenBitmaskWithAttentionBitsForAllSubslicesWhenGettingThreadsThenCorrectThreadsAreReturned, IGFX_XE_HP_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(L0GfxCoreHelperTest, givenBitmaskWithAttentionBitsForAllEUsWhenGettingThreadsThenCorrectThreadsAreReturned, IGFX_XE_HP_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(L0GfxCoreHelperTest, givenEu0To1Threads0To3BitmaskWhenGettingThreadsThenCorrectThreadsAreReturned, IGFX_XE_HP_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(L0GfxCoreHelperTest, givenBitmaskWithAttentionBitsForHalfOfThreadsWhenGettingThreadsThenCorrectThreadsAreReturned, IGFX_XE_HP_CORE);
|
||||
|
||||
using L0GfxCoreHelperTestXeHp = ::testing::Test;
|
||||
|
||||
XEHPTEST_F(L0GfxCoreHelperTestXeHp, GivenXeHpWhenCheckingL0HelperForMultiTileCapablePlatformThenReturnTrue) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.multiTileCapablePlatform());
|
||||
}
|
||||
|
||||
XEHPTEST_F(L0GfxCoreHelperTestXeHp, GivenXeHpWhenCheckingL0HelperForCmdListHeapSharingSupportThenReturnTrue) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.platformSupportsCmdListHeapSharing());
|
||||
}
|
||||
|
||||
XEHPTEST_F(L0GfxCoreHelperTestXeHp, GivenXeHpWhenCheckingL0HelperForStateComputeModeTrackingSupportThenReturnTrue) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.platformSupportsStateComputeModeTracking());
|
||||
}
|
||||
|
||||
XEHPTEST_F(L0GfxCoreHelperTestXeHp, GivenXeHpWhenCheckingL0HelperForFrontEndTrackingSupportThenReturnTrue) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.platformSupportsFrontEndTracking());
|
||||
}
|
||||
|
||||
XEHPTEST_F(L0GfxCoreHelperTestXeHp, GivenXeHpWhenCheckingL0HelperForPipelineSelectTrackingSupportThenReturnTrue) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.platformSupportsPipelineSelectTracking());
|
||||
}
|
||||
|
||||
XEHPTEST_F(L0GfxCoreHelperTestXeHp, GivenXeHpWhenCheckingL0HelperForRayTracingSupportThenReturnTrue) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.platformSupportsRayTracing());
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
Reference in New Issue
Block a user