@@ -577,12 +577,11 @@ ze_result_t ContextImp::openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t
577
577
auto device = Device::fromHandle (this ->devices .begin ()->second );
578
578
auto neoDevice = device->getNEODevice ();
579
579
NEO::osHandle osHandle = static_cast <NEO::osHandle>(handle);
580
- auto &hwHelper = device->getHwHelper ();
581
- const uint32_t eventAlignment = static_cast <uint32_t >(hwHelper.getTimestampPacketAllocatorAlignment ());
582
- uint32_t eventSize = static_cast <uint32_t >(alignUp (EventPacketsCount::eventPackets * hwHelper.getSingleTimestampPacketSize (), eventAlignment));
583
- size_t alignedSize = alignUp<size_t >(numEvents * eventSize, MemoryConstants::pageSize64k);
580
+
581
+ eventPool->initializeSizeParameters (this ->numDevices , this ->deviceHandles .data (), *this ->driverHandle , device->getHwInfo ());
582
+
584
583
NEO::AllocationProperties unifiedMemoryProperties{rootDeviceIndex,
585
- alignedSize ,
584
+ eventPool-> getEventPoolSize () ,
586
585
NEO::AllocationType::BUFFER_HOST_MEMORY,
587
586
systemMemoryBitfield};
588
587
@@ -605,8 +604,6 @@ ze_result_t ContextImp::openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t
605
604
eventPool->eventPoolPtr = reinterpret_cast <void *>(alloc->getUnderlyingBuffer ());
606
605
eventPool->devices .push_back (device);
607
606
eventPool->isImportedIpcPool = true ;
608
- eventPool->setEventSize (eventSize);
609
- eventPool->setEventAlignment (eventAlignment);
610
607
611
608
for (auto currDeviceIndex : this ->rootDeviceIndices ) {
612
609
if (currDeviceIndex == rootDeviceIndex) {
0 commit comments