mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
refactor: Passing information about the engine
Part 2 Related-To: NEO-10678 Signed-off-by: Andrzej Koska <andrzej.koska@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
32de8a3b12
commit
625d2d7f50
@@ -2537,8 +2537,8 @@ void CommandListCoreFamily<gfxCoreFamily>::appendWaitOnInOrderDependency(std::sh
|
||||
auto lri2 = commandContainer.getCommandStream()->template getSpaceForCmd<MI_LOAD_REGISTER_IMM>();
|
||||
|
||||
if (!noopDispatch) {
|
||||
NEO::LriHelper<GfxFamily>::program(lri1, firstRegister, getLowPart(waitValue), true);
|
||||
NEO::LriHelper<GfxFamily>::program(lri2, secondRegister, getHighPart(waitValue), true);
|
||||
NEO::LriHelper<GfxFamily>::program(lri1, firstRegister, getLowPart(waitValue), true, isCopyOnly());
|
||||
NEO::LriHelper<GfxFamily>::program(lri2, secondRegister, getHighPart(waitValue), true, isCopyOnly());
|
||||
} else {
|
||||
memset(lri1, 0, sizeof(MI_LOAD_REGISTER_IMM));
|
||||
memset(lri2, 0, sizeof(MI_LOAD_REGISTER_IMM));
|
||||
|
||||
@@ -210,7 +210,7 @@ struct InOrderCmdListFixture : public ::Test<ModuleFixture> {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool verifyInOrderDependency(GenCmdList::iterator &cmd, uint64_t counter, uint64_t syncVa, bool qwordCounter);
|
||||
bool verifyInOrderDependency(GenCmdList::iterator &cmd, uint64_t counter, uint64_t syncVa, bool qwordCounter, bool isBcs);
|
||||
|
||||
DebugManagerStateRestore restorer;
|
||||
std::unique_ptr<NEO::MockOsContext> mockCopyOsContext;
|
||||
@@ -225,7 +225,7 @@ struct InOrderCmdListFixture : public ::Test<ModuleFixture> {
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool InOrderCmdListFixture::verifyInOrderDependency(GenCmdList::iterator &cmd, uint64_t counter, uint64_t syncVa, bool qwordCounter) {
|
||||
bool InOrderCmdListFixture::verifyInOrderDependency(GenCmdList::iterator &cmd, uint64_t counter, uint64_t syncVa, bool qwordCounter, bool isBcs) {
|
||||
using MI_SEMAPHORE_WAIT = typename GfxFamily::MI_SEMAPHORE_WAIT;
|
||||
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
|
||||
@@ -586,7 +586,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenSubmittingThenProgramSemaphor
|
||||
std::advance(itor, -2); // verify 2x LRI before semaphore
|
||||
}
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, immCmdList->inOrderExecInfo->getBaseDeviceAddress() + counterOffset, immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, immCmdList->inOrderExecInfo->getBaseDeviceAddress() + counterOffset, immCmdList->isQwordInOrderCounter(), false));
|
||||
}
|
||||
|
||||
HWTEST2_F(InOrderCmdListTests, givenTimestmapEventWhenProgrammingBarrierThenDontAddPipeControl, IsAtLeastSkl) {
|
||||
@@ -847,7 +847,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderEventModeWhenSubmittingThenProgramSem
|
||||
|
||||
itor++; // skip implicit dependency
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, immCmdList2->inOrderExecInfo->getBaseDeviceAddress() + counterOffset2, immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, immCmdList2->inOrderExecInfo->getBaseDeviceAddress() + counterOffset2, immCmdList->isQwordInOrderCounter(), false));
|
||||
|
||||
itor = find<MI_SEMAPHORE_WAIT *>(itor, cmdList.end());
|
||||
EXPECT_EQ(cmdList.end(), itor);
|
||||
@@ -1590,7 +1590,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderEventModeWhenSubmittingFromDifferentC
|
||||
std::advance(itor, -2); // verify 2x LRI before semaphore
|
||||
}
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, immCmdList1->inOrderExecInfo->getBaseDeviceAddress(), immCmdList1->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, immCmdList1->inOrderExecInfo->getBaseDeviceAddress(), immCmdList1->isQwordInOrderCounter(), false));
|
||||
|
||||
EXPECT_NE(immCmdList1->inOrderExecInfo->getBaseDeviceAddress(), immCmdList2->inOrderExecInfo->getBaseDeviceAddress());
|
||||
}
|
||||
@@ -2331,7 +2331,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingAppendSignalEventT
|
||||
(cmdStream->getUsed() - offset)));
|
||||
|
||||
auto itor = cmdList.begin();
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, inOrderSyncVa, immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, inOrderSyncVa, immCmdList->isQwordInOrderCounter(), false));
|
||||
|
||||
{
|
||||
|
||||
@@ -2401,7 +2401,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingNonKernelAppendThe
|
||||
(cmdStream->getUsed() - offset)));
|
||||
|
||||
auto itor = cmdList.begin();
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, inOrderCounter, inOrderSyncVa, immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, inOrderCounter, inOrderSyncVa, immCmdList->isQwordInOrderCounter(), false));
|
||||
|
||||
verifySdi(cmdList.rbegin(), cmdList.rend(), ++inOrderCounter);
|
||||
}
|
||||
@@ -2419,7 +2419,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingNonKernelAppendThe
|
||||
(cmdStream->getUsed() - offset)));
|
||||
|
||||
auto itor = cmdList.begin();
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, inOrderCounter, inOrderSyncVa, immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, inOrderCounter, inOrderSyncVa, immCmdList->isQwordInOrderCounter(), false));
|
||||
verifySdi(cmdList.rbegin(), cmdList.rend(), ++inOrderCounter);
|
||||
}
|
||||
|
||||
@@ -2434,7 +2434,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingNonKernelAppendThe
|
||||
(cmdStream->getUsed() - offset)));
|
||||
|
||||
auto itor = cmdList.begin();
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, inOrderCounter, inOrderSyncVa, immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, inOrderCounter, inOrderSyncVa, immCmdList->isQwordInOrderCounter(), false));
|
||||
verifySdi(cmdList.rbegin(), cmdList.rend(), ++inOrderCounter);
|
||||
}
|
||||
}
|
||||
@@ -2499,7 +2499,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderRegularCmdListWhenProgrammingNonKerne
|
||||
(cmdStream->getUsed() - offset)));
|
||||
|
||||
auto itor = cmdList.begin();
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, inOrderSyncVa, regularCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, inOrderSyncVa, regularCmdList->isQwordInOrderCounter(), false));
|
||||
verifySdi(cmdList.rbegin(), cmdList.rend(), 2);
|
||||
}
|
||||
|
||||
@@ -2516,7 +2516,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderRegularCmdListWhenProgrammingNonKerne
|
||||
(cmdStream->getUsed() - offset)));
|
||||
|
||||
auto itor = cmdList.begin();
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 2, inOrderSyncVa, regularCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 2, inOrderSyncVa, regularCmdList->isQwordInOrderCounter(), false));
|
||||
verifySdi(cmdList.rbegin(), cmdList.rend(), 3);
|
||||
}
|
||||
|
||||
@@ -2531,7 +2531,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderRegularCmdListWhenProgrammingNonKerne
|
||||
(cmdStream->getUsed() - offset)));
|
||||
|
||||
auto itor = cmdList.begin();
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 3, inOrderSyncVa, regularCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 3, inOrderSyncVa, regularCmdList->isQwordInOrderCounter(), false));
|
||||
verifySdi(cmdList.rbegin(), cmdList.rend(), 4);
|
||||
}
|
||||
|
||||
@@ -2548,7 +2548,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderRegularCmdListWhenProgrammingNonKerne
|
||||
(cmdStream->getUsed() - offset)));
|
||||
|
||||
auto itor = cmdList.begin();
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 4, inOrderSyncVa, regularCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 4, inOrderSyncVa, regularCmdList->isQwordInOrderCounter(), false));
|
||||
verifySdi(cmdList.rbegin(), cmdList.rend(), 5);
|
||||
}
|
||||
|
||||
@@ -2565,7 +2565,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderRegularCmdListWhenProgrammingNonKerne
|
||||
(cmdStream->getUsed() - offset)));
|
||||
|
||||
auto itor = cmdList.begin();
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 5, inOrderSyncVa, regularCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 5, inOrderSyncVa, regularCmdList->isQwordInOrderCounter(), false));
|
||||
verifySdi(cmdList.rbegin(), cmdList.rend(), 6);
|
||||
}
|
||||
}
|
||||
@@ -2658,7 +2658,7 @@ HWTEST2_F(InOrderCmdListTests, givenEventGeneratedByRegularCmdListWhenWaitingFro
|
||||
std::advance(semaphoreItor, -2); // verify 2x LRI before semaphore
|
||||
}
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreItor, expectedValue, regularCmdList->inOrderExecInfo->getBaseDeviceAddress(), immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreItor, expectedValue, regularCmdList->inOrderExecInfo->getBaseDeviceAddress(), immCmdList->isQwordInOrderCounter(), false));
|
||||
};
|
||||
|
||||
// 0 Execute calls
|
||||
@@ -3048,7 +3048,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingAppendWaitOnEvents
|
||||
std::advance(semaphoreItor, -2); // verify 2x LRI before semaphore
|
||||
}
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreItor, 2, immCmdList->inOrderExecInfo->getBaseDeviceAddress(), immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreItor, 2, immCmdList->inOrderExecInfo->getBaseDeviceAddress(), immCmdList->isQwordInOrderCounter(), false));
|
||||
|
||||
auto sdiItor = find<MI_STORE_DATA_IMM *>(semaphoreItor, cmdList.end());
|
||||
ASSERT_NE(cmdList.end(), sdiItor);
|
||||
@@ -4437,10 +4437,10 @@ HWTEST2_F(MultiTileInOrderCmdListTests, givenAtomicSignallingEnabledWhenWaitingF
|
||||
// implicit dependency
|
||||
auto gpuAddress = immCmdList2->inOrderExecInfo->getBaseDeviceAddress();
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, partitionCount, gpuAddress, immCmdList2->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, partitionCount, gpuAddress, immCmdList2->isQwordInOrderCounter(), false));
|
||||
|
||||
// event
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, partitionCount, events[0]->inOrderExecInfo->getBaseDeviceAddress(), immCmdList2->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, partitionCount, events[0]->inOrderExecInfo->getBaseDeviceAddress(), immCmdList2->isQwordInOrderCounter(), false));
|
||||
}
|
||||
|
||||
HWTEST2_F(MultiTileInOrderCmdListTests, givenMultiTileInOrderModeWhenProgrammingWaitOnEventsThenHandleAllEventPackets, IsAtLeastXeHpCore) {
|
||||
@@ -4521,8 +4521,8 @@ HWTEST2_F(MultiTileInOrderCmdListTests, givenMultiTileInOrderModeWhenProgramming
|
||||
|
||||
auto gpuAddress = immCmdList->inOrderExecInfo->getBaseDeviceAddress();
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, gpuAddress, immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, gpuAddress + sizeof(uint64_t), immCmdList->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, gpuAddress, immCmdList->isQwordInOrderCounter(), false));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, 1, gpuAddress + sizeof(uint64_t), immCmdList->isQwordInOrderCounter(), false));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4845,7 +4845,7 @@ void BcsSplitInOrderCmdListTests::verifySplitCmds(LinearStream &cmdStream, size_
|
||||
std::advance(itor, -2); // verify 2x LRI before semaphore
|
||||
}
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, submissionId, counterGpuAddress, immCmdList.isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(itor, submissionId, counterGpuAddress, immCmdList.isQwordInOrderCounter(), true));
|
||||
}
|
||||
|
||||
if (externalDependencyGpuVa > 0) {
|
||||
@@ -4890,7 +4890,7 @@ void BcsSplitInOrderCmdListTests::verifySplitCmds(LinearStream &cmdStream, size_
|
||||
std::advance(semaphoreItor, -2); // verify 2x LRI before semaphore
|
||||
}
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreItor, submissionId, counterGpuAddress, immCmdList.isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreItor, submissionId, counterGpuAddress, immCmdList.isQwordInOrderCounter(), true));
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < numLinkCopyEngines; i++) {
|
||||
@@ -5311,8 +5311,8 @@ HWTEST2_F(InOrderRegularCmdListTests, givenCrossRegularCmdListDependenciesWhenEx
|
||||
std::advance(semaphoreCmds[1], -2);
|
||||
}
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreCmds[0], expectedImplicitDependencyValue, implicitCounterGpuVa, regularCmdList1->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreCmds[1], expectedExplicitDependencyValue, externalCounterGpuVa, regularCmdList1->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreCmds[0], expectedImplicitDependencyValue, implicitCounterGpuVa, regularCmdList1->isQwordInOrderCounter(), false));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreCmds[1], expectedExplicitDependencyValue, externalCounterGpuVa, regularCmdList1->isQwordInOrderCounter(), false));
|
||||
};
|
||||
|
||||
auto cmdListHandle1 = regularCmdList1->toHandle();
|
||||
@@ -5381,8 +5381,8 @@ HWTEST2_F(InOrderRegularCmdListTests, givenCrossRegularCmdListDependenciesWhenEx
|
||||
std::advance(semaphoreCmds[1], -2);
|
||||
}
|
||||
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreCmds[0], expectedImplicitDependencyValue, implicitCounterGpuVa, regularCmdList1->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreCmds[1], expectedExplicitDependencyValue, externalCounterGpuVa, regularCmdList1->isQwordInOrderCounter()));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreCmds[0], expectedImplicitDependencyValue, implicitCounterGpuVa, regularCmdList1->isQwordInOrderCounter(), false));
|
||||
ASSERT_TRUE(verifyInOrderDependency<FamilyType>(semaphoreCmds[1], expectedExplicitDependencyValue, externalCounterGpuVa, regularCmdList1->isQwordInOrderCounter(), false));
|
||||
};
|
||||
|
||||
regularCmdList2->appendLaunchKernel(kernel->toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false);
|
||||
|
||||
Reference in New Issue
Block a user