feature: disable IPC for CB Events
Related-To: NEO-8145 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
parent
470ab44d35
commit
9a3fea9849
|
@ -42,6 +42,12 @@ template Event *Event::create<uint32_t>(EventPool *, const ze_event_desc_t *, De
|
|||
ze_result_t EventPool::initialize(DriverHandle *driver, Context *context, uint32_t numDevices, ze_device_handle_t *deviceHandles) {
|
||||
this->context = static_cast<ContextImp *>(context);
|
||||
|
||||
bool ipcPool = eventPoolFlags & ZE_EVENT_POOL_FLAG_IPC;
|
||||
|
||||
if (ipcPool && counterBased) {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
|
||||
RootDeviceIndicesContainer rootDeviceIndices;
|
||||
uint32_t maxRootDeviceIndex = 0u;
|
||||
uint32_t currentNumDevices = numDevices;
|
||||
|
@ -108,7 +114,7 @@ ze_result_t EventPool::initialize(DriverHandle *driver, Context *context, uint32
|
|||
if (graphicsAllocation) {
|
||||
eventPoolAllocations->addAllocation(graphicsAllocation);
|
||||
allocatedMemory = true;
|
||||
if (eventPoolFlags & ZE_EVENT_POOL_FLAG_IPC) {
|
||||
if (ipcPool) {
|
||||
uint64_t handle = 0;
|
||||
this->isShareableEventMemory = (graphicsAllocation->peekInternalHandle(memoryManager, handle) == 0);
|
||||
}
|
||||
|
@ -121,7 +127,7 @@ ze_result_t EventPool::initialize(DriverHandle *driver, Context *context, uint32
|
|||
eventPoolPtr = driver->getMemoryManager()->createMultiGraphicsAllocationInSystemMemoryPool(rootDeviceIndices,
|
||||
allocationProperties,
|
||||
*eventPoolAllocations);
|
||||
if (eventPoolFlags & ZE_EVENT_POOL_FLAG_IPC) {
|
||||
if (ipcPool) {
|
||||
this->isShareableEventMemory = eventPoolAllocations->getDefaultGraphicsAllocation()->isShareableHostMemory;
|
||||
}
|
||||
allocatedMemory = (nullptr != eventPoolPtr);
|
||||
|
|
|
@ -923,6 +923,20 @@ HWTEST2_F(InOrderCmdListTests, givenNotSignaledInOrderEventWhenAddedToWaitListTh
|
|||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, returnValue);
|
||||
}
|
||||
|
||||
HWTEST2_F(InOrderCmdListTests, givenIpcAndCounterBasedEventPoolFlagsWhenCreatingThenReturnError, IsAtLeastSkl) {
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_IPC;
|
||||
eventPoolDesc.count = 1;
|
||||
|
||||
ze_event_pool_counter_based_exp_desc_t counterBasedExtension = {ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC};
|
||||
eventPoolDesc.pNext = &counterBasedExtension;
|
||||
|
||||
auto eventPool = EventPool::create(driverHandle.get(), context, 0, nullptr, &eventPoolDesc, returnValue);
|
||||
|
||||
EXPECT_EQ(nullptr, eventPool);
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, returnValue);
|
||||
}
|
||||
|
||||
HWTEST2_F(InOrderCmdListTests, givenNotSignaledInOrderWhenWhenCallingQueryStatusThenReturnNotReady, IsAtLeastSkl) {
|
||||
auto eventPool = createEvents<FamilyType>(1, false);
|
||||
events[0]->enableCounterBasedMode(true);
|
||||
|
|
Loading…
Reference in New Issue