From c2266fc69ef2226913d18890f6610d48d707e1fa Mon Sep 17 00:00:00 2001 From: Bartosz Dunajski Date: Mon, 28 Apr 2025 09:26:59 +0000 Subject: [PATCH] refactor: remove not used CB event TS logic Signed-off-by: Bartosz Dunajski --- level_zero/core/source/cmdlist/cmdlist_hw.inl | 2 +- .../core/source/cmdlist/cmdlist_hw_xehp_and_later.inl | 2 +- level_zero/core/source/event/event.cpp | 4 ---- level_zero/core/source/event/event.h | 2 -- level_zero/core/source/event/event_impl.inl | 2 +- .../sources/cmdlist/test_in_order_cmdlist_2.cpp | 9 --------- shared/source/debug_settings/debug_variables_base.inl | 1 - shared/test/common/test_files/igdrcl.config | 1 - 8 files changed, 3 insertions(+), 20 deletions(-) diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 19cb2b4165..fd15a97d58 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -4316,7 +4316,7 @@ bool CommandListCoreFamily::handleCounterBasedEventOperations(Eve } } - if (signalEvent->isUsingContextEndOffset() && Event::standaloneInOrderTimestampAllocationEnabled()) { + if (signalEvent->isUsingContextEndOffset()) { auto tag = device->getInOrderTimestampAllocator()->getTag(); this->commandContainer.addToResidencyContainer(tag->getBaseGraphicsAllocation()->getGraphicsAllocation(device->getRootDeviceIndex())); diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl index 1faa28786f..710be73210 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl @@ -332,7 +332,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithParams(K if (inOrderExecSignalRequired) { if (!compactEvent || this->asMutable() || !compactEvent->isCounterBased() || compactEvent->isUsingContextEndOffset()) { if (inOrderNonWalkerSignalling) { - if (!eventForInOrderExec->getAllocation(this->device) && Event::standaloneInOrderTimestampAllocationEnabled()) { + if (!eventForInOrderExec->getAllocation(this->device)) { eventForInOrderExec->resetInOrderTimestampNode(device->getInOrderTimestampAllocator()->getTag(), this->partitionCount); } if (this->asMutable() || !eventForInOrderExec->isCounterBased()) { diff --git a/level_zero/core/source/event/event.cpp b/level_zero/core/source/event/event.cpp index f69a0fa23e..7d042b2031 100644 --- a/level_zero/core/source/event/event.cpp +++ b/level_zero/core/source/event/event.cpp @@ -42,10 +42,6 @@ template Event *Event::create(EventPool *, const ze_event_desc_t *, De template Event *Event::create(const EventDescriptor &, Device *, ze_result_t &); template Event *Event::create(const EventDescriptor &, Device *, ze_result_t &); -bool Event::standaloneInOrderTimestampAllocationEnabled() { - return (NEO::debugManager.flags.StandaloneInOrderTimestampAllocationEnabled.get() != 0); -} - ze_result_t EventPool::initialize(DriverHandle *driver, Context *context, uint32_t numDevices, ze_device_handle_t *deviceHandles) { this->context = static_cast(context); diff --git a/level_zero/core/source/event/event.h b/level_zero/core/source/event/event.h index 4871e94f3f..37e26d157c 100644 --- a/level_zero/core/source/event/event.h +++ b/level_zero/core/source/event/event.h @@ -133,8 +133,6 @@ struct Event : _ze_event_handle_t { implicitlyDisabled }; - static bool standaloneInOrderTimestampAllocationEnabled(); - template static Event *create(EventPool *eventPool, const ze_event_desc_t *desc, Device *device); diff --git a/level_zero/core/source/event/event_impl.inl b/level_zero/core/source/event/event_impl.inl index ac24283c85..8bfdf7e251 100644 --- a/level_zero/core/source/event/event_impl.inl +++ b/level_zero/core/source/event/event_impl.inl @@ -135,7 +135,7 @@ Event *Event::create(EventPool *eventPool, const ze_event_desc_t *desc, Device * .ipcPool = eventPool->isIpcPoolFlagSet(), }; - if (eventPool->getCounterBasedFlags() != 0 && standaloneInOrderTimestampAllocationEnabled()) { + if (eventPool->getCounterBasedFlags() != 0) { eventDescriptor.eventPoolAllocation = nullptr; } diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_2.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_2.cpp index 921f8b0870..0dff8bbe07 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_2.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_2.cpp @@ -1759,15 +1759,6 @@ struct StandaloneInOrderTimestampAllocationTests : public InOrderCmdListFixture } }; -HWTEST2_F(StandaloneInOrderTimestampAllocationTests, givenDebugFlagSetWhenCreatingEventThenDontCreateTimestampNode, MatchAny) { - NEO::debugManager.flags.StandaloneInOrderTimestampAllocationEnabled.set(0); - auto eventPool = createEvents(1, true); - auto cmdList = createImmCmdList(); - cmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_TRUE(events[0]->inOrderTimestampNode.empty()); - EXPECT_NE(nullptr, events[0]->eventPoolAllocation); -} - HWTEST2_F(StandaloneInOrderTimestampAllocationTests, givenSignalScopeEventWhenSignalEventIsCalledThenProgramPipeControl, MatchAny) { using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; auto eventPool = createEvents(2, false); diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index b3002533ab..400d938720 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -300,7 +300,6 @@ DECLARE_DEBUG_VARIABLE(int32_t, ForceSynchronizedDispatchMode, -1, "-1: default, DECLARE_DEBUG_VARIABLE(int32_t, ForceSipClass, -1, "-1: default, otherwise based on values from enum class SipClassType (init, builtins, rawBinaryFromFile, hexadecimalHeaderFile, externalLib)") DECLARE_DEBUG_VARIABLE(int32_t, ForceScratchAndMTPBufferSizeMode, -1, "-1: default, 0: Full, 1: Min. BMG+: Reduce required memory for scratch and MTP buffers on CCS context") DECLARE_DEBUG_VARIABLE(int32_t, CFEStackIDControl, -1, "Set Stack ID Control in CFE_STATE on Xe2+, -1 - do not set") -DECLARE_DEBUG_VARIABLE(int32_t, StandaloneInOrderTimestampAllocationEnabled, -1, "-1: default, 0: disabled, 1: enabled. If enabled, use internal allocations, instead of Event pool for timestamps") DECLARE_DEBUG_VARIABLE(int32_t, ClearStandaloneInOrderTimestampAllocation, -1, "-1: default, 0: disabled, 1: enabled. If clear allocation before sending to GPU") DECLARE_DEBUG_VARIABLE(int32_t, EnableTimestampPoolAllocator, -1, "-1: default, 0: disabled, 1: enabled. If enabled, timestamp allocations are pooled and reused across multiple event pools") DECLARE_DEBUG_VARIABLE(int32_t, ForceComputeWalkerPostSyncFlushWithWrite, -1, "-1: ignore. >=0: Force PostSync cache flush and override postSync immediate write address to given value") diff --git a/shared/test/common/test_files/igdrcl.config b/shared/test/common/test_files/igdrcl.config index 6e0501db0c..e152b8b5f5 100644 --- a/shared/test/common/test_files/igdrcl.config +++ b/shared/test/common/test_files/igdrcl.config @@ -625,7 +625,6 @@ ForceScratchAndMTPBufferSizeMode = -1 ForcePostSyncL1Flush = -1 AllowNotZeroForCompressedOnWddm = -1 ForceGmmSystemMemoryBufferForAllocations = 0 -StandaloneInOrderTimestampAllocationEnabled = -1 ForceComputeWalkerPostSyncFlushWithWrite = -1 DeferStateInitSubmissionToFirstRegularUsage = -1 WaitForPagingFenceInController = -1