fix: Remove INLINE_DATA structure

Related-To: NEO-12706

Signed-off-by: Illia Vysochyn <illia.vysochyn@intel.com>
This commit is contained in:
Illia Vysochyn
2024-09-24 18:14:48 +00:00
committed by Compute-Runtime-Automation
parent dfc863c7c1
commit f062194669
7 changed files with 19 additions and 39 deletions

View File

@@ -226,7 +226,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandListDualStorage, givenIndirectDispatchWithSh
using MI_LOAD_REGISTER_MEM = typename FamilyType::MI_LOAD_REGISTER_MEM;
using MI_LOAD_REGISTER_REG = typename FamilyType::MI_LOAD_REGISTER_REG;
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
using INLINE_DATA = typename FamilyType::INLINE_DATA;
std::unique_ptr<L0::ult::Module> mockModule = std::make_unique<L0::ult::Module>(device, nullptr, ModuleType::builtin);
Mock<::L0::KernelImp> kernel;

View File

@@ -135,7 +135,6 @@ using XeHPAndLaterAubInlineDataTest = Test<InlineDataFixture>;
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubInlineDataTest, givenCrossThreadFitIntoSingleGrfWhenInlineDataAllowedThenCopyAllCrossThreadIntoInline) {
using WalkerVariant = typename FamilyType::WalkerVariant;
using INLINE_DATA = typename FamilyType::INLINE_DATA;
auto *kernel = kernels[4].get();

View File

@@ -725,7 +725,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenAutoLocal
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlineDataEnabledWhenLocalIdsUsedThenDoNotExpectCrossThreadDataInWalkerEmitLocalFieldSet) {
using WalkerVariant = typename FamilyType::WalkerVariant;
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
using INLINE_DATA = typename FamilyType::INLINE_DATA;
debugManager.flags.EnablePassInlineData.set(true);
debugManager.flags.EnableHwGenerationLocalIds.set(0);
@@ -733,11 +732,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
auto cmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
auto &commandStream = cmdQ->getCS(1024);
auto usedBeforeCS = commandStream.getUsed();
constexpr auto inlineDataSize = COMPUTE_WALKER::getInlineDataSize();
auto &kd = kernel->kernelInfo.kernelDescriptor;
kd.kernelAttributes.flags.passInlineData = true;
kernel->mockKernel->setCrossThreadData(crossThreadDataGrf, sizeof(INLINE_DATA));
kernel->mockKernel->setCrossThreadData(crossThreadDataGrf, inlineDataSize);
auto memoryManager = device->getUltCommandStreamReceiver<FamilyType>().getMemoryManager();
kernel->kernelInfo.kernelAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{device->getRootDeviceIndex(), MemoryConstants::pageSize});
@@ -761,7 +761,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
EXPECT_NE(hwParser.itorWalker, hwParser.cmdList.end());
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*hwParser.itorWalker);
std::visit([this, lws = lws](auto &&walker) {
std::visit([this, lws = lws, inlineDataSize = inlineDataSize](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
EXPECT_EQ(1u, walker->getEmitInlineParameter());
@@ -769,7 +769,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
EXPECT_EQ(0u, walker->getGenerateLocalId());
constexpr uint32_t expectedEmit = 0u;
EXPECT_EQ(expectedEmit, walker->getEmitLocalId());
EXPECT_EQ(0, memcmp(walker->getInlineDataPointer(), crossThreadDataGrf, sizeof(INLINE_DATA)));
EXPECT_EQ(0, memcmp(walker->getInlineDataPointer(), crossThreadDataGrf, inlineDataSize));
uint32_t simd = this->kernel->mockKernel->getKernelInfo().getMaxSimdSize();
// only X is present
@@ -918,7 +918,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenKernelWithoutLocalIdsAndPassInlineDataEnabledWhenNoHWGenerationOfLocalIdsUsedThenExpectCrossThreadDataInWalkerAndNoEmitLocalFieldSet) {
using WalkerVariant = typename FamilyType::WalkerVariant;
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
using INLINE_DATA = typename FamilyType::INLINE_DATA;
debugManager.flags.EnablePassInlineData.set(true);
debugManager.flags.EnableHwGenerationLocalIds.set(false);
@@ -926,10 +925,11 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenKernelWit
auto cmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
auto &kd = kernel->kernelInfo.kernelDescriptor;
constexpr auto inlineDataSize = COMPUTE_WALKER::getInlineDataSize();
kd.kernelAttributes.flags.passInlineData = true;
kd.kernelAttributes.numLocalIdChannels = 0;
kernel->mockKernel->setCrossThreadData(crossThreadDataGrf, sizeof(INLINE_DATA));
kernel->mockKernel->setCrossThreadData(crossThreadDataGrf, inlineDataSize);
auto memoryManager = device->getUltCommandStreamReceiver<FamilyType>().getMemoryManager();
kernel->kernelInfo.kernelAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{device->getRootDeviceIndex(), MemoryConstants::pageSize});
@@ -944,7 +944,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenKernelWit
EXPECT_NE(hwParser.itorWalker, hwParser.cmdList.end());
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*hwParser.itorWalker);
std::visit([this](auto &&walker) {
std::visit([this, inlineDataSize = inlineDataSize](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
EXPECT_EQ(1u, walker->getEmitInlineParameter());
@@ -952,7 +952,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenKernelWit
EXPECT_EQ(0u, walker->getGenerateLocalId());
EXPECT_EQ(0u, walker->getEmitLocalId());
EXPECT_EQ(0, memcmp(walker->getInlineDataPointer(), this->crossThreadDataGrf, sizeof(INLINE_DATA)));
EXPECT_EQ(0, memcmp(walker->getInlineDataPointer(), this->crossThreadDataGrf, inlineDataSize));
if constexpr (std::is_same_v<WalkerType, COMPUTE_WALKER>) {
size_t perThreadTotalDataSize = 0U;
@@ -969,7 +969,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenKernelWit
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlineDataEnabledWhenNoLocalIdsUsedAndCrossThreadIsTwoGrfsThenExpectFirstCrossThreadDataInWalkerSecondInPayload) {
using WalkerVariant = typename FamilyType::WalkerVariant;
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
using INLINE_DATA = typename FamilyType::INLINE_DATA;
debugManager.flags.EnablePassInlineData.set(true);
debugManager.flags.EnableHwGenerationLocalIds.set(false);
@@ -1064,13 +1063,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenAllChanne
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlineDataAndHwLocalIdsGenerationEnabledWhenLocalIdsUsedThenExpectCrossThreadDataInWalkerAndEmitFields) {
using WalkerVariant = typename FamilyType::WalkerVariant;
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
using INLINE_DATA = typename FamilyType::INLINE_DATA;
debugManager.flags.EnablePassInlineData.set(true);
debugManager.flags.EnableHwGenerationLocalIds.set(1);
auto cmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
constexpr auto inlineDataSize = COMPUTE_WALKER::getInlineDataSize();
auto &kd = kernel->kernelInfo.kernelDescriptor;
kd.entryPoints.skipPerThreadDataLoad = 128;
kd.kernelAttributes.flags.passInlineData = true;
@@ -1079,7 +1077,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
kd.kernelAttributes.localId[2] = 0;
kd.kernelAttributes.numLocalIdChannels = 1;
kernel->mockKernel->setCrossThreadData(crossThreadDataGrf, sizeof(INLINE_DATA));
kernel->mockKernel->setCrossThreadData(crossThreadDataGrf, inlineDataSize);
auto memoryManager = device->getUltCommandStreamReceiver<FamilyType>().getMemoryManager();
kernel->kernelInfo.kernelAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{device->getRootDeviceIndex(), MemoryConstants::pageSize});
@@ -1094,7 +1092,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
EXPECT_NE(hwParser.itorWalker, hwParser.cmdList.end());
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*hwParser.itorWalker);
std::visit([this](auto &&walker) {
std::visit([this, inlineDataSize = inlineDataSize](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
EXPECT_EQ(1u, walker->getEmitInlineParameter());
@@ -1103,7 +1101,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
constexpr uint32_t expectedEmit = (1 << 0);
EXPECT_EQ(expectedEmit, walker->getEmitLocalId());
EXPECT_EQ(0, memcmp(walker->getInlineDataPointer(), this->crossThreadDataGrf, sizeof(INLINE_DATA)));
EXPECT_EQ(0, memcmp(walker->getInlineDataPointer(), this->crossThreadDataGrf, inlineDataSize));
if constexpr (std::is_same_v<WalkerType, COMPUTE_WALKER>) {
constexpr uint32_t expectedIndirectDataLength = 0;
@@ -1130,7 +1128,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlineDataAndHwLocalIdsGenerationEnabledWhenLocalIdsNotUsedThenExpectCrossThreadDataInWalkerAndNoHwLocalIdGeneration) {
using WalkerVariant = typename FamilyType::WalkerVariant;
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
using INLINE_DATA = typename FamilyType::INLINE_DATA;
debugManager.flags.EnablePassInlineData.set(true);
debugManager.flags.EnableHwGenerationLocalIds.set(1);
@@ -1138,6 +1135,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
auto cmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
auto &kd = kernel->kernelInfo.kernelDescriptor;
constexpr auto inlineDataSize = COMPUTE_WALKER::getInlineDataSize();
kd.entryPoints.skipPerThreadDataLoad = 128;
kd.kernelAttributes.flags.passInlineData = true;
kd.kernelAttributes.localId[0] = 0;
@@ -1145,7 +1143,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
kd.kernelAttributes.localId[2] = 0;
kd.kernelAttributes.numLocalIdChannels = 0;
kernel->mockKernel->setCrossThreadData(crossThreadDataGrf, sizeof(INLINE_DATA));
kernel->mockKernel->setCrossThreadData(crossThreadDataGrf, inlineDataSize);
auto memoryManager = device->getUltCommandStreamReceiver<FamilyType>().getMemoryManager();
kernel->kernelInfo.kernelAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{device->getRootDeviceIndex(), MemoryConstants::pageSize});
@@ -1160,7 +1158,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
EXPECT_NE(hwParser.itorWalker, hwParser.cmdList.end());
WalkerVariant walkerVariant = NEO::UnitTestHelper<FamilyType>::getWalkerVariant(*hwParser.itorWalker);
std::visit([this](auto &&walker) {
std::visit([this, inlineDataSize = inlineDataSize](auto &&walker) {
using WalkerType = std::decay_t<decltype(*walker)>;
EXPECT_EQ(1u, walker->getEmitInlineParameter());
@@ -1169,7 +1167,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
constexpr uint32_t expectedEmit = 0;
EXPECT_EQ(expectedEmit, walker->getEmitLocalId());
EXPECT_EQ(0, memcmp(walker->getInlineDataPointer(), this->crossThreadDataGrf, sizeof(INLINE_DATA)));
EXPECT_EQ(0, memcmp(walker->getInlineDataPointer(), this->crossThreadDataGrf, inlineDataSize));
if constexpr (std::is_same_v<WalkerType, COMPUTE_WALKER>) {
constexpr uint32_t expectedIndirectDataLength = 0;

View File

@@ -5494,11 +5494,6 @@ typedef struct tagINTERFACE_DESCRIPTOR_DATA {
} INTERFACE_DESCRIPTOR_DATA;
STATIC_ASSERT(32 == sizeof(INTERFACE_DESCRIPTOR_DATA));
typedef struct tagINLINE_DATA {
uint32_t RawData[8];
} INLINE_DATA;
STATIC_ASSERT(32 == sizeof(INLINE_DATA));
typedef struct tagCOMPUTE_WALKER {
union tagTheStructure {
struct tagCommon {

View File

@@ -5427,11 +5427,6 @@ typedef struct tagINTERFACE_DESCRIPTOR_DATA {
} INTERFACE_DESCRIPTOR_DATA;
STATIC_ASSERT(32 == sizeof(INTERFACE_DESCRIPTOR_DATA));
typedef struct tagINLINE_DATA {
uint32_t RawData[8];
} INLINE_DATA;
STATIC_ASSERT(32 == sizeof(INLINE_DATA));
typedef struct tagCOMPUTE_WALKER {
union tagTheStructure {
struct tagCommon {
@@ -5505,7 +5500,7 @@ typedef struct tagCOMPUTE_WALKER {
// DWORD 26
POSTSYNC_DATA PostSync;
// DWORD 31
INLINE_DATA InlineData;
uint32_t InlineData[8];
} Common;
uint32_t RawData[39];
} TheStructure;

View File

@@ -5192,11 +5192,6 @@ typedef struct tagINTERFACE_DESCRIPTOR_DATA {
} INTERFACE_DESCRIPTOR_DATA;
STATIC_ASSERT(32 == sizeof(INTERFACE_DESCRIPTOR_DATA));
typedef struct tagINLINE_DATA {
uint32_t RawData[8];
} INLINE_DATA;
STATIC_ASSERT(32 == sizeof(INLINE_DATA));
typedef struct tagCOMPUTE_WALKER {
union tagTheStructure {
struct tagCommon {
@@ -5271,7 +5266,7 @@ typedef struct tagCOMPUTE_WALKER {
// DWORD 26
POSTSYNC_DATA PostSync;
// DWORD 31
INLINE_DATA InlineData;
uint32_t InlineData[8];
} Common;
uint32_t RawData[31];
} TheStructure;

View File

@@ -573,7 +573,6 @@ HWTEST2_F(CommandEncodeStatesTest, givenDispatchInterfaceWhenNumRequiredGrfIsNot
HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredWhenEncodingWalkerThenEmitInlineParameterIsSet) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
using InlineData = typename FamilyType::INLINE_DATA;
uint32_t dims[] = {1, 1, 1};
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
@@ -591,7 +590,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredWhe
auto cmd = genCmdCast<DefaultWalkerType *>(*itor);
EXPECT_EQ(1u, cmd->getEmitInlineParameter());
const uint32_t inlineDataSize = sizeof(InlineData);
constexpr auto inlineDataSize = DefaultWalkerType::getInlineDataSize();
size_t expectedSizeIOH = alignUp(dispatchInterface->getCrossThreadDataSize() +
dispatchInterface->getPerThreadDataSizeForWholeThreadGroup() -
inlineDataSize,