refactor: remove dead code

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-09-17 09:55:30 +00:00
committed by Compute-Runtime-Automation
parent de7cd4dd0d
commit 5912b43841
33 changed files with 100 additions and 341 deletions

View File

@@ -291,8 +291,7 @@ HWTEST2_F(CommandListAppend, givenCommandListWhenMemoryCopyCalledThenAppendMemor
EXPECT_EQ(cmdList.appendMemoryCopyBlitCalledTimes, 0u);
}
using PrePvcCore = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_XE_HPG_CORE>;
HWTEST2_F(CommandListAppend, givenCommandListWhenMemoryCopyCalledThenAppendMemoryCopyWithoutStatelessKernelIsCalled, PrePvcCore) {
HWTEST2_F(CommandListAppend, givenCommandListWhenMemoryCopyCalledThenAppendMemoryCopyWithoutStatelessKernelIsCalled, IsAtMostXeHpgCore) {
MockCommandListHw<gfxCoreFamily> cmdList;
cmdList.initialize(device, NEO::EngineGroupType::renderCompute, 0u);
void *srcPtr = reinterpret_cast<void *>(0x1234);
@@ -693,9 +692,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyWithSignalEventsThenS
EXPECT_NE(cmdList.end(), itor);
}
using platformSupport = IsWithinProducts<IGFX_SKYLAKE, IGFX_TIGERLAKE_LP>;
HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyWithSignalEventScopeSetToDeviceThenSinglePipeControlIsAddedWithDcFlush, platformSupport) {
HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyWithSignalEventScopeSetToDeviceThenSinglePipeControlIsAddedWithDcFlush, IsTGLLP) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
using POST_SYNC_OPERATION = typename PIPE_CONTROL::POST_SYNC_OPERATION;
@@ -737,7 +734,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyWithSignalEventScopeS
EXPECT_EQ(1u, postSyncFound);
}
HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyWithSignalEventScopeSetToSubDeviceThenB2BPipeControlIsAddedWithDcFlushForLastPC, platformSupport) {
HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyWithSignalEventScopeSetToSubDeviceThenB2BPipeControlIsAddedWithDcFlushForLastPC, IsTGLLP) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
using POST_SYNC_OPERATION = typename PIPE_CONTROL::POST_SYNC_OPERATION;

View File

@@ -254,7 +254,7 @@ HWTEST2_F(CommandListExecuteImmediate, GivenImmediateCommandListWhenCommandListI
}
using CommandListTest = Test<DeviceFixture>;
using IsDcFlushSupportedPlatform = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_XE_HP_CORE>;
using IsDcFlushSupportedPlatform = IsGen12LP;
HWTEST2_F(CommandListTest, givenCopyCommandListWhenRequiredFlushOperationThenExpectNoPipeControl, IsDcFlushSupportedPlatform) {
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()));
@@ -728,7 +728,7 @@ HWTEST2_F(CommandListTest,
context->freeMem(dstBuffer);
}
using ImageSupport = IsNotAnyGfxCores<IGFX_GEN8_CORE, IGFX_XE_HPC_CORE>;
using ImageSupport = IsNotAnyGfxCores<IGFX_XE_HPC_CORE>;
HWTEST2_F(CommandListTest, givenComputeCommandListWhenCopyFromImageToImageTheBuiltinFlagIsSet, ImageSupport) {
auto kernel = device->getBuiltinFunctionsLib()->getImageFunction(ImageBuiltin::copyImageRegion);

View File

@@ -272,8 +272,7 @@ TEST_F(CommandListCreate, givenRootDeviceAndImplicitScalingDisabledWhenCreatingC
L0::CommandList::fromHandle(commandList)->destroy();
}
using SingleTileOnlyPlatforms = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_GEN12LP_CORE>;
HWTEST2_F(CommandListCreate, givenSingleTileOnlyPlatformsWhenProgrammingMultiTileBarrierThenNoProgrammingIsExpected, SingleTileOnlyPlatforms) {
HWTEST2_F(CommandListCreate, givenSingleTileOnlyPlatformsWhenProgrammingMultiTileBarrierThenNoProgrammingIsExpected, IsGen12LP) {
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
auto neoDevice = device->getNEODevice();
@@ -638,9 +637,8 @@ HWTEST2_F(CommandListCreate, givenCommandListAndHostPointersWhenMemoryCopyCalled
using CmdlistAppendLaunchKernelTests = Test<ModuleImmutableDataFixture>;
using IsBetweenGen9AndGen12lp = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_GEN12LP_CORE>;
HWTEST2_F(CmdlistAppendLaunchKernelTests,
givenImmediateCommandListUsesFlushTaskWhenDispatchingKernelWithSpillScratchSpaceThenExpectCsrHasCorrectValuesSet, IsBetweenGen9AndGen12lp) {
givenImmediateCommandListUsesFlushTaskWhenDispatchingKernelWithSpillScratchSpaceThenExpectCsrHasCorrectValuesSet, IsGen12LP) {
constexpr uint32_t scratchPerThreadSize = 0x200;
std::unique_ptr<MockImmutableData> mockKernelImmData = std::make_unique<MockImmutableData>(0u);

View File

@@ -278,10 +278,8 @@ HWTEST2_F(AppendFillTest,
delete[] nonMultipleDstPtr;
}
using IsBetweenGen9AndGen12lp = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_GEN12LP_CORE>;
HWTEST2_F(AppendFillTest,
givenCallToAppendMemoryFillWithImmediateValueWhenTimestampEventUsesRegistersThenSinglePacketUsesRegisterProfiling, IsBetweenGen9AndGen12lp) {
givenCallToAppendMemoryFillWithImmediateValueWhenTimestampEventUsesRegistersThenSinglePacketUsesRegisterProfiling, IsGen12LP) {
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
using GPGPU_WALKER = typename GfxFamily::GPGPU_WALKER;
@@ -337,7 +335,7 @@ HWTEST2_F(AppendFillTest,
}
HWTEST2_F(AppendFillTest,
givenCallToAppendMemoryFillWhenTimestampEventUsesRegistersThenSinglePacketUsesRegisterProfiling, IsBetweenGen9AndGen12lp) {
givenCallToAppendMemoryFillWhenTimestampEventUsesRegistersThenSinglePacketUsesRegisterProfiling, IsGen12LP) {
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
using GPGPU_WALKER = typename GfxFamily::GPGPU_WALKER;

View File

@@ -2559,9 +2559,7 @@ HWTEST2_F(InOrderCmdListTests, givenEmptyTempAllocationsStorageWhenCallingSynchr
EXPECT_EQ(1u, ultCsr->waitForCompletionWithTimeoutTaskCountCalled);
}
using NonPostSyncWalkerMatcher = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_GEN12LP_CORE>;
HWTEST2_F(InOrderCmdListTests, givenNonPostSyncWalkerWhenPatchingThenThrow, NonPostSyncWalkerMatcher) {
HWTEST2_F(InOrderCmdListTests, givenNonPostSyncWalkerWhenPatchingThenThrow, IsGen12LP) {
InOrderPatchCommandHelpers::PatchCmd<FamilyType> incorrectCmd(nullptr, nullptr, nullptr, 1, NEO::InOrderPatchCommandHelpers::PatchCmdType::none, false, false);
EXPECT_ANY_THROW(incorrectCmd.patch(1));
@@ -2571,7 +2569,7 @@ HWTEST2_F(InOrderCmdListTests, givenNonPostSyncWalkerWhenPatchingThenThrow, NonP
EXPECT_ANY_THROW(walkerCmd.patch(1));
}
HWTEST2_F(InOrderCmdListTests, givenNonPostSyncWalkerWhenAskingForNonWalkerSignalingRequiredThenReturnFalse, NonPostSyncWalkerMatcher) {
HWTEST2_F(InOrderCmdListTests, givenNonPostSyncWalkerWhenAskingForNonWalkerSignalingRequiredThenReturnFalse, IsGen12LP) {
auto immCmdList = createImmCmdList<gfxCoreFamily>();
auto eventPool1 = createEvents<FamilyType>(1, true);
@@ -2613,7 +2611,7 @@ HWTEST2_F(InOrderCmdListTests, givenMultipleAllocationsForWriteWhenAskingForNonW
EXPECT_FALSE(immCmdList2->isInOrderNonWalkerSignalingRequired(nullptr));
}
HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingWalkerThenProgramPipeControlWithSignalAllocation, NonPostSyncWalkerMatcher) {
HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingWalkerThenProgramPipeControlWithSignalAllocation, IsGen12LP) {
using WALKER = typename FamilyType::DefaultWalkerType;
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM;
@@ -2652,7 +2650,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingWalkerThenProgramP
EXPECT_EQ(immCmdList->inOrderExecInfo->getCounterValue(), sdiCmd->getDataDword0());
}
HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingKernelSplitThenProgramPcAndSignalAlloc, NonPostSyncWalkerMatcher) {
HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingKernelSplitThenProgramPcAndSignalAlloc, IsGen12LP) {
using WALKER = typename FamilyType::DefaultWalkerType;
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM;
@@ -2996,7 +2994,7 @@ HWTEST2_F(InOrderCmdListTests, givenImmediateEventWhenWaitingFromRegularCmdListT
ASSERT_EQ(1u, regularCmdList->inOrderPatchCmds.size());
if (NonPostSyncWalkerMatcher::isMatched<productFamily>()) {
if (IsGen12LP::isMatched<productFamily>()) {
EXPECT_EQ(NEO::InOrderPatchCommandHelpers::PatchCmdType::sdi, regularCmdList->inOrderPatchCmds[0].patchCmdType);
} else {
EXPECT_EQ(NEO::InOrderPatchCommandHelpers::PatchCmdType::walker, regularCmdList->inOrderPatchCmds[0].patchCmdType);

View File

@@ -1002,9 +1002,7 @@ HWTEST2_F(CommandQueueScratchTests, whenPatchCommandsIsCalledThenCommandsAreCorr
}
}
using IsWithinNotSupported = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_GEN12LP_CORE>;
HWTEST2_F(CommandQueueScratchTests, givenCommandsToPatchToNotSupportedPlatformWhenPatchCommandsIsCalledThenAbortIsThrown, IsWithinNotSupported) {
HWTEST2_F(CommandQueueScratchTests, givenCommandsToPatchToNotSupportedPlatformWhenPatchCommandsIsCalledThenAbortIsThrown, IsGen12LP) {
ze_command_queue_desc_t desc = {};
NEO::CommandStreamReceiver *csr = nullptr;
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u, ZE_COMMAND_QUEUE_PRIORITY_NORMAL, false);

View File

@@ -133,8 +133,7 @@ HWTEST_F(L0CmdQueueDebuggerTest, givenDebuggingEnabledWhenCmdListRequiringSbaPro
}
}
using IsBetweenGen9AndGen12lp = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_GEN12LP_CORE>;
HWTEST2_F(L0CmdQueueDebuggerTest, givenDebuggingEnabledAndRequiredGsbaWhenInternalCommandQueueThenProgramGsbaDoesNotWritesToSbaTrackingBuffer, IsBetweenGen9AndGen12lp) {
HWTEST2_F(L0CmdQueueDebuggerTest, givenDebuggingEnabledAndRequiredGsbaWhenInternalCommandQueueThenProgramGsbaDoesNotWritesToSbaTrackingBuffer, IsGen12LP) {
using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM;
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;

View File

@@ -194,9 +194,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, givenTwoCommandQueuesUsingS
commandQueue2->destroy();
}
using IsMmioPreemptionUsed = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_XE_HPC_CORE>;
HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, givenTwoCommandQueuesUsingSingleCsrWhenExecutingFirstTimeOnBothQueuesThenPreemptionModeIsProgrammedOnce, IsMmioPreemptionUsed) {
HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, givenTwoCommandQueuesUsingSingleCsrWhenExecutingFirstTimeOnBothQueuesThenPreemptionModeIsProgrammedOnce, IsAtMostXeHpcCore) {
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
ze_result_t returnValue;

View File

@@ -118,10 +118,9 @@ HWTEST_P(L0DebuggerParameterizedTests, givenL0DebuggerWhenCreatedThenPerContextS
}
}
using NotGen8Or11 = AreNotGfxCores<IGFX_GEN8_CORE, IGFX_GEN11_CORE>;
using Gen12Plus = IsAtLeastGfxCore<IGFX_GEN12_CORE>;
HWTEST2_F(L0DebuggerPerContextAddressSpaceTest, givenDebuggingEnabledAndRequiredGsbaWhenCommandListIsExecutedThenProgramGsbaWritesToSbaTrackingBuffer, NotGen8Or11) {
HWTEST2_F(L0DebuggerPerContextAddressSpaceTest, givenDebuggingEnabledAndRequiredGsbaWhenCommandListIsExecutedThenProgramGsbaWritesToSbaTrackingBuffer, MatchAny) {
using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM;
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;

View File

@@ -2445,7 +2445,7 @@ HWTEST_F(HostMappedEventTests, givenEventTimestampRefreshIntervalInMilliSecIsSet
EXPECT_EQ(resetReferenceTs->gpuTimeStamp, 1u);
}
HWCMDTEST_F(IGFX_GEN9_CORE, TimestampEventCreate, givenEventTimestampsWhenQueryKernelTimestampThenCorrectDataAreSet) {
HWCMDTEST_F(IGFX_GEN8_CORE, TimestampEventCreate, givenEventTimestampsWhenQueryKernelTimestampThenCorrectDataAreSet) {
typename MockTimestampPackets32::Packet data = {};
data.contextStart = 1u;
data.contextEnd = 2u;

View File

@@ -19,6 +19,8 @@
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h"
#include "multitile_matchers.h"
namespace L0 {
namespace ult {
@@ -695,8 +697,6 @@ HWTEST2_F(L0GfxCoreHelperFusedEuTest, givenBitmaskWithAttentionBitsForHalfOfThre
}
}
using NonMultiTilePlatforms = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_GEN12LP_CORE>;
HWTEST2_F(L0GfxCoreHelperTest, whenAlwaysAllocateEventInLocalMemCalledThenReturnFalse, IsNotXeHpcCore) {
MockExecutionEnvironment executionEnvironment;
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
@@ -722,7 +722,7 @@ TEST_F(L0GfxCoreHelperTest, givenL0GfxCoreHelperWhenGettingDefaultValueForDynami
EXPECT_TRUE(defaultValue);
}
HWTEST2_F(L0GfxCoreHelperTest, givenL0GfxCoreHelperWhenGettingMaxKernelAndMaxPacketThenExpectBothReturnOne, NonMultiTilePlatforms) {
HWTEST2_F(L0GfxCoreHelperTest, givenL0GfxCoreHelperWhenGettingMaxKernelAndMaxPacketThenExpectBothReturnOne, MultiTileNotSupported) {
auto hwInfo = *NEO::defaultHwInfo.get();
MockExecutionEnvironment executionEnvironment;
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();

View File

@@ -2005,8 +2005,7 @@ void Kernel::resolveArgs() {
}
bool Kernel::canTransformImages() const {
auto renderCoreFamily = clDevice.getHardwareInfo().platform.eRenderCoreFamily;
return renderCoreFamily >= IGFX_GEN9_CORE && renderCoreFamily <= IGFX_GEN11LP_CORE && !isBuiltIn;
return false;
}
std::unique_ptr<KernelObjsForAuxTranslation> Kernel::fillWithKernelObjsForAuxTranslation() {

View File

@@ -1147,8 +1147,7 @@ HWTEST_P(DispatchWalkerTestForAuxTranslation, givenKernelWhenAuxToNonAuxWhenTran
EXPECT_TRUE(beginPipeControl->getCommandStreamerStallEnable());
auto endPipeControl = genCmdCast<typename FamilyType::PIPE_CONTROL *>(*(pipeControls[1]));
bool dcFlushRequired = (pClDevice->getHardwareInfo().platform.eRenderCoreFamily == IGFX_GEN8_CORE);
EXPECT_EQ(dcFlushRequired, endPipeControl->getDcFlushEnable());
EXPECT_FALSE(endPipeControl->getDcFlushEnable());
EXPECT_TRUE(endPipeControl->getCommandStreamerStallEnable());
}
@@ -1191,14 +1190,12 @@ HWTEST_P(DispatchWalkerTestForAuxTranslation, givenKernelWhenNonAuxToAuxWhenTran
ASSERT_EQ(2u, pipeControls.size());
bool dcFlushRequired = (pClDevice->getHardwareInfo().platform.eRenderCoreFamily == IGFX_GEN8_CORE);
auto beginPipeControl = genCmdCast<typename FamilyType::PIPE_CONTROL *>(*(pipeControls[0]));
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, pClDevice->getRootDeviceEnvironment()), beginPipeControl->getDcFlushEnable());
EXPECT_TRUE(beginPipeControl->getCommandStreamerStallEnable());
auto endPipeControl = genCmdCast<typename FamilyType::PIPE_CONTROL *>(*(pipeControls[1]));
EXPECT_EQ(dcFlushRequired, endPipeControl->getDcFlushEnable());
EXPECT_FALSE(endPipeControl->getDcFlushEnable());
EXPECT_TRUE(endPipeControl->getCommandStreamerStallEnable());
}

View File

@@ -46,7 +46,7 @@ TEST_F(LocalWorkSizeTest, givenDisableEUFusionWhenCreatingWorkSizeInfoThenCorrec
bool fusedDispatchEnabled = gfxCoreHelper.isFusedEuDispatchEnabled(*defaultHwInfo, true);
auto wgsMultiple = fusedDispatchEnabled ? 2 : 1;
uint32_t maxBarriersPerHSlice = (defaultHwInfo->platform.eRenderCoreFamily >= IGFX_GEN9_CORE) ? 32 : 16;
uint32_t maxBarriersPerHSlice = 32;
uint32_t expectedMinWGS = wgsMultiple * simdSize * numThreadsPerSubS / maxBarriersPerHSlice;
EXPECT_EQ(expectedMinWGS, wsInfo.minWorkGroupSize);
}
@@ -839,7 +839,7 @@ HWTEST2_F(LocalWorkSizeTest, givenDispatchInfoWhenWorkSizeInfoIsCreatedThenTestE
dispatchInfo.setClDevice(&device);
dispatchInfo.setKernel(kernel.mockKernel);
const uint32_t maxBarriersPerHSlice = (defaultHwInfo->platform.eRenderCoreFamily >= IGFX_GEN9_CORE) ? 32 : 16;
const uint32_t maxBarriersPerHSlice = 32;
const uint32_t nonFusedMinWorkGroupSize = static_cast<uint32_t>(device.getSharedDeviceInfo().maxNumEUsPerSubSlice) *
device.getSharedDeviceInfo().numThreadsPerEU *
static_cast<uint32_t>(kernel.mockKernel->getKernelInfo().getMaxSimdSize()) /

View File

@@ -1131,9 +1131,6 @@ HWTEST_F(CommandStreamReceiverCQFlushTaskTests, WhenGettingCsThenReturnCsWithEno
auto expectedSize = MemoryConstants::pageSize64k - sizeCQReserves;
if (::renderCoreFamily == IGFX_GEN8_CORE) {
expectedSize -= sizeof(typename FamilyType::PIPE_CONTROL);
}
expectedSize = alignUp(expectedSize, MemoryConstants::cacheLineSize);
auto currentUsed = commandStream.getUsed();

View File

@@ -1997,8 +1997,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDcFlushArgumentIsFalseWhenCal
PIPE_CONTROL *pipeControl = genCmdCast<PIPE_CONTROL *>(buffer.get());
ASSERT_NE(nullptr, pipeControl);
const bool expectedDcFlush = ::renderCoreFamily == IGFX_GEN8_CORE;
EXPECT_EQ(expectedDcFlush, pipeControl->getDcFlushEnable());
EXPECT_FALSE(pipeControl->getDcFlushEnable());
EXPECT_TRUE(pipeControl->getCommandStreamerStallEnable());
}

View File

@@ -299,7 +299,7 @@ TEST_F(DeviceGetCapsTest, GivenPlatformWhenGettingHwInfoThenImage3dDimensionsAre
const auto &caps = device->getDeviceInfo();
const auto &sharedCaps = device->getSharedDeviceInfo();
if (device->getHardwareInfo().platform.eRenderCoreFamily > IGFX_GEN8_CORE && device->getHardwareInfo().platform.eRenderCoreFamily != IGFX_GEN12LP_CORE) {
if (device->getHardwareInfo().platform.eRenderCoreFamily > IGFX_GEN12LP_CORE) {
EXPECT_EQ(16384u, caps.image3DMaxWidth);
EXPECT_EQ(16384u, caps.image3DMaxHeight);
} else {

View File

@@ -99,35 +99,21 @@ HWCMDTEST_P(IGFX_GEN8_CORE, KernelSLMAndBarrierTest, GivenStaticSlmSizeWhenProgr
uint32_t expectedSlmSize = 0;
if (::renderCoreFamily == IGFX_GEN8_CORE) {
if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (4 * 1024)) {
expectedSlmSize = 1;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (8 * 1024)) {
expectedSlmSize = 2;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (16 * 1024)) {
expectedSlmSize = 4;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (32 * 1024)) {
expectedSlmSize = 8;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (64 * 1024)) {
expectedSlmSize = 16;
}
} else {
if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (1 * 1024)) // its a power of "2" +1 for example 1 is 2^0 ( 0+1); 2 is 2^1 is (1+1) etc.
{
expectedSlmSize = 1;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (2 * 1024)) {
expectedSlmSize = 2;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (4 * 1024)) {
expectedSlmSize = 3;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (8 * 1024)) {
expectedSlmSize = 4;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (16 * 1024)) {
expectedSlmSize = 5;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (32 * 1024)) {
expectedSlmSize = 6;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (64 * 1024)) {
expectedSlmSize = 7;
}
if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (1 * 1024)) // its a power of "2" +1 for example 1 is 2^0 ( 0+1); 2 is 2^1 is (1+1) etc.
{
expectedSlmSize = 1;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (2 * 1024)) {
expectedSlmSize = 2;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (4 * 1024)) {
expectedSlmSize = 3;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (8 * 1024)) {
expectedSlmSize = 4;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (16 * 1024)) {
expectedSlmSize = 5;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (32 * 1024)) {
expectedSlmSize = 6;
} else if (kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize <= (64 * 1024)) {
expectedSlmSize = 7;
}
ASSERT_GT(expectedSlmSize, 0u);
EXPECT_EQ(expectedSlmSize, pSrcIDData->getSharedLocalMemorySize());

View File

@@ -163,10 +163,6 @@ HWTEST_F(ImageSetArgTest, GivenNormalImageWhenSettingImageArgThenCorrectValueIsS
HWTEST_F(ImageSetArgTest, givenImageWhenSettingMipTailStartLodThenProgramValueFromGmmResourceinfo) {
typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
if (pDevice->getHardwareInfo().platform.eRenderCoreFamily == IGFX_GEN8_CORE) {
GTEST_SKIP();
}
RENDER_SURFACE_STATE surfaceState = {};
const uint32_t mipTailStartLod = 4;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -780,10 +780,6 @@ TEST(DecoderHelperTest, GivenPathEndedByBackSlashWhenCallingAddSlashThenNothingI
TEST(DecoderHelperTest, GivenGfxCoreFamilyWhenTranslatingToIgaGenBaseThenExpectedIgaGenBaseIsReturned) {
constexpr static std::array translations = {
std::pair{IGFX_GEN8_CORE, IGA_GEN8},
std::pair{IGFX_GEN9_CORE, IGA_GEN9},
std::pair{IGFX_GEN11_CORE, IGA_GEN11},
std::pair{IGFX_GEN11LP_CORE, IGA_GEN11},
std::pair{IGFX_GEN12LP_CORE, IGA_XE},
std::pair{IGFX_XE_HP_CORE, IGA_XE_HP},
std::pair{IGFX_XE_HPG_CORE, IGA_XE_HPG},
@@ -797,16 +793,6 @@ TEST(DecoderHelperTest, GivenGfxCoreFamilyWhenTranslatingToIgaGenBaseThenExpecte
TEST(DecoderHelperTest, GivenProductFamilyWhenTranslatingToIgaGenBaseThenExpectedIgaGenBaseIsReturned) {
constexpr static std::array translations = {
std::pair{IGFX_BROADWELL, IGA_GEN8},
std::pair{IGFX_CHERRYVIEW, IGA_GEN8lp},
std::pair{IGFX_SKYLAKE, IGA_GEN9},
std::pair{IGFX_BROXTON, IGA_GEN9lp},
std::pair{IGFX_KABYLAKE, IGA_GEN9p5},
std::pair{IGFX_COFFEELAKE, IGA_GEN9p5},
std::pair{IGFX_ICELAKE, IGA_GEN11},
std::pair{IGFX_ICELAKE_LP, IGA_GEN11},
std::pair{IGFX_LAKEFIELD, IGA_GEN11},
std::pair{IGFX_ELKHARTLAKE, IGA_GEN11},
std::pair{IGFX_TIGERLAKE_LP, IGA_XE},
std::pair{IGFX_ROCKETLAKE, IGA_XE},
std::pair{IGFX_ALDERLAKE_N, IGA_XE},

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -288,7 +288,7 @@ TEST_F(IgaWrapperTest, GivenIgcWrapperWhenCallingSetGfxCoreMultipleTimesThenFirs
testedIgaWrapper.setGfxCore(invalidGfxCoreFamily);
EXPECT_FALSE(testedIgaWrapper.isKnownPlatform());
testedIgaWrapper.setGfxCore(IGFX_GEN11LP_CORE);
testedIgaWrapper.setGfxCore(IGFX_GEN12LP_CORE);
EXPECT_TRUE(testedIgaWrapper.isKnownPlatform());
// Expect that a valid family is preserved.
@@ -303,7 +303,7 @@ TEST_F(IgaWrapperTest, GivenIgcWrapperWhenCallingSetProductFamilyMultipleTimesTh
testedIgaWrapper.setProductFamily(invalidProductFamily);
EXPECT_FALSE(testedIgaWrapper.isKnownPlatform());
testedIgaWrapper.setProductFamily(IGFX_SKYLAKE);
testedIgaWrapper.setProductFamily(IGFX_TIGERLAKE_LP);
EXPECT_TRUE(testedIgaWrapper.isKnownPlatform());
// Expect that a valid family is preserved.
@@ -311,4 +311,4 @@ TEST_F(IgaWrapperTest, GivenIgcWrapperWhenCallingSetProductFamilyMultipleTimesTh
EXPECT_TRUE(testedIgaWrapper.isKnownPlatform());
}
} // namespace NEO
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -14,22 +14,6 @@ inline iga_gen_t translateToIgaGenBase(PRODUCT_FAMILY productFamily) {
switch (productFamily) {
default:
return IGA_GEN_INVALID;
case IGFX_BROADWELL:
return IGA_GEN8;
case IGFX_CHERRYVIEW:
return IGA_GEN8lp;
case IGFX_SKYLAKE:
return IGA_GEN9;
case IGFX_BROXTON:
return IGA_GEN9lp;
case IGFX_KABYLAKE:
case IGFX_COFFEELAKE:
return IGA_GEN9p5;
case IGFX_ICELAKE:
case IGFX_ICELAKE_LP:
case IGFX_LAKEFIELD:
case IGFX_ELKHARTLAKE:
return IGA_GEN11;
case IGFX_TIGERLAKE_LP:
case IGFX_ROCKETLAKE:
case IGFX_ALDERLAKE_S:
@@ -48,13 +32,6 @@ inline iga_gen_t translateToIgaGenBase(GFXCORE_FAMILY coreFamily) {
switch (coreFamily) {
default:
return IGA_GEN_INVALID;
case IGFX_GEN8_CORE:
return IGA_GEN8;
case IGFX_GEN9_CORE:
return IGA_GEN9;
case IGFX_GEN11_CORE:
case IGFX_GEN11LP_CORE:
return IGA_GEN11;
case IGFX_GEN12LP_CORE:
return IGA_XE;
case IGFX_XE_HP_CORE:

View File

@@ -300,9 +300,6 @@ void Gmm::queryImageParams(ImageInfo &imgInfo) {
}
uint32_t Gmm::queryQPitch(GMM_RESOURCE_TYPE resType) {
if (gmmHelper->getHardwareInfo()->platform.eRenderCoreFamily == IGFX_GEN8_CORE && resType == GMM_RESOURCE_TYPE::RESOURCE_3D) {
return 0;
}
return gmmResourceInfo->getQPitch();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Intel Corporation
* Copyright (C) 2023-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -44,7 +44,7 @@ void WorkSizeInfo::setIfUseImg(const KernelInfo &kernelInfo) {
void WorkSizeInfo::setMinWorkGroupSize(const RootDeviceEnvironment &rootDeviceEnvironment, bool disableEUFusion) {
minWorkGroupSize = 0;
if (hasBarriers) {
uint32_t maxBarriersPerHSlice = (coreFamily >= IGFX_GEN9_CORE) ? 32 : 16;
uint32_t maxBarriersPerHSlice = 32;
minWorkGroupSize = numThreadsPerSubSlice * simdSize / maxBarriersPerHSlice;
}
if (slmTotalSize > 0) {
@@ -73,4 +73,4 @@ void WorkSizeInfo::checkRatio(const size_t workItems[3]) {
}
}
} // namespace NEO
} // namespace NEO

View File

@@ -1,37 +0,0 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen11/hw_cmds.h"
#include "shared/source/helpers/populate_factory.h"
#include "shared/test/common/libult/ult_command_stream_receiver.h"
#include "shared/test/common/mocks/mock_l0_debugger.h"
namespace NEO {
typedef Gen11Family Family;
constexpr auto gfxCore = IGFX_GEN11_CORE;
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
template <>
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
}
struct EnableGen11 {
EnableGen11() {
populateFactoryTable<UltCommandStreamReceiver<Family>>();
}
};
static EnableGen11 enable;
static MockDebuggerL0HwPopulateFactory<gfxCore, Family> mockDebuggerGen11;
template class UltCommandStreamReceiver<Gen11Family>;
} // namespace NEO

View File

@@ -1,36 +0,0 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen8/hw_cmds.h"
#include "shared/source/helpers/populate_factory.h"
#include "shared/test/common/libult/ult_command_stream_receiver.h"
#include "shared/test/common/mocks/mock_l0_debugger.h"
namespace NEO {
typedef Gen8Family Family;
constexpr auto gfxCore = IGFX_GEN8_CORE;
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
template <>
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
}
struct EnableGen8 {
EnableGen8() {
populateFactoryTable<UltCommandStreamReceiver<Family>>();
}
};
static EnableGen8 enable;
static MockDebuggerL0HwPopulateFactory<gfxCore, Family> mockDebuggerGen8;
template class UltCommandStreamReceiver<Gen8Family>;
} // namespace NEO

View File

@@ -1,37 +0,0 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen9/hw_cmds.h"
#include "shared/source/helpers/populate_factory.h"
#include "shared/test/common/libult/ult_command_stream_receiver.h"
#include "shared/test/common/mocks/mock_l0_debugger.h"
namespace NEO {
typedef Gen9Family Family;
constexpr auto gfxCore = IGFX_GEN9_CORE;
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
template <>
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
}
struct EnableGen9 {
EnableGen9() {
populateFactoryTable<UltCommandStreamReceiver<Family>>();
}
};
static EnableGen9 enable;
static MockDebuggerL0HwPopulateFactory<gfxCore, Family> mockDebuggerGen9;
template class UltCommandStreamReceiver<Gen9Family>;
} // namespace NEO

View File

@@ -8,3 +8,4 @@
#pragma once
using SupportsMultiTile = IsPVC;
using MultiTileNotSupported = IsNotPVC;

View File

@@ -76,7 +76,7 @@ TEST(UnpackSingleDeviceBinaryZebin, WhenUnhandledElfTypeThenUnpackingFails) {
TEST(UnpackSingleDeviceBinaryZebin, WhenValidBinaryAndMatchedWithRequestedTargetDeviceThenReturnSelf) {
NEO::Elf::ElfFileHeader<NEO::Elf::EI_CLASS_64> zebin;
zebin.type = NEO::Zebin::Elf::ET_ZEBIN_EXE;
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_SKYLAKE);
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_BMG);
NEO::TargetDevice targetDevice;
targetDevice.productFamily = static_cast<PRODUCT_FAMILY>(zebin.machine);
targetDevice.stepping = 0U;
@@ -98,7 +98,7 @@ TEST(UnpackSingleDeviceBinaryZebin, WhenValidBinaryAndMatchedWithRequestedTarget
EXPECT_TRUE(unpackWarnings.empty());
EXPECT_TRUE(unpackErrors.empty());
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_GEN9_CORE);
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_XE2_HPG_CORE);
NEO::Zebin::Elf::ZebinTargetFlags targetFlags;
targetDevice.productFamily = IGFX_UNKNOWN;
targetDevice.coreFamily = static_cast<GFXCORE_FAMILY>(zebin.machine);
@@ -125,7 +125,7 @@ TEST(UnpackSingleDeviceBinaryZebin, givenDumpZEBinFlagSetWhenUnpackingZebinBinar
NEO::Elf::ElfFileHeader<NEO::Elf::EI_CLASS_64> zebin;
zebin.type = NEO::Zebin::Elf::ET_ZEBIN_EXE;
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_SKYLAKE);
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_BMG);
NEO::TargetDevice targetDevice;
targetDevice.productFamily = static_cast<PRODUCT_FAMILY>(zebin.machine);
targetDevice.stepping = 0U;
@@ -150,7 +150,7 @@ TEST(UnpackSingleDeviceBinaryZebin, givenDumpZEBinFlagSetWhenUnpackingZebinBinar
TEST(UnpackSingleDeviceBinaryZebin, WhenValidBinaryForDifferentDeviceThenUnpackingFails) {
NEO::Elf::ElfFileHeader<NEO::Elf::EI_CLASS_64> zebin;
zebin.type = NEO::Zebin::Elf::ET_ZEBIN_EXE;
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_SKYLAKE);
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_BMG);
NEO::TargetDevice targetDevice;
targetDevice.productFamily = static_cast<PRODUCT_FAMILY>(zebin.machine + 1);
targetDevice.stepping = 0U;
@@ -172,7 +172,7 @@ TEST(UnpackSingleDeviceBinaryZebin, WhenValidBinaryForDifferentDeviceThenUnpacki
EXPECT_STREQ("Unhandled target device\n", unpackErrors.c_str());
unpackErrors.clear();
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_GEN9_CORE);
zebin.machine = static_cast<decltype(zebin.machine)>(IGFX_XE2_HPG_CORE);
NEO::Zebin::Elf::ZebinTargetFlags targetFlags;
targetDevice.productFamily = IGFX_UNKNOWN;
targetDevice.coreFamily = static_cast<GFXCORE_FAMILY>(zebin.machine + 1);
@@ -195,7 +195,7 @@ TEST(UnpackSingleDeviceBinaryZebin, WhenValidBinaryForDifferentDeviceThenUnpacki
TEST(UnpackSingleDeviceBinaryZebin, WhenValidBinaryWithUnsupportedPointerSizeThenUnpackingFails) {
NEO::Elf::ElfFileHeader<NEO::Elf::EI_CLASS_64> zebin;
zebin.type = NEO::Zebin::Elf::ET_ZEBIN_EXE;
zebin.machine = IGFX_SKYLAKE;
zebin.machine = IGFX_BMG;
NEO::TargetDevice targetDevice;
targetDevice.productFamily = static_cast<PRODUCT_FAMILY>(zebin.machine);
targetDevice.stepping = 0U;
@@ -220,7 +220,7 @@ TEST(UnpackSingleDeviceBinaryZebin, WhenValidBinaryWithUnsupportedPointerSizeThe
TEST(UnpackSingleDeviceBinaryZebin, WhenNotRequestedThenDontValidateDeviceRevision) {
NEO::Elf::ElfFileHeader<NEO::Elf::EI_CLASS_64> zebin;
zebin.type = NEO::Zebin::Elf::ET_ZEBIN_EXE;
zebin.machine = IGFX_SKYLAKE;
zebin.machine = IGFX_BMG;
NEO::TargetDevice targetDevice;
targetDevice.productFamily = static_cast<PRODUCT_FAMILY>(zebin.machine);
targetDevice.stepping = 0U;
@@ -266,7 +266,7 @@ TEST(UnpackSingleDeviceBinaryZebin, WhenNotRequestedThenDontValidateDeviceRevisi
TEST(UnpackSingleDeviceBinaryZebin, WhenRequestedThenValidateRevision) {
NEO::Elf::ElfFileHeader<NEO::Elf::EI_CLASS_64> zebin;
zebin.type = NEO::Zebin::Elf::ET_ZEBIN_EXE;
zebin.machine = IGFX_SKYLAKE;
zebin.machine = IGFX_BMG;
NEO::TargetDevice targetDevice;
targetDevice.productFamily = static_cast<PRODUCT_FAMILY>(zebin.machine);
targetDevice.stepping = 0U;
@@ -444,7 +444,7 @@ TEST(UnpackSingleDeviceBinaryZebin, GivenZebinWithSpirvAndBuildOptionsThenUnpack
ASSERT_EQ(NEO::Zebin::Elf::SHT_ZEBIN_MISC, buildOptionsHdr.type);
zebin.elfHeader->type = NEO::Zebin::Elf::ET_ZEBIN_EXE;
zebin.elfHeader->machine = IGFX_SKYLAKE;
zebin.elfHeader->machine = IGFX_BMG;
NEO::TargetDevice targetDevice = {};
targetDevice.productFamily = static_cast<PRODUCT_FAMILY>(zebin.elfHeader->machine);
targetDevice.maxPointerSizeInBytes = 8;
@@ -477,7 +477,7 @@ TEST(UnpackSingleDeviceBinaryZebin, GivenZebinForDifferentTargetDeviceWithInterm
zebin.elfHeader->machine = IGFX_UNKNOWN;
NEO::TargetDevice targetDevice;
targetDevice.productFamily = IGFX_SKYLAKE;
targetDevice.productFamily = IGFX_BMG;
targetDevice.maxPointerSizeInBytes = 8;
std::string unpackErrors;
@@ -500,7 +500,7 @@ TEST(UnpackSingleDeviceBinaryZebin, GivenMiscZebinSectionWithNameDifferentThanBu
zebin.appendSection(NEO::Zebin::Elf::SHT_ZEBIN_MISC, "not_build_options", ArrayRef<uint8_t>{&secData, 1U});
zebin.elfHeader->type = NEO::Zebin::Elf::ET_ZEBIN_EXE;
zebin.elfHeader->machine = IGFX_SKYLAKE;
zebin.elfHeader->machine = IGFX_BMG;
NEO::TargetDevice targetDevice = {};
targetDevice.productFamily = static_cast<PRODUCT_FAMILY>(zebin.elfHeader->machine);
targetDevice.maxPointerSizeInBytes = 8;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2022 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -19,7 +19,5 @@ HWTEST2_F(TigerlakeLpOnlyTest, WhenGettingHardwareInfoThenProductFamilyIsTigerla
using Gen12LpOnlyTest = ::testing::Test;
GEN12LPTEST_F(Gen12LpOnlyTest, WhenGettingRenderCoreFamilyThenGen12lpCoreIsReturned) {
EXPECT_NE(IGFX_GEN9_CORE, defaultHwInfo->platform.eRenderCoreFamily);
EXPECT_NE(IGFX_GEN11_CORE, defaultHwInfo->platform.eRenderCoreFamily);
EXPECT_EQ(IGFX_GEN12LP_CORE, defaultHwInfo->platform.eRenderCoreFamily);
EXPECT_NE(IGFX_XE2_HPG_CORE, defaultHwInfo->platform.eRenderCoreFamily);
}

View File

@@ -164,7 +164,6 @@ TEST_F(GmmHelperTests, GivenInvalidImageTypeWhenQueryingImgParamsThenExceptionIs
}
TEST_F(GmmHelperTests, WhenQueryingImgParamsThenCorrectValuesAreReturned) {
const HardwareInfo *hwinfo = defaultHwInfo.get();
ImageDescriptor imgDesc = {};
imgDesc.imageType = ImageType::image3D;
imgDesc.imageWidth = 17;
@@ -180,11 +179,7 @@ TEST_F(GmmHelperTests, WhenQueryingImgParamsThenCorrectValuesAreReturned) {
EXPECT_GT(imgInfo.size, minSize);
EXPECT_GT(imgInfo.rowPitch, 0u);
EXPECT_GT(imgInfo.slicePitch, 0u);
if (hwinfo->platform.eRenderCoreFamily == IGFX_GEN8_CORE) {
EXPECT_EQ(imgInfo.qPitch, 0u);
} else {
EXPECT_GT(imgInfo.qPitch, 0u);
}
EXPECT_GT(imgInfo.qPitch, 0u);
auto &gfxCoreHelper = this->rootDeviceEnvironment->getHelper<GfxCoreHelper>();

View File

@@ -1173,85 +1173,41 @@ HWTEST2_F(ProductHelperCommonTest, givenDebugFlagSetWhenEnablingBlitterOperation
HWCMDTEST_F(IGFX_GEN8_CORE, GfxCoreHelperTest, GivenVariousValuesWhenAlignSlmSizeIsCalledThenCorrectValueIsReturned) {
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
if (::renderCoreFamily == IGFX_GEN8_CORE) {
EXPECT_EQ(0u, gfxCoreHelper.alignSlmSize(0));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(1));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(1024));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(1025));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(2048));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(2049));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(4096));
EXPECT_EQ(8192u, gfxCoreHelper.alignSlmSize(4097));
EXPECT_EQ(8192u, gfxCoreHelper.alignSlmSize(8192));
EXPECT_EQ(16384u, gfxCoreHelper.alignSlmSize(8193));
EXPECT_EQ(16384u, gfxCoreHelper.alignSlmSize(12288));
EXPECT_EQ(16384u, gfxCoreHelper.alignSlmSize(16384));
EXPECT_EQ(32768u, gfxCoreHelper.alignSlmSize(16385));
EXPECT_EQ(32768u, gfxCoreHelper.alignSlmSize(24576));
EXPECT_EQ(32768u, gfxCoreHelper.alignSlmSize(32768));
EXPECT_EQ(65536u, gfxCoreHelper.alignSlmSize(32769));
EXPECT_EQ(65536u, gfxCoreHelper.alignSlmSize(49152));
EXPECT_EQ(65536u, gfxCoreHelper.alignSlmSize(65535));
EXPECT_EQ(65536u, gfxCoreHelper.alignSlmSize(65536));
} else {
EXPECT_EQ(0u, gfxCoreHelper.alignSlmSize(0));
EXPECT_EQ(1024u, gfxCoreHelper.alignSlmSize(1));
EXPECT_EQ(1024u, gfxCoreHelper.alignSlmSize(1024));
EXPECT_EQ(2048u, gfxCoreHelper.alignSlmSize(1025));
EXPECT_EQ(2048u, gfxCoreHelper.alignSlmSize(2048));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(2049));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(4096));
EXPECT_EQ(8192u, gfxCoreHelper.alignSlmSize(4097));
EXPECT_EQ(8192u, gfxCoreHelper.alignSlmSize(8192));
EXPECT_EQ(16384u, gfxCoreHelper.alignSlmSize(8193));
EXPECT_EQ(16384u, gfxCoreHelper.alignSlmSize(16384));
EXPECT_EQ(32768u, gfxCoreHelper.alignSlmSize(16385));
EXPECT_EQ(32768u, gfxCoreHelper.alignSlmSize(32768));
EXPECT_EQ(65536u, gfxCoreHelper.alignSlmSize(32769));
EXPECT_EQ(65536u, gfxCoreHelper.alignSlmSize(65536));
}
EXPECT_EQ(0u, gfxCoreHelper.alignSlmSize(0));
EXPECT_EQ(1024u, gfxCoreHelper.alignSlmSize(1));
EXPECT_EQ(1024u, gfxCoreHelper.alignSlmSize(1024));
EXPECT_EQ(2048u, gfxCoreHelper.alignSlmSize(1025));
EXPECT_EQ(2048u, gfxCoreHelper.alignSlmSize(2048));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(2049));
EXPECT_EQ(4096u, gfxCoreHelper.alignSlmSize(4096));
EXPECT_EQ(8192u, gfxCoreHelper.alignSlmSize(4097));
EXPECT_EQ(8192u, gfxCoreHelper.alignSlmSize(8192));
EXPECT_EQ(16384u, gfxCoreHelper.alignSlmSize(8193));
EXPECT_EQ(16384u, gfxCoreHelper.alignSlmSize(16384));
EXPECT_EQ(32768u, gfxCoreHelper.alignSlmSize(16385));
EXPECT_EQ(32768u, gfxCoreHelper.alignSlmSize(32768));
EXPECT_EQ(65536u, gfxCoreHelper.alignSlmSize(32769));
EXPECT_EQ(65536u, gfxCoreHelper.alignSlmSize(65536));
}
HWCMDTEST_F(IGFX_GEN8_CORE, GfxCoreHelperTest, GivenVariousValuesWhenComputeSlmSizeIsCalledThenCorrectValueIsReturned) {
auto hwInfo = *defaultHwInfo;
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
if (::renderCoreFamily == IGFX_GEN8_CORE) {
EXPECT_EQ(0u, gfxCoreHelper.computeSlmValues(hwInfo, 0));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 1));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 1024));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 1025));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 2048));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 2049));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 4096));
EXPECT_EQ(2u, gfxCoreHelper.computeSlmValues(hwInfo, 4097));
EXPECT_EQ(2u, gfxCoreHelper.computeSlmValues(hwInfo, 8192));
EXPECT_EQ(4u, gfxCoreHelper.computeSlmValues(hwInfo, 8193));
EXPECT_EQ(4u, gfxCoreHelper.computeSlmValues(hwInfo, 12288));
EXPECT_EQ(4u, gfxCoreHelper.computeSlmValues(hwInfo, 16384));
EXPECT_EQ(8u, gfxCoreHelper.computeSlmValues(hwInfo, 16385));
EXPECT_EQ(8u, gfxCoreHelper.computeSlmValues(hwInfo, 24576));
EXPECT_EQ(8u, gfxCoreHelper.computeSlmValues(hwInfo, 32768));
EXPECT_EQ(16u, gfxCoreHelper.computeSlmValues(hwInfo, 32769));
EXPECT_EQ(16u, gfxCoreHelper.computeSlmValues(hwInfo, 49152));
EXPECT_EQ(16u, gfxCoreHelper.computeSlmValues(hwInfo, 65535));
EXPECT_EQ(16u, gfxCoreHelper.computeSlmValues(hwInfo, 65536));
} else {
EXPECT_EQ(0u, gfxCoreHelper.computeSlmValues(hwInfo, 0));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 1));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 1024));
EXPECT_EQ(2u, gfxCoreHelper.computeSlmValues(hwInfo, 1025));
EXPECT_EQ(2u, gfxCoreHelper.computeSlmValues(hwInfo, 2048));
EXPECT_EQ(3u, gfxCoreHelper.computeSlmValues(hwInfo, 2049));
EXPECT_EQ(3u, gfxCoreHelper.computeSlmValues(hwInfo, 4096));
EXPECT_EQ(4u, gfxCoreHelper.computeSlmValues(hwInfo, 4097));
EXPECT_EQ(4u, gfxCoreHelper.computeSlmValues(hwInfo, 8192));
EXPECT_EQ(5u, gfxCoreHelper.computeSlmValues(hwInfo, 8193));
EXPECT_EQ(5u, gfxCoreHelper.computeSlmValues(hwInfo, 16384));
EXPECT_EQ(6u, gfxCoreHelper.computeSlmValues(hwInfo, 16385));
EXPECT_EQ(6u, gfxCoreHelper.computeSlmValues(hwInfo, 32768));
EXPECT_EQ(7u, gfxCoreHelper.computeSlmValues(hwInfo, 32769));
EXPECT_EQ(7u, gfxCoreHelper.computeSlmValues(hwInfo, 65536));
}
EXPECT_EQ(0u, gfxCoreHelper.computeSlmValues(hwInfo, 0));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 1));
EXPECT_EQ(1u, gfxCoreHelper.computeSlmValues(hwInfo, 1024));
EXPECT_EQ(2u, gfxCoreHelper.computeSlmValues(hwInfo, 1025));
EXPECT_EQ(2u, gfxCoreHelper.computeSlmValues(hwInfo, 2048));
EXPECT_EQ(3u, gfxCoreHelper.computeSlmValues(hwInfo, 2049));
EXPECT_EQ(3u, gfxCoreHelper.computeSlmValues(hwInfo, 4096));
EXPECT_EQ(4u, gfxCoreHelper.computeSlmValues(hwInfo, 4097));
EXPECT_EQ(4u, gfxCoreHelper.computeSlmValues(hwInfo, 8192));
EXPECT_EQ(5u, gfxCoreHelper.computeSlmValues(hwInfo, 8193));
EXPECT_EQ(5u, gfxCoreHelper.computeSlmValues(hwInfo, 16384));
EXPECT_EQ(6u, gfxCoreHelper.computeSlmValues(hwInfo, 16385));
EXPECT_EQ(6u, gfxCoreHelper.computeSlmValues(hwInfo, 32768));
EXPECT_EQ(7u, gfxCoreHelper.computeSlmValues(hwInfo, 32769));
EXPECT_EQ(7u, gfxCoreHelper.computeSlmValues(hwInfo, 65536));
}
HWTEST_F(GfxCoreHelperTest, GivenZeroSlmSizeWhenComputeSlmSizeIsCalledThenCorrectValueIsReturned) {

View File

@@ -159,7 +159,7 @@ HWTEST2_F(SbaForBindlessTests,
EXPECT_EQ(surfaceStateBaseAddress, cmd->getSurfaceStateBaseAddress());
}
using IohSupported = IsWithinGfxCore<GFXCORE_FAMILY::IGFX_GEN9_CORE, GFXCORE_FAMILY::IGFX_GEN12LP_CORE>;
using IohSupported = IsGen12LP;
HWTEST2_F(SbaForBindlessTests, givenGlobalBindlessBaseAddressWhenPassingIndirectBaseAddressThenIndirectBaseAddressIsSet, IohSupported) {
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
@@ -792,4 +792,4 @@ TEST(SbaHelperTest, givenIndirectHeapWhenGetStateBaseAddressAndGetStateSizeThenR
EXPECT_EQ(gpuBaseAddress, NEO::getStateBaseAddress(heap, useGlobalHeaps, isBindlessKernel));
EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, NEO::getStateSize(heap, useGlobalHeaps, isBindlessKernel));
}
}
}