mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Revert "refactor: Switch host events and in order nodes to tagAllocation type"
This reverts commit 8bbba3fe5c.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
574fe9fb29
commit
676334807f
@@ -101,7 +101,7 @@ ze_result_t EventPool::initialize(DriverHandle *driver, Context *context, uint32
|
|||||||
initializeSizeParameters(numDevices, deviceHandles, *driverHandleImp, rootDeviceEnvironment);
|
initializeSizeParameters(numDevices, deviceHandles, *driverHandleImp, rootDeviceEnvironment);
|
||||||
|
|
||||||
NEO::AllocationType allocationType = isEventPoolTimestampFlagSet() ? NEO::AllocationType::timestampPacketTagBuffer
|
NEO::AllocationType allocationType = isEventPoolTimestampFlagSet() ? NEO::AllocationType::timestampPacketTagBuffer
|
||||||
: NEO::AllocationType::tagBuffer;
|
: NEO::AllocationType::bufferHostMemory;
|
||||||
if (this->devices.size() > 1) {
|
if (this->devices.size() > 1) {
|
||||||
this->isDeviceEventPoolAllocation = false;
|
this->isDeviceEventPoolAllocation = false;
|
||||||
}
|
}
|
||||||
@@ -448,7 +448,7 @@ ze_result_t EventPool::openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t &
|
|||||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
NEO::AllocationType allocationType = NEO::AllocationType::tagBuffer;
|
NEO::AllocationType allocationType = NEO::AllocationType::bufferHostMemory;
|
||||||
if (eventPool->isDeviceEventPoolAllocation) {
|
if (eventPool->isDeviceEventPoolAllocation) {
|
||||||
allocationType = NEO::AllocationType::gpuTimestampDeviceBuffer;
|
allocationType = NEO::AllocationType::gpuTimestampDeviceBuffer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2412,7 +2412,7 @@ HWTEST2_F(InOrderCmdListTests, givenDebugFlagSetWhenDispatchingThenEnsureHostAll
|
|||||||
EXPECT_NE(nullptr, immCmdList2->inOrderExecInfo->getHostCounterAllocation());
|
EXPECT_NE(nullptr, immCmdList2->inOrderExecInfo->getHostCounterAllocation());
|
||||||
EXPECT_NE(immCmdList2->inOrderExecInfo->getDeviceCounterAllocation(), immCmdList2->inOrderExecInfo->getHostCounterAllocation());
|
EXPECT_NE(immCmdList2->inOrderExecInfo->getDeviceCounterAllocation(), immCmdList2->inOrderExecInfo->getHostCounterAllocation());
|
||||||
|
|
||||||
EXPECT_EQ(AllocationType::tagBuffer, immCmdList1->inOrderExecInfo->getHostCounterAllocation()->getAllocationType());
|
EXPECT_EQ(AllocationType::bufferHostMemory, immCmdList1->inOrderExecInfo->getHostCounterAllocation()->getAllocationType());
|
||||||
EXPECT_EQ(immCmdList1->inOrderExecInfo->getBaseHostAddress(), immCmdList1->inOrderExecInfo->getHostCounterAllocation()->getUnderlyingBuffer());
|
EXPECT_EQ(immCmdList1->inOrderExecInfo->getBaseHostAddress(), immCmdList1->inOrderExecInfo->getHostCounterAllocation()->getUnderlyingBuffer());
|
||||||
EXPECT_FALSE(immCmdList1->inOrderExecInfo->getHostCounterAllocation()->isAllocatedInLocalMemoryPool());
|
EXPECT_FALSE(immCmdList1->inOrderExecInfo->getHostCounterAllocation()->isAllocatedInLocalMemoryPool());
|
||||||
|
|
||||||
@@ -2421,7 +2421,7 @@ HWTEST2_F(InOrderCmdListTests, givenDebugFlagSetWhenDispatchingThenEnsureHostAll
|
|||||||
auto hostAllocOffset = ptrDiff(immCmdList2->inOrderExecInfo->getBaseHostAddress(), immCmdList1->inOrderExecInfo->getBaseHostAddress());
|
auto hostAllocOffset = ptrDiff(immCmdList2->inOrderExecInfo->getBaseHostAddress(), immCmdList1->inOrderExecInfo->getBaseHostAddress());
|
||||||
EXPECT_NE(0u, hostAllocOffset);
|
EXPECT_NE(0u, hostAllocOffset);
|
||||||
|
|
||||||
EXPECT_EQ(AllocationType::tagBuffer, immCmdList2->inOrderExecInfo->getHostCounterAllocation()->getAllocationType());
|
EXPECT_EQ(AllocationType::bufferHostMemory, immCmdList2->inOrderExecInfo->getHostCounterAllocation()->getAllocationType());
|
||||||
EXPECT_EQ(immCmdList2->inOrderExecInfo->getBaseHostAddress(), ptrOffset(immCmdList2->inOrderExecInfo->getHostCounterAllocation()->getUnderlyingBuffer(), hostAllocOffset));
|
EXPECT_EQ(immCmdList2->inOrderExecInfo->getBaseHostAddress(), ptrOffset(immCmdList2->inOrderExecInfo->getHostCounterAllocation()->getUnderlyingBuffer(), hostAllocOffset));
|
||||||
EXPECT_FALSE(immCmdList2->inOrderExecInfo->getHostCounterAllocation()->isAllocatedInLocalMemoryPool());
|
EXPECT_FALSE(immCmdList2->inOrderExecInfo->getHostCounterAllocation()->isAllocatedInLocalMemoryPool());
|
||||||
|
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ TEST_F(EventPoolCreate, GivenDeviceThenEventPoolIsCreated) {
|
|||||||
if (l0GfxCoreHelper.alwaysAllocateEventInLocalMem()) {
|
if (l0GfxCoreHelper.alwaysAllocateEventInLocalMem()) {
|
||||||
EXPECT_EQ(NEO::AllocationType::gpuTimestampDeviceBuffer, eventPool->getAllocation().getAllocationType());
|
EXPECT_EQ(NEO::AllocationType::gpuTimestampDeviceBuffer, eventPool->getAllocation().getAllocationType());
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(NEO::AllocationType::tagBuffer, eventPool->getAllocation().getAllocationType());
|
EXPECT_EQ(NEO::AllocationType::bufferHostMemory, eventPool->getAllocation().getAllocationType());
|
||||||
}
|
}
|
||||||
eventPool->destroy();
|
eventPool->destroy();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class DeviceAllocNodeType {
|
|||||||
|
|
||||||
static constexpr size_t defaultAllocatorTagCount = 128;
|
static constexpr size_t defaultAllocatorTagCount = 128;
|
||||||
|
|
||||||
static constexpr AllocationType getAllocationType() { return deviceAlloc ? NEO::AllocationType::timestampPacketTagBuffer : NEO::AllocationType::tagBuffer; }
|
static constexpr AllocationType getAllocationType() { return deviceAlloc ? NEO::AllocationType::timestampPacketTagBuffer : NEO::AllocationType::bufferHostMemory; }
|
||||||
|
|
||||||
static constexpr TagNodeType getTagNodeType() { return TagNodeType::counter64b; }
|
static constexpr TagNodeType getTagNodeType() { return TagNodeType::counter64b; }
|
||||||
|
|
||||||
|
|||||||
@@ -482,7 +482,7 @@ TEST_F(TagAllocatorTest, givenTagAllocatorWhenGraphicsAllocationIsCreatedThenSet
|
|||||||
EXPECT_EQ(AllocationType::profilingTagBuffer, hwTimeStampsTag->getBaseGraphicsAllocation()->getAllocationType());
|
EXPECT_EQ(AllocationType::profilingTagBuffer, hwTimeStampsTag->getBaseGraphicsAllocation()->getAllocationType());
|
||||||
EXPECT_EQ(AllocationType::profilingTagBuffer, hwPerfCounterTag->getBaseGraphicsAllocation()->getAllocationType());
|
EXPECT_EQ(AllocationType::profilingTagBuffer, hwPerfCounterTag->getBaseGraphicsAllocation()->getAllocationType());
|
||||||
EXPECT_EQ(AllocationType::timestampPacketTagBuffer, inOrderDeviceTag->getBaseGraphicsAllocation()->getAllocationType());
|
EXPECT_EQ(AllocationType::timestampPacketTagBuffer, inOrderDeviceTag->getBaseGraphicsAllocation()->getAllocationType());
|
||||||
EXPECT_EQ(AllocationType::tagBuffer, inOrderHostTag->getBaseGraphicsAllocation()->getAllocationType());
|
EXPECT_EQ(AllocationType::bufferHostMemory, inOrderHostTag->getBaseGraphicsAllocation()->getAllocationType());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(TagAllocatorTest, givenMultipleRootDevicesWhenPopulatingTagsThenCreateMultiGraphicsAllocation) {
|
TEST_F(TagAllocatorTest, givenMultipleRootDevicesWhenPopulatingTagsThenCreateMultiGraphicsAllocation) {
|
||||||
|
|||||||
Reference in New Issue
Block a user