refactor: remove not needed code

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-10-07 11:27:48 +00:00
committed by Compute-Runtime-Automation
parent 17199556ca
commit f3e4ba9ff6
30 changed files with 53 additions and 2218 deletions

View File

@@ -22,11 +22,6 @@
using namespace NEO;
TEST(AubHelper, GivenZeroPdEntryBitsWhenGetMemTraceIsCalledThenTraceNonLocalIsReturned) {
int hint = AubHelper::getMemTrace(0u);
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceNonlocal, hint);
}
TEST(AubHelper, WhenGetPtEntryBitsIsCalledThenEntryBitsAreNotMasked) {
uint64_t entryBits = BIT(PageTableEntry::presentBit) |
BIT(PageTableEntry::writableBit) |
@@ -53,11 +48,6 @@ TEST(AubHelper, GivenMultipleSubDevicesWhenGettingDeviceCountThenCorrectValueIsR
EXPECT_EQ(devicesCount, 1u);
}
TEST(AubHelper, WhenGetMemTraceIsCalledWithLocalMemoryPDEntryBitsThenTraceLocalIsReturned) {
int hint = AubHelper::getMemTrace(BIT(PageTableEntry::localMemoryBit));
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, hint);
}
TEST(AubHelper, WhenMaskPTEntryBitsIsCalledThenLocalMemoryBitIsMasked) {
uint64_t entryBits = BIT(PageTableEntry::presentBit) |
BIT(PageTableEntry::writableBit) |
@@ -67,14 +57,6 @@ TEST(AubHelper, WhenMaskPTEntryBitsIsCalledThenLocalMemoryBitIsMasked) {
EXPECT_EQ(entryBits & ~BIT(PageTableEntry::localMemoryBit), maskedEntryBits);
}
TEST(AubHelper, WhenGetMemTypeIsCalledWithAGivenAddressSpaceThenCorrectMemTypeIsReturned) {
uint32_t addressSpace = AubHelper::getMemType(AubMemDump::AddressSpaceValues::TraceLocal);
EXPECT_EQ(MemType::local, addressSpace);
addressSpace = AubHelper::getMemType(AubMemDump::AddressSpaceValues::TraceNonlocal);
EXPECT_EQ(MemType::system, addressSpace);
}
TEST(AubHelper, WhenHBMSizePerTileInGigabytesIsSetThenGetMemBankSizeReturnsCorrectValue) {
DebugManagerStateRestore stateRestore;
debugManager.flags.HBMSizePerTileInGigabytes.set(8);
@@ -163,81 +145,7 @@ HWTEST_F(AubHelperTest, WhenHBMSizePerTileInGigabytesIsNotSetThenGetMemBankSizeR
EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo, releaseHelper.get()));
}
using AubHelperHwTest = Test<DeviceFixture>;
HWTEST_F(AubHelperHwTest, GivenDisabledLocalMemoryWhenGetDataHintForPml4EntryIsCalledThenTraceNotypeIsReturned) {
AubHelperHw<FamilyType> aubHelper(false);
int dataHint = aubHelper.getDataHintForPml4Entry();
EXPECT_EQ(AubMemDump::DataTypeHintValues::TraceNotype, dataHint);
}
HWTEST_F(AubHelperHwTest, GivenDisabledLocalMemoryWhenGetDataHintForPdpEntryIsCalledThenTraceNotypeIsReturned) {
AubHelperHw<FamilyType> aubHelper(false);
int dataHint = aubHelper.getDataHintForPdpEntry();
EXPECT_EQ(AubMemDump::DataTypeHintValues::TraceNotype, dataHint);
}
HWTEST_F(AubHelperHwTest, GivenDisabledLocalMemoryWhenGetDataHintForPdEntryIsCalledThenTraceNotypeIsReturned) {
AubHelperHw<FamilyType> aubHelper(false);
int dataHint = aubHelper.getDataHintForPdEntry();
EXPECT_EQ(AubMemDump::DataTypeHintValues::TraceNotype, dataHint);
}
HWTEST_F(AubHelperHwTest, GivenDisabledLocalMemoryWhenGetDataHintForPtEntryIsCalledThenTraceNotypeIsReturned) {
AubHelperHw<FamilyType> aubHelper(false);
int dataHint = aubHelper.getDataHintForPtEntry();
EXPECT_EQ(AubMemDump::DataTypeHintValues::TraceNotype, dataHint);
}
HWTEST_F(AubHelperHwTest, GivenDisabledLocalMemoryWhenGetMemTraceForPml4EntryIsCalledThenTracePml4EntryIsReturned) {
AubHelperHw<FamilyType> aubHelper(false);
int addressSpace = aubHelper.getMemTraceForPml4Entry();
EXPECT_EQ(AubMemDump::AddressSpaceValues::TracePml4Entry, addressSpace);
}
HWTEST_F(AubHelperHwTest, GivenDisabledLocalMemoryWhenGetMemTraceForPdpEntryIsCalledThenTracePhysicalPdpEntryIsReturned) {
AubHelperHw<FamilyType> aubHelper(false);
int addressSpace = aubHelper.getMemTraceForPdpEntry();
EXPECT_EQ(AubMemDump::AddressSpaceValues::TracePhysicalPdpEntry, addressSpace);
}
HWTEST_F(AubHelperHwTest, GivenDisabledLocalMemoryWhenGetMemTraceForPd4EntryIsCalledThenTracePpgttPdEntryIsReturned) {
AubHelperHw<FamilyType> aubHelper(false);
int addressSpace = aubHelper.getMemTraceForPdEntry();
EXPECT_EQ(AubMemDump::AddressSpaceValues::TracePpgttPdEntry, addressSpace);
}
HWTEST_F(AubHelperHwTest, GivenDisabledLocalMemoryWhenGetMemTraceForPtEntryIsCalledThenTracePpgttEntryIsReturned) {
AubHelperHw<FamilyType> aubHelper(false);
int addressSpace = aubHelper.getMemTraceForPtEntry();
EXPECT_EQ(AubMemDump::AddressSpaceValues::TracePpgttEntry, addressSpace);
}
HWTEST_F(AubHelperHwTest, GivenEnabledLocalMemoryWhenGetMemTraceForPml4EntryIsCalledThenTraceLocalIsReturned) {
AubHelperHw<FamilyType> aubHelper(true);
int addressSpace = aubHelper.getMemTraceForPml4Entry();
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
}
HWTEST_F(AubHelperHwTest, GivenEnabledLocalMemoryWhenGetMemTraceForPdpEntryIsCalledThenTraceLocalIsReturned) {
AubHelperHw<FamilyType> aubHelper(true);
int addressSpace = aubHelper.getMemTraceForPdpEntry();
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
}
HWTEST_F(AubHelperHwTest, GivenEnabledLocalMemoryWhenGetMemTraceForPd4EntryIsCalledThenTraceLocalIsReturned) {
AubHelperHw<FamilyType> aubHelper(true);
int addressSpace = aubHelper.getMemTraceForPdEntry();
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
}
HWTEST_F(AubHelperHwTest, GivenEnabledLocalMemoryWhenGetMemTraceForPtEntryIsCalledThenTraceLocalIsReturned) {
AubHelperHw<FamilyType> aubHelper(true);
int addressSpace = aubHelper.getMemTraceForPtEntry();
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
}
HWTEST_F(AubHelperHwTest, givenLrcaHelperWhenContextIsInitializedThenContextFlagsAreSet) {
HWTEST_F(AubHelperTest, givenLrcaHelperWhenContextIsInitializedThenContextFlagsAreSet) {
const auto &csTraits = CommandStreamReceiverSimulatedCommonHw<FamilyType>::getCsTraits(aub_stream::ENGINE_RCS);
MockLrcaHelper lrcaHelper(csTraits.mmioBase);

View File

@@ -45,27 +45,6 @@ struct MockAubCsrToTestDumpAubNonWritable : public AUBCommandStreamReceiverHw<Gf
}
};
TEST_F(AubCommandStreamReceiverTests, givenStructureWhenMisalignedUint64ThenUseSetterGetterFunctionsToSetGetValue) {
const uint64_t value = 0x0123456789ABCDEFu;
AubMemDump::AubCaptureBinaryDumpHD aubCaptureBinaryDumpHD{};
aubCaptureBinaryDumpHD.setBaseAddr(value);
EXPECT_EQ(value, aubCaptureBinaryDumpHD.getBaseAddr());
aubCaptureBinaryDumpHD.setWidth(value);
EXPECT_EQ(value, aubCaptureBinaryDumpHD.getWidth());
aubCaptureBinaryDumpHD.setHeight(value);
EXPECT_EQ(value, aubCaptureBinaryDumpHD.getHeight());
aubCaptureBinaryDumpHD.setPitch(value);
EXPECT_EQ(value, aubCaptureBinaryDumpHD.getPitch());
AubMemDump::AubCmdDumpBmpHd aubCmdDumpBmpHd{};
aubCmdDumpBmpHd.setBaseAddr(value);
EXPECT_EQ(value, aubCmdDumpBmpHd.getBaseAddr());
AubMemDump::CmdServicesMemTraceDumpCompress cmdServicesMemTraceDumpCompress{};
cmdServicesMemTraceDumpCompress.setSurfaceAddress(value);
EXPECT_EQ(value, cmdServicesMemTraceDumpCompress.getSurfaceAddress());
}
HWTEST_F(AubCommandStreamReceiverTests, givenDebugFlagSetWhenCreatingContextThenAppendFlags) {
DebugManagerStateRestore dbgRestore;
debugManager.flags.AppendAubStreamContextFlags.set(0x123);
@@ -1167,4 +1146,4 @@ HWTEST_F(AubCommandStreamReceiverTests, givenDebugOverwritesForImplicitFlushesWh
auto aubCsr = aubExecutionEnvironment->template getCsr<UltAubCommandStreamReceiver<FamilyType>>();
EXPECT_FALSE(aubCsr->useGpuIdleImplicitFlush);
EXPECT_FALSE(aubCsr->useNewResourceImplicitFlush);
}
}

View File

@@ -627,13 +627,6 @@ HWTEST_F(AubCommandStreamReceiverTests, whenGetMemoryBankForGttIsCalledThenCorre
EXPECT_EQ(MemoryBanks::mainBank, bank);
}
HWTEST_F(AubCommandStreamReceiverTests, givenEntryBitsPresentAndWritableWhenGetAddressSpaceFromPTEBitsIsCalledThenTraceNonLocalIsReturned) {
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
auto space = aubCsr->getAddressSpaceFromPTEBits(PageTableEntry::presentBit | PageTableEntry::writableBit);
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceNonlocal, space);
}
template <typename GfxFamily>
struct MockAubCsrToTestExternalAllocations : public AUBCommandStreamReceiverHw<GfxFamily> {
using AUBCommandStreamReceiverHw<GfxFamily>::AUBCommandStreamReceiverHw;

View File

@@ -22,82 +22,6 @@ using namespace NEO;
using AubCsrTest = ::testing::Test;
HWTEST_F(AubCsrTest, givenLocalMemoryEnabledWhenGettingAddressSpaceForRingDataTypeThenTraceLocalIsReturned) {
DebugManagerStateRestore restorer;
debugManager.flags.UseAubStream.set(false);
debugManager.flags.EnableLocalMemory.set(1);
auto hwInfo = *NEO::defaultHwInfo.get();
hwInfo.featureTable.flags.ftrLocalMemory = true;
std::unique_ptr<ExecutionEnvironment> executionEnvironment(new ExecutionEnvironment);
DeviceBitfield deviceBitfield(1);
executionEnvironment->prepareRootDeviceEnvironments(1);
uint32_t rootDeviceIndex = 0u;
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfoAndInitHelpers(&hwInfo);
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->initGmm();
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->aubCenter.reset(new AubCenter());
executionEnvironment->initializeMemoryManager();
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *executionEnvironment, rootDeviceIndex, deviceBitfield));
int types[] = {AubMemDump::DataTypeHintValues::TraceLogicalRingContextRcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextCcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextBcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVecs,
AubMemDump::DataTypeHintValues::TraceCommandBuffer};
for (uint32_t i = 0; i < 6; i++) {
auto addressSpace = aubCsr->getAddressSpace(types[i]);
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
}
auto addressSpace = aubCsr->getAddressSpace(AubMemDump::DataTypeHintValues::TraceNotype);
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceNonlocal, addressSpace);
}
HWTEST_F(AubCsrTest, givenAUBDumpForceAllToLocalMemoryWhenGettingAddressSpaceForAnyDataTypeThenTraceLocalIsReturned) {
DebugManagerStateRestore restorer;
debugManager.flags.AUBDumpForceAllToLocalMemory.set(1);
auto hwInfo = *NEO::defaultHwInfo.get();
std::unique_ptr<ExecutionEnvironment> executionEnvironment(new ExecutionEnvironment);
DeviceBitfield deviceBitfield(1);
executionEnvironment->prepareRootDeviceEnvironments(1);
uint32_t rootDeviceIndex = 0u;
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfoAndInitHelpers(&hwInfo);
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->initGmm();
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->initAubCenter(false, "", CommandStreamReceiverType::aub);
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->aubCenter->getAubManager();
executionEnvironment->initializeMemoryManager();
std::unique_ptr<CommandStreamReceiver> commandStreamReceiver = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>(
"", false, *executionEnvironment, rootDeviceIndex, deviceBitfield);
auto osContext = std::make_unique<MockOsContext>(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_RCS, EngineUsage::regular}));
commandStreamReceiver->setupContext(*osContext);
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *executionEnvironment, rootDeviceIndex, deviceBitfield));
int types[] = {AubMemDump::DataTypeHintValues::TraceLogicalRingContextRcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextCcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextBcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVecs,
AubMemDump::DataTypeHintValues::TraceCommandBuffer};
for (uint32_t i = 0; i < 6; i++) {
auto addressSpace = aubCsr->getAddressSpace(types[i]);
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
}
auto addressSpace = aubCsr->getAddressSpace(AubMemDump::DataTypeHintValues::TraceNotype);
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
}
HWTEST_F(AubCsrTest, WhenWriteWithAubManagerIsCalledThenAubManagerIsInvokedWithCorrectHintAndParams) {
auto hwInfo = *NEO::defaultHwInfo.get();

View File

@@ -52,7 +52,6 @@ struct XeHPAndLaterAubCommandStreamReceiverTests : DeviceFixture, ::testing::Tes
template <typename FamilyType>
class MockAubCsrXeHPAndLater : public AUBCommandStreamReceiverHw<FamilyType> {
public:
using AUBCommandStreamReceiverHw<FamilyType>::getAddressSpace;
using CommandStreamReceiverHw<FamilyType>::localMemoryEnabled;
using CommandStreamReceiverSimulatedHw<FamilyType>::createPhysicalAddressAllocator;
@@ -132,41 +131,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenAub
EXPECT_EQ(3u | (1 << 11), bits);
}
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenAubDumpForceAllToLocalMemoryEnabledWhenGetAddressSpaceIsCalledThenTraceLocalIsReturned) {
setUpImpl<FamilyType>();
DebugManagerStateRestore debugRestorer;
debugManager.flags.AUBDumpForceAllToLocalMemory.set(true);
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
auto addressSpace = aubCsr->getAddressSpace(AubMemDump::DataTypeHintValues::TraceNotype);
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
}
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenAubDumpForceAllToLocalMemoryDisabledWhenGetAddressSpaceIsCalledThenTraceNonlocalIsReturned) {
setUpImpl<FamilyType>();
DebugManagerStateRestore debugRestorer;
debugManager.flags.AUBDumpForceAllToLocalMemory.set(false);
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
auto addressSpace = aubCsr->getAddressSpace(AubMemDump::DataTypeHintValues::TraceNotype);
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceNonlocal, addressSpace);
}
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenLocaLMemoryBitWhenGetAddressSpaceFromPTEBitsIsCalledThenTraceLocalIsReturned) {
setUpImpl<FamilyType>();
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
uint64_t bits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit) | BIT(PageTableEntry::localMemoryBit);
auto addressSpace = aubCsr->getAddressSpaceFromPTEBits(bits);
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, addressSpace);
}
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, givenLocalMemoryEnabledWhenGetMemoryBankForGttIsCalledThenCorrectBankForDeviceIsReturned) {
setUpImpl<FamilyType>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Intel Corporation
* Copyright (C) 2021-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -198,83 +198,6 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndAllocationWithStorageIn
EXPECT_TRUE(banksBitfield.test(deviceIndex));
}
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryWhenSimulatedCsrGetAddressSpaceIsCalledWithDifferentHintsThenCorrectSpaceIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
std::array<uint32_t, 6> localMemoryHints = {AubMemDump::DataTypeHintValues::TraceLogicalRingContextRcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextCcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextBcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVecs,
AubMemDump::DataTypeHintValues::TraceCommandBuffer};
auto csr = std::make_unique<MockSimulatedCsrHw<FamilyType>>(executionEnvironment, 0, 1);
if (csr->localMemoryEnabled) {
for (const uint32_t hint : localMemoryHints) {
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, csr->getAddressSpace(hint));
}
}
std::array<uint32_t, 1> nonLocalMemoryHints = {AubMemDump::DataTypeHintValues::TraceNotype};
for (const uint32_t hint : nonLocalMemoryHints) {
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceNonlocal, csr->getAddressSpace(hint));
}
}
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryDisabledWhenSimulatedCsrGetAddressSpaceIsCalledWithDifferentHintsThenCorrectSpaceIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.flags.ftrLocalMemory = false;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
std::array<uint32_t, 7> nonLocalMemoryHints = {AubMemDump::DataTypeHintValues::TraceNotype,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextRcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextCcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextBcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVecs,
AubMemDump::DataTypeHintValues::TraceCommandBuffer};
auto csr = std::make_unique<MockSimulatedCsrHw<FamilyType>>(executionEnvironment, 0, 1);
for (const uint32_t hint : nonLocalMemoryHints) {
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceNonlocal, csr->getAddressSpace(hint));
}
}
HWTEST_F(CommandStreamSimulatedTests, givenAUBDumpForceAllToLocalMemoryWhenSimulatedCsrGetAddressSpaceIsCalledWithDifferentHintsThenTraceLocalIsReturned) {
DebugManagerStateRestore debugRestorer;
debugManager.flags.AUBDumpForceAllToLocalMemory.set(true);
hardwareInfo.featureTable.flags.ftrLocalMemory = false;
ExecutionEnvironment executionEnvironment;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
std::array<uint32_t, 7> localMemoryHints = {AubMemDump::DataTypeHintValues::TraceNotype,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextRcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextCcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextBcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVcs,
AubMemDump::DataTypeHintValues::TraceLogicalRingContextVecs,
AubMemDump::DataTypeHintValues::TraceCommandBuffer};
auto csr = std::make_unique<MockSimulatedCsrHw<FamilyType>>(executionEnvironment, 0, 1);
if (csr->localMemoryEnabled) {
for (const uint32_t hint : localMemoryHints) {
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, csr->getAddressSpace(hint));
}
}
}
HWTEST_F(CommandStreamSimulatedTests, givenMultipleBitsInStorageInfoWhenQueryingDeviceIndexThenLowestDeviceIndexIsReturned) {
StorageInfo storageInfo;
@@ -704,4 +627,4 @@ HWTEST_F(CommandStreamSimulatedTests, givenEmptyBarrierNodesWhenProgramStallingC
EXPECT_EQ(PIPE_CONTROL::POST_SYNC_OPERATION::POST_SYNC_OPERATION_NO_WRITE, pipeControl->getPostSyncOperation());
EXPECT_EQ(0u, UnitTestHelper<FamilyType>::getPipeControlPostSyncAddress(*pipeControl));
}
}
}

View File

@@ -63,7 +63,6 @@ endif()
if(TESTS_XEHP_AND_LATER)
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper_hw_tests_xehp_and_later.cpp
${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper_tests_xehp_and_later.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_blit_commands_helper_xehp_and_later.cpp
)

View File

@@ -1,31 +0,0 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub/aub_helper.h"
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/test/common/test_macros/hw_test.h"
using namespace NEO;
using AubHelperHwTestXeHPAndLater = ::testing::Test;
HWCMDTEST_F(IGFX_XE_HP_CORE, AubHelperHwTestXeHPAndLater, givenAubHelperWhenGetDataHintForPml4EntryIsCalledThenTracePpgttLevel4IsReturned) {
AubHelperHw<FamilyType> aubHelper(true);
EXPECT_EQ(AubMemDump::DataTypeHintValues::TracePpgttLevel4, aubHelper.getDataHintForPml4Entry());
}
HWCMDTEST_F(IGFX_XE_HP_CORE, AubHelperHwTestXeHPAndLater, givenAubHelperWhenGetDataHintForPml4EntryIsCalledThenTracePpgttLevel3IsReturned) {
AubHelperHw<FamilyType> aubHelper(true);
EXPECT_EQ(AubMemDump::DataTypeHintValues::TracePpgttLevel3, aubHelper.getDataHintForPdpEntry());
}
HWCMDTEST_F(IGFX_XE_HP_CORE, AubHelperHwTestXeHPAndLater, givenAubHelperWhenGetDataHintForPml4EntryIsCalledThenTracePpgttLevel2IsReturned) {
AubHelperHw<FamilyType> aubHelper(true);
EXPECT_EQ(AubMemDump::DataTypeHintValues::TracePpgttLevel2, aubHelper.getDataHintForPdEntry());
}
HWCMDTEST_F(IGFX_XE_HP_CORE, AubHelperHwTestXeHPAndLater, givenAubHelperWhenGetDataHintForPml4EntryIsCalledThenTracePpgttLevel1IsReturned) {
AubHelperHw<FamilyType> aubHelper(true);
EXPECT_EQ(AubMemDump::DataTypeHintValues::TracePpgttLevel1, aubHelper.getDataHintForPtEntry());
}