refactor: Extract PostSyncType to outer abstract layer

This modification serves to simplify the integration of generated
compute walker structures.

Related-To: NEO-13147

Signed-off-by: Vysochyn, Illia <illia.vysochyn@intel.com>
This commit is contained in:
Vysochyn, Illia
2024-11-19 17:41:53 +00:00
committed by Compute-Runtime-Automation
parent fa58073095
commit 89c3aab321
25 changed files with 80 additions and 58 deletions

View File

@@ -1440,7 +1440,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, MultiTileCommandListAppendLaunchKernelXeHpCoreTest,
std::visit([](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
EXPECT_TRUE(walker->getWorkloadPartitionEnable());
auto &postSync = walker->getPostSync();

View File

@@ -141,7 +141,7 @@ void testSingleTileAppendMemoryCopyThreeKernels(CopyTestInput &input, TestExpect
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*walker);
std::visit([&arg, &kernelEventAddresses, i](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -231,7 +231,7 @@ void testSingleTileAppendMemoryCopyThreeKernelsAndL3Flush(CopyTestInput &input,
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*walker);
std::visit([&arg, &kernelEventAddresses, i](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -333,7 +333,7 @@ void testSingleTileAppendMemoryCopySingleKernel(CopyTestInput &input, TestExpect
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*firstWalker);
std::visit([&arg, firstKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -413,7 +413,7 @@ void testSingleTileAppendMemoryCopySingleKernelAndL3Flush(CopyTestInput &input,
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*firstWalker);
std::visit([&arg, firstKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -579,7 +579,7 @@ void testMultiTileAppendMemoryCopyThreeKernels(CopyTestInput &input, TestExpecte
std::visit([&arg, i, expectedKernelEventAddress = expectedKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -680,7 +680,7 @@ void testMultiTileAppendMemoryCopyThreeKernelsAndL3Flush(CopyTestInput &input, T
std::visit([&arg, i, expectedKernelEventAddress = expectedKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -794,7 +794,7 @@ void testMultiTileAppendMemoryCopySingleKernel(CopyTestInput &input, TestExpecte
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*firstWalker);
std::visit([&arg, firstKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -882,7 +882,7 @@ void testMultiTileAppendMemoryCopySingleKernelAndL3Flush(CopyTestInput &input, T
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*firstWalker);
std::visit([&arg, firstKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();

View File

@@ -135,7 +135,7 @@ void testSingleTileAppendMemoryFillManyImmediateKernels(FillTestInput &input, Te
std::visit([expectedKernelEventAddress = expectedKernelEventAddress, &arg, i](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -221,7 +221,7 @@ void testSingleTileAppendMemoryFillManyKernels(FillTestInput &input, TestExpecte
std::visit([expectedKernelEventAddress = expectedKernelEventAddress, &arg, i](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -308,7 +308,7 @@ void testSingleTileAppendMemoryFillManyKernelsAndL3Flush(FillTestInput &input, T
std::visit([expectedKernelEventAddress = expectedKernelEventAddress, &arg, i](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -391,7 +391,7 @@ void testSingleTileAppendMemoryFillSingleKernel(FillTestInput &input, TestExpect
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*firstWalker);
std::visit([&arg, firstKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -476,7 +476,7 @@ void testSingleTileAppendMemoryFillSingleKernelAndL3Flush(FillTestInput &input,
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*firstWalker);
std::visit([&arg, firstKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -599,7 +599,7 @@ void testMultiTileAppendMemoryFillManyKernels(FillTestInput &input, TestExpected
std::visit([expectedKernelEventAddress = expectedKernelEventAddress, &arg, i](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -709,7 +709,7 @@ void testMultiTileAppendMemoryFillSingleKernelAndL3Flush(FillTestInput &input, T
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*firstWalker);
std::visit([&arg, firstKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();

View File

@@ -412,7 +412,7 @@ struct CommandListAppendLaunchKernelCompactL3FlushEventFixture : public ModuleFi
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*firstWalker);
std::visit([&arg, firstKernelEventAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -667,7 +667,7 @@ struct CommandListSignalAllEventPacketFixture : public ModuleFixture {
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*firstWalker);
std::visit([expectedWalkerPostSyncOp](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
auto &postSync = walker->getPostSync();
@@ -3132,7 +3132,7 @@ HWTEST2_F(CommandListAppendLaunchKernel,
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(launchParams.cmdWalkerBuffer);
std::visit([eventBaseAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
auto &postSync = walker->getPostSync();
EXPECT_NE(eventBaseAddress, postSync.getDestinationAddress());

View File

@@ -3381,7 +3381,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingKernelSplitThenDon
std::visit([](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
auto &postSync = walker->getPostSync();
EXPECT_EQ(PostSyncType::OPERATION_NO_WRITE, postSync.getOperation());

View File

@@ -101,7 +101,7 @@ void GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(LinearStream *cmdStream,
WalkerType *walkerCmd,
TagNodeBase *timestampPacketNode,
const RootDeviceEnvironment &rootDeviceEnvironment) {
using POSTSYNC_DATA = typename WalkerType::PostSyncType;
using POSTSYNC_DATA = decltype(GfxFamily::template getPostSyncType<WalkerType>());
auto &postSyncData = walkerCmd->getPostSync();
postSyncData.setDataportPipelineFlush(true);

View File

@@ -102,7 +102,7 @@ struct AubWalkerPartitionFixture : public KernelAUBFixture<SimpleKernelFixture>
std::visit([&](auto &&walkerCmd) {
using WalkerType = std::decay_t<decltype(*walkerCmd)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
EXPECT_EQ(0u, walkerCmd->getPartitionId());
@@ -992,7 +992,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, AubWalkerPartitionZeroTest, givenNonBlockingAtomicO
HWCMDTEST_F(IGFX_XE_HP_CORE, AubWalkerPartitionZeroTest, givenPredicatedCommandBufferWhenItIsExecutedThenAtomicIsIncrementedEquallyToPartitionCountPlusOne) {
MockExecutionEnvironment mockExecutionEnvironment{};
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
auto streamCpuPointer = taskStream->getSpace(0);
auto postSyncAddress = helperSurface->getGpuAddress();

View File

@@ -92,7 +92,7 @@ HWTEST2_F(WalkerDispatchTestDg2AndLater, givenDebugVariableSetWhenProgramCompute
HWTEST2_F(Dg2AndLaterDispatchWalkerBasicTest, givenTimestampPacketWhenDispatchingThenProgramPostSyncData, matcherDG2AndLater) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using POSTSYNC_DATA = typename DefaultWalkerType::PostSyncType;
using POSTSYNC_DATA = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
MockKernelWithInternals kernel1(*device);
MockKernelWithInternals kernel2(*device);

View File

@@ -452,7 +452,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenWorkDimTh
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenTimestampPacketWhenDispatchingThenProgramPostSyncData) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
MockKernelWithInternals kernel1(*device);
MockKernelWithInternals kernel2(*device);
@@ -525,7 +525,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenDebugVari
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*hwParser.itorWalker);
std::visit([expectedMocs](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
auto &postSyncData = walker->getPostSync();
EXPECT_EQ(PostSyncType::OPERATION::OPERATION_WRITE_TIMESTAMP, postSyncData.getOperation());
@@ -611,7 +611,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenDebugVari
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*hwParser.itorWalker);
std::visit([contextEndAddress](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
ASSERT_NE(nullptr, walker);
auto &postSyncData = walker->getPostSync();

View File

@@ -50,7 +50,7 @@ bool EncodeDispatchKernel<Family>::singleTileExecImplicitScalingRequired(bool co
template <typename Family>
template <typename WalkerType>
void EncodeDispatchKernel<Family>::setupPostSyncForInOrderExec(WalkerType &walkerCmd, const EncodeDispatchKernelArgs &args) {
using POSTSYNC_DATA = typename WalkerType::PostSyncType;
using POSTSYNC_DATA = decltype(Family::template getPostSyncType<WalkerType>());
auto &postSync = walkerCmd.getPostSync();

View File

@@ -465,7 +465,7 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDis
template <typename Family>
template <typename WalkerType>
void EncodeDispatchKernel<Family>::setupPostSyncForRegularEvent(WalkerType &walkerCmd, const EncodeDispatchKernelArgs &args) {
using POSTSYNC_DATA = typename WalkerType::PostSyncType;
using POSTSYNC_DATA = decltype(Family::template getPostSyncType<WalkerType>());
auto &postSync = walkerCmd.getPostSync();
@@ -903,8 +903,8 @@ inline size_t EncodeDispatchKernel<Family>::getInlineDataOffset(EncodeDispatchKe
template <typename Family>
template <typename WalkerType>
void EncodeDispatchKernel<Family>::forceComputeWalkerPostSyncFlushWithWrite(WalkerType &walkerCmd) {
using PostSyncType = typename WalkerType::PostSyncType;
using OperationType = typename PostSyncType::OPERATION;
using POSTSYNC_DATA = decltype(Family::template getPostSyncType<WalkerType>());
using OperationType = typename POSTSYNC_DATA::OPERATION;
if (debugManager.flags.ForceComputeWalkerPostSyncFlushWithWrite.get() != -1) {
auto &postSync = walkerCmd.getPostSync();

View File

@@ -5953,8 +5953,6 @@ typedef struct tagCOMPUTE_WALKER {
return sizeof(TheStructure.Common.InlineData);
}
using InterfaceDescriptorType = std::decay_t<decltype(TheStructure.Common.InterfaceDescriptor)>; // patched
using PostSyncType = std::decay_t<decltype(TheStructure.Common.PostSync)>; // patched
} COMPUTE_WALKER;
STATIC_ASSERT(160 == sizeof(COMPUTE_WALKER));

View File

@@ -5981,7 +5981,6 @@ typedef struct tagCOMPUTE_WALKER {
return sizeof(TheStructure.Common.InlineData);
}
using InterfaceDescriptorType = std::decay_t<decltype(TheStructure.Common.InterfaceDescriptor)>; // patched
using PostSyncType = std::decay_t<decltype(TheStructure.Common.PostSync)>; // patched
} COMPUTE_WALKER;
STATIC_ASSERT(160 == sizeof(COMPUTE_WALKER));

View File

@@ -5815,8 +5815,6 @@ typedef struct tagCOMPUTE_WALKER {
return sizeof(TheStructure.Common.InlineData);
}
using InterfaceDescriptorType = std::decay_t<decltype(TheStructure.Common.InterfaceDescriptor)>; // patched
using PostSyncType = std::decay_t<decltype(TheStructure.Common.PostSync)>; // patched
} COMPUTE_WALKER;
STATIC_ASSERT(156 == sizeof(COMPUTE_WALKER));

View File

@@ -5584,8 +5584,6 @@ typedef struct tagCOMPUTE_WALKER {
return sizeof(TheStructure.Common.InlineData);
}
using InterfaceDescriptorType = std::decay_t<decltype(TheStructure.Common.InterfaceDescriptor)>; // patched
using PostSyncType = std::decay_t<decltype(TheStructure.Common.PostSync)>; // patched
} COMPUTE_WALKER;
STATIC_ASSERT(156 == sizeof(COMPUTE_WALKER));

View File

@@ -179,6 +179,12 @@ struct Xe2HpgCoreFamily : public Xe2HpgCore {
static constexpr bool isInterfaceDescriptorHeaplessMode() {
return false;
}
template <typename WalkerType>
static constexpr auto getPostSyncType() {
return std::decay_t<POSTSYNC_DATA>{};
}
using WalkerVariant = std::variant<COMPUTE_WALKER *>;
};

View File

@@ -184,6 +184,11 @@ struct Xe3CoreFamily : public Xe3Core {
return false;
}
template <typename WalkerType>
static constexpr auto getPostSyncType() {
return std::decay_t<POSTSYNC_DATA>{};
}
using WalkerVariant = std::variant<COMPUTE_WALKER *>;
};

View File

@@ -160,6 +160,12 @@ struct XeHpcCoreFamily : public XeHpcCore {
static constexpr bool isInterfaceDescriptorHeaplessMode() {
return false;
}
template <typename WalkerType>
static constexpr auto getPostSyncType() {
return std::decay_t<POSTSYNC_DATA>{};
}
using WalkerVariant = std::variant<COMPUTE_WALKER *>;
};

View File

@@ -178,6 +178,12 @@ struct XeHpgCoreFamily : public XeHpgCore {
static constexpr bool isInterfaceDescriptorHeaplessMode() {
return false;
}
template <typename WalkerType>
static auto getPostSyncType() {
return std::decay_t<POSTSYNC_DATA>{};
}
using WalkerVariant = std::variant<COMPUTE_WALKER *>;
};

View File

@@ -372,7 +372,7 @@ HWTEST2_F(CommandEncodeStatesTest, giveNumSamplersOneWhenDispatchKernelThensampl
HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenEventAllocationWhenDispatchingKernelThenPostSyncIsAdded) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using POSTSYNC_DATA = typename DefaultWalkerType::PostSyncType;
using POSTSYNC_DATA = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
uint32_t dims[] = {2, 1, 1};
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
uint64_t eventAddress = MemoryConstants::cacheLineSize * 123;
@@ -1370,7 +1370,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesDynamicImplicitScaling, givenImp
HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenNonTimestampEventWhenTimestampPostSyncRequiredThenTimestampPostSyncIsAdded) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using POSTSYNC_DATA = typename DefaultWalkerType::PostSyncType;
using POSTSYNC_DATA = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
uint32_t dims[] = {2, 1, 1};
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
uint64_t eventAddress = MemoryConstants::cacheLineSize * 123;
@@ -1627,7 +1627,7 @@ HWTEST2_F(CommandEncodeStatesTest, givenEncodeDispatchKernelWhenRequestingExtraP
HWTEST2_F(CommandEncodeStatesTest, givenForceComputeWalkerPostSyncFlushWithWriteWhenEncodeIsCalledThenPostSyncIsProgrammedCorrectly, IsAtLeastXeHpCore) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using OPERATION = typename PostSyncType::OPERATION;
DebugManagerStateRestore restore;

View File

@@ -19,7 +19,7 @@
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenGetSizeWhenDispatchingCmdBufferThenConsumedSizeMatchEstimatedAndCmdBufferHasCorrectCmds) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
uint64_t postSyncAddress = (1ull << 48) | (1ull << 24);
@@ -63,7 +63,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenGetSizeWhenDispatchingCm
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenWorkgroupOneAndNoPartitionHintWhenDispatchingCmdBufferThenPartitionCountOneAndPartitionTypeDisabled) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
uint64_t postSyncAddress = (1ull << 48) | (1ull << 24);
@@ -108,7 +108,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenWorkgroupOneAndNoPartiti
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenWorkgroupOneAndPartitionHintWhenDispatchingCmdBufferThenPartitionCountOneAndPartitionTypeFromHint) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
uint64_t postSyncAddress = (1ull << 48) | (1ull << 24);
@@ -153,7 +153,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenWorkgroupOneAndPartition
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningWhenDispatchingCmdBufferThenCorrectStaticPartitioningCommandsAreProgrammed) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
using MI_LOAD_REGISTER_MEM = typename FamilyType::MI_LOAD_REGISTER_MEM;
@@ -205,7 +205,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningWhenDi
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningWhenPartitionRegisterIsRequiredThenCorrectStaticPartitioningCommandsAreProgrammed) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
using MI_LOAD_REGISTER_MEM = typename FamilyType::MI_LOAD_REGISTER_MEM;
@@ -261,7 +261,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningWhenPa
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningPreferredAndPartitionCountIsOneWhenDispatchingCmdBufferThenCorrectStaticPartitioningCommandsAreProgrammed) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
using MI_LOAD_REGISTER_MEM = typename FamilyType::MI_LOAD_REGISTER_MEM;
@@ -313,7 +313,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningPrefer
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningPreferredWhenForceDisabledWparidRegisterThenExpectNoCommandFound) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
using MI_LOAD_REGISTER_MEM = typename FamilyType::MI_LOAD_REGISTER_MEM;
@@ -351,7 +351,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningPrefer
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningPreferredWhenForceDisabledPipeControlThenExpectNoCommandFound) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
@@ -389,7 +389,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenStaticPartitioningPrefer
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests, GivenDynamicPartitioningPreferredWhenForceDisabledPipeControlThenExpectNoCommandFound) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
using BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
@@ -1593,7 +1593,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests,
HWCMDTEST_F(IGFX_XE_HP_CORE, ImplicitScalingTests,
givenStaticPartitioningWhenBlockDispatchFlagIsTrueThenDoNotDispatchAnyCommands) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename DefaultWalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<DefaultWalkerType>());
uint64_t postSyncAddress = (1ull << 48) | (1ull << 24);

View File

@@ -23,7 +23,7 @@ struct WalkerPartitionTests : public ::testing::Test {
template <typename GfxFamily>
auto createWalker(uint64_t postSyncAddress) {
using WalkerType = typename GfxFamily::DefaultWalkerType;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(GfxFamily::template getPostSyncType<WalkerType>());
WalkerType walker;
walker = GfxFamily::template getInitGpuWalker<WalkerType>();

View File

@@ -15,7 +15,7 @@
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenWalkerPartitionWhenConstructCommandBufferIsCalledThenBatchBufferIsBeingProgrammed) {
using WalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
MockExecutionEnvironment mockExecutionEnvironment{};
mockExecutionEnvironment.incRefInternal();
@@ -1097,7 +1097,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWit
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenDebugModesForWalkerPartitionWhenConstructCommandBufferIsCalledThenBatchBufferIsBeingProgrammed) {
using WalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
MockExecutionEnvironment mockExecutionEnvironment{};
mockExecutionEnvironment.incRefInternal();

View File

@@ -912,7 +912,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticPartitioningWhenZD
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenSelfCleanupSectionWhenDebugForceDisableCrossTileSyncThenSelfCleanupOverridesDebugAndAddsOwnCleanupSection) {
using WalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
MockExecutionEnvironment mockExecutionEnvironment{};
mockExecutionEnvironment.incRefInternal();
@@ -1124,7 +1124,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenSelfCleanupSectionWhenDe
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenSelfCleanupAndAtomicsUsedForCleanupWhenDebugForceDisableCrossTileSyncThenSelfCleanupOverridesDebugAndAddsOwnCleanupSection) {
using WalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
MockExecutionEnvironment mockExecutionEnvironment{};
mockExecutionEnvironment.incRefInternal();
@@ -1345,7 +1345,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenSelfCleanupAndAtomicsUse
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenDynamicPartitioningWhenPipeControlProgrammingDisabledThenExpectNoPipeControlCommand) {
using WalkerType = typename FamilyType::DefaultWalkerType;
using PostSyncType = typename WalkerType::PostSyncType;
using PostSyncType = decltype(FamilyType::template getPostSyncType<WalkerType>());
testArgs.crossTileAtomicSynchronization = false;
testArgs.partitionCount = 16u;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -15,6 +15,12 @@ using namespace NEO;
using XeHpgCoreHwCmdTest = ::testing::Test;
XE_HPG_CORETEST_F(XeHpgCoreHwCmdTest, givenComputeWalkerThenPostSyncTypeIsPostSyncData) {
auto postSyncType = FamilyType::template getPostSyncType<typename FamilyType::DefaultWalkerType>();
using POSTSYNC_DATA = typename FamilyType::POSTSYNC_DATA;
EXPECT_TRUE((std::is_same<POSTSYNC_DATA, decltype(postSyncType)>::value));
}
XE_HPG_CORETEST_F(XeHpgCoreHwCmdTest, givenMediaSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) {
auto mediaSurfaceState = FamilyType::cmdInitMediaSurfaceState;
uint32_t mocs = 4u;