mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
refactor: Use timestamp types for events and in order nodes
Switching tagAllocation into UC causes regressions in non event scenarios. It is no longer used as dependant type for semaphores. Restoring previous GMM_USAGE settings for tag. Marking events and in order nodes using only timestamp types as they have proper GMM_USAGE settings already and can be both in smem and lmem. Resolves: NEO-13847 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9305652446
commit
09e23804dc
@@ -100,8 +100,7 @@ ze_result_t EventPool::initialize(DriverHandle *driver, Context *context, uint32
|
||||
|
||||
initializeSizeParameters(numDevices, deviceHandles, *driverHandleImp, rootDeviceEnvironment);
|
||||
|
||||
NEO::AllocationType allocationType = isEventPoolTimestampFlagSet() ? NEO::AllocationType::timestampPacketTagBuffer
|
||||
: NEO::AllocationType::tagBuffer;
|
||||
NEO::AllocationType allocationType = NEO::AllocationType::timestampPacketTagBuffer;
|
||||
if (this->devices.size() > 1) {
|
||||
this->isDeviceEventPoolAllocation = false;
|
||||
}
|
||||
@@ -448,7 +447,7 @@ ze_result_t EventPool::openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t &
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
NEO::AllocationType allocationType = NEO::AllocationType::tagBuffer;
|
||||
NEO::AllocationType allocationType = NEO::AllocationType::timestampPacketTagBuffer;
|
||||
if (eventPool->isDeviceEventPoolAllocation) {
|
||||
allocationType = NEO::AllocationType::gpuTimestampDeviceBuffer;
|
||||
}
|
||||
|
||||
@@ -2412,7 +2412,7 @@ HWTEST2_F(InOrderCmdListTests, givenDebugFlagSetWhenDispatchingThenEnsureHostAll
|
||||
EXPECT_NE(nullptr, immCmdList2->inOrderExecInfo->getHostCounterAllocation());
|
||||
EXPECT_NE(immCmdList2->inOrderExecInfo->getDeviceCounterAllocation(), immCmdList2->inOrderExecInfo->getHostCounterAllocation());
|
||||
|
||||
EXPECT_EQ(AllocationType::tagBuffer, immCmdList1->inOrderExecInfo->getHostCounterAllocation()->getAllocationType());
|
||||
EXPECT_EQ(AllocationType::timestampPacketTagBuffer, immCmdList1->inOrderExecInfo->getHostCounterAllocation()->getAllocationType());
|
||||
EXPECT_EQ(immCmdList1->inOrderExecInfo->getBaseHostAddress(), immCmdList1->inOrderExecInfo->getHostCounterAllocation()->getUnderlyingBuffer());
|
||||
EXPECT_FALSE(immCmdList1->inOrderExecInfo->getHostCounterAllocation()->isAllocatedInLocalMemoryPool());
|
||||
|
||||
@@ -2421,7 +2421,7 @@ HWTEST2_F(InOrderCmdListTests, givenDebugFlagSetWhenDispatchingThenEnsureHostAll
|
||||
auto hostAllocOffset = ptrDiff(immCmdList2->inOrderExecInfo->getBaseHostAddress(), immCmdList1->inOrderExecInfo->getBaseHostAddress());
|
||||
EXPECT_NE(0u, hostAllocOffset);
|
||||
|
||||
EXPECT_EQ(AllocationType::tagBuffer, immCmdList2->inOrderExecInfo->getHostCounterAllocation()->getAllocationType());
|
||||
EXPECT_EQ(AllocationType::timestampPacketTagBuffer, immCmdList2->inOrderExecInfo->getHostCounterAllocation()->getAllocationType());
|
||||
EXPECT_EQ(immCmdList2->inOrderExecInfo->getBaseHostAddress(), ptrOffset(immCmdList2->inOrderExecInfo->getHostCounterAllocation()->getUnderlyingBuffer(), hostAllocOffset));
|
||||
EXPECT_FALSE(immCmdList2->inOrderExecInfo->getHostCounterAllocation()->isAllocatedInLocalMemoryPool());
|
||||
|
||||
@@ -2454,7 +2454,7 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenDispatchingThenHandleDependen
|
||||
auto immCmdList = createImmCmdList<gfxCoreFamily>();
|
||||
|
||||
EXPECT_NE(nullptr, immCmdList->inOrderExecInfo.get());
|
||||
EXPECT_EQ(AllocationType::timestampPacketTagBuffer, immCmdList->inOrderExecInfo->getDeviceCounterAllocation()->getAllocationType());
|
||||
EXPECT_EQ(AllocationType::gpuTimestampDeviceBuffer, immCmdList->inOrderExecInfo->getDeviceCounterAllocation()->getAllocationType());
|
||||
|
||||
EXPECT_EQ(0u, immCmdList->inOrderExecInfo->getCounterValue());
|
||||
|
||||
|
||||
@@ -382,7 +382,7 @@ HWTEST2_F(CopyOffloadInOrderTests, givenProfilingEventWithRelaxedOrderingWhenApp
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(CopyOffloadInOrderTests, givenAtomicSignalingModeWhenUpdatingCounterThenUseCorrectHwCommands, IsAtLeastXeHpCore) {
|
||||
HWTEST2_F(CopyOffloadInOrderTests, givenAtomicSignalingModeWhenUpdatingCounterThenUseCorrectHwCommands, IsAtLeastXe2HpgCore) {
|
||||
using MI_ATOMIC = typename FamilyType::MI_ATOMIC;
|
||||
using ATOMIC_OPCODES = typename FamilyType::MI_ATOMIC::ATOMIC_OPCODES;
|
||||
using DATA_SIZE = typename FamilyType::MI_ATOMIC::DATA_SIZE;
|
||||
|
||||
@@ -369,7 +369,7 @@ TEST_F(EventPoolCreate, GivenDeviceThenEventPoolIsCreated) {
|
||||
if (l0GfxCoreHelper.alwaysAllocateEventInLocalMem()) {
|
||||
EXPECT_EQ(NEO::AllocationType::gpuTimestampDeviceBuffer, eventPool->getAllocation().getAllocationType());
|
||||
} else {
|
||||
EXPECT_EQ(NEO::AllocationType::tagBuffer, eventPool->getAllocation().getAllocationType());
|
||||
EXPECT_EQ(NEO::AllocationType::timestampPacketTagBuffer, eventPool->getAllocation().getAllocationType());
|
||||
}
|
||||
eventPool->destroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user