From 6e8cabdce58dcea9406667e5aa6bca9d64fac5cf Mon Sep 17 00:00:00 2001 From: Dominik Dabek Date: Thu, 5 May 2022 14:26:03 +0000 Subject: [PATCH] Split wait for timestamps to queue and event On PVC both enabled. On DG2 only for events. Related-To: NEO-6948 Signed-off-by: Dominik Dabek --- opencl/source/command_queue/command_queue.cpp | 4 +- opencl/source/event/event.cpp | 28 +++++++++++- opencl/source/event/event.h | 1 + .../command_queue_hw_1_tests.cpp | 2 +- .../command_queue/command_queue_tests.cpp | 14 +++--- opencl/test/unit_test/event/event_tests.cpp | 44 ++++++++++++++++++- .../helpers/timestamp_packet_1_tests.cpp | 19 ++++---- opencl/test/unit_test/mocks/mock_event.h | 1 + .../test/unit_test/test_files/igdrcl.config | 3 +- .../debug_settings/debug_variables_base.inl | 3 +- shared/source/helpers/hw_helper.h | 7 ++- .../helpers/hw_helper_bdw_and_later.inl | 7 ++- .../helpers/hw_helper_xehp_and_later.inl | 7 ++- .../xe_hpc_core/hw_helper_xe_hpc_core.cpp | 7 ++- .../xe_hpg_core/hw_helper_xe_hpg_core.cpp | 5 +++ .../hw_helper_xe_hpc_core_tests.cpp | 3 +- .../hw_helper_tests_xe_hpg_core.cpp | 5 ++- 17 files changed, 129 insertions(+), 31 deletions(-) diff --git a/opencl/source/command_queue/command_queue.cpp b/opencl/source/command_queue/command_queue.cpp index 56672904da..c6dfc8dad1 100644 --- a/opencl/source/command_queue/command_queue.cpp +++ b/opencl/source/command_queue/command_queue.cpp @@ -1089,10 +1089,10 @@ bool CommandQueue::isWaitForTimestampsEnabled() const { const auto &hwHelper = HwHelper::get(getDevice().getHardwareInfo().platform.eRenderCoreFamily); const auto &hwInfoConfig = *HwInfoConfig::get(getDevice().getHardwareInfo().platform.eProductFamily); auto enabled = CommandQueue::isTimestampWaitEnabled(); - enabled &= hwHelper.isTimestampWaitSupported(); + enabled &= hwHelper.isTimestampWaitSupportedForQueues(); enabled &= !hwInfoConfig.isDcFlushAllowed(); - switch (DebugManager.flags.EnableTimestampWait.get()) { + switch (DebugManager.flags.EnableTimestampWaitForQueues.get()) { case 0: enabled = false; break; diff --git a/opencl/source/event/event.cpp b/opencl/source/event/event.cpp index 9275b13f8c..142a62c6a1 100644 --- a/opencl/source/event/event.cpp +++ b/opencl/source/event/event.cpp @@ -680,9 +680,35 @@ bool Event::isCompleted() { return cmdQueue->isCompleted(getCompletionStamp(), this->bcsState) || this->areTimestampsCompleted(); } +bool Event::isWaitForTimestampsEnabled() const { + const auto &hwHelper = HwHelper::get(cmdQueue->getDevice().getHardwareInfo().platform.eRenderCoreFamily); + auto enabled = cmdQueue->isTimestampWaitEnabled(); + enabled &= hwHelper.isTimestampWaitSupportedForEvents(); + + switch (DebugManager.flags.EnableTimestampWaitForEvents.get()) { + case 0: + enabled = false; + break; + case 1: + enabled = cmdQueue->getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled(); + break; + case 2: + enabled = cmdQueue->getGpgpuCommandStreamReceiver().isDirectSubmissionEnabled(); + break; + case 3: + enabled = cmdQueue->getGpgpuCommandStreamReceiver().isAnyDirectSubmissionEnabled(); + break; + case 4: + enabled = true; + break; + } + + return enabled; +} + bool Event::areTimestampsCompleted() { if (this->timestampPacketContainer.get()) { - if (this->cmdQueue->isWaitForTimestampsEnabled()) { + if (this->isWaitForTimestampsEnabled()) { for (const auto ×tamp : this->timestampPacketContainer->peekNodes()) { for (uint32_t i = 0; i < timestamp->getPacketsUsed(); i++) { this->cmdQueue->getGpgpuCommandStreamReceiver().downloadAllocation(*timestamp->getBaseGraphicsAllocation()->getGraphicsAllocation(this->cmdQueue->getGpgpuCommandStreamReceiver().getRootDeviceIndex())); diff --git a/opencl/source/event/event.h b/opencl/source/event/event.h index 4594c0e505..bdc441471d 100644 --- a/opencl/source/event/event.h +++ b/opencl/source/event/event.h @@ -356,6 +356,7 @@ class Event : public BaseObject<_cl_event>, public IDNode { static void setExecutionStatusToAbortedDueToGpuHang(cl_event *first, cl_event *last); + bool isWaitForTimestampsEnabled() const; bool areTimestampsCompleted(); bool currentCmdQVirtualEvent; diff --git a/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp index 57b8aee77b..eccde612a2 100644 --- a/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp @@ -42,7 +42,7 @@ HWTEST_F(CommandQueueHwTest, WhenConstructingTwoCommandQueuesThenOnlyOneDebugSur HWTEST_F(CommandQueueHwTest, givenNoTimestampPacketsWhenWaitForTimestampsThenNoWaitAndTagIsNotUpdated) { DebugManagerStateRestore restorer; DebugManager.flags.EnableTimestampPacket.set(0); - DebugManager.flags.EnableTimestampWait.set(4); + DebugManager.flags.EnableTimestampWaitForQueues.set(4); ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); auto device = std::make_unique(MockDevice::create(executionEnvironment, 0u)); device->getUltCommandStreamReceiver().timestampPacketWriteEnabled = false; diff --git a/opencl/test/unit_test/command_queue/command_queue_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_tests.cpp index afde5e62af..d17d5b5371 100644 --- a/opencl/test/unit_test/command_queue/command_queue_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_tests.cpp @@ -146,34 +146,34 @@ TEST(CommandQueue, givenEnableTimestampWaitWhenCheckIsTimestampWaitEnabledThenRe MockCommandQueue cmdQ(nullptr, mockDevice.get(), 0, false); { - DebugManager.flags.EnableTimestampWait.set(-1); + DebugManager.flags.EnableTimestampWaitForQueues.set(-1); const auto &hwHelper = HwHelper::get(mockDevice->getHardwareInfo().platform.eRenderCoreFamily); const auto &hwInfoConfig = *HwInfoConfig::get(mockDevice->getHardwareInfo().platform.eProductFamily); - EXPECT_EQ(cmdQ.isWaitForTimestampsEnabled(), hwHelper.isTimestampWaitSupported() && !hwInfoConfig.isDcFlushAllowed()); + EXPECT_EQ(cmdQ.isWaitForTimestampsEnabled(), hwHelper.isTimestampWaitSupportedForQueues() && !hwInfoConfig.isDcFlushAllowed()); } { - DebugManager.flags.EnableTimestampWait.set(0); + DebugManager.flags.EnableTimestampWaitForQueues.set(0); EXPECT_FALSE(cmdQ.isWaitForTimestampsEnabled()); } { - DebugManager.flags.EnableTimestampWait.set(1); + DebugManager.flags.EnableTimestampWaitForQueues.set(1); EXPECT_EQ(cmdQ.isWaitForTimestampsEnabled(), cmdQ.getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled()); } { - DebugManager.flags.EnableTimestampWait.set(2); + DebugManager.flags.EnableTimestampWaitForQueues.set(2); EXPECT_EQ(cmdQ.isWaitForTimestampsEnabled(), cmdQ.getGpgpuCommandStreamReceiver().isDirectSubmissionEnabled()); } { - DebugManager.flags.EnableTimestampWait.set(3); + DebugManager.flags.EnableTimestampWaitForQueues.set(3); EXPECT_EQ(cmdQ.isWaitForTimestampsEnabled(), cmdQ.getGpgpuCommandStreamReceiver().isAnyDirectSubmissionEnabled()); } { - DebugManager.flags.EnableTimestampWait.set(4); + DebugManager.flags.EnableTimestampWaitForQueues.set(4); EXPECT_TRUE(cmdQ.isWaitForTimestampsEnabled()); } } diff --git a/opencl/test/unit_test/event/event_tests.cpp b/opencl/test/unit_test/event/event_tests.cpp index cad94f4dc6..55f4227657 100644 --- a/opencl/test/unit_test/event/event_tests.cpp +++ b/opencl/test/unit_test/event/event_tests.cpp @@ -1708,7 +1708,7 @@ TEST(EventsDebug, givenEventWhenTrackingOfParentsIsOffThenDoNotTrackParents) { event.setStatus(CL_COMPLETE); } -TEST(CommandQueue, givenTimestampPacketWritesDisabledAndQueueHasTimestampPacketContainerThenCreateTheContainerForEvent) { +TEST(EventTimestampTest, givenTimestampPacketWritesDisabledAndQueueHasTimestampPacketContainerThenCreateTheContainerForEvent) { DebugManagerStateRestore stateRestore; DebugManager.flags.EnableTimestampPacket.set(0); @@ -1721,3 +1721,45 @@ TEST(CommandQueue, givenTimestampPacketWritesDisabledAndQueueHasTimestampPacketC MockEvent event{&queue, CL_COMMAND_MARKER, 0, 0}; EXPECT_NE(nullptr, event.timestampPacketContainer); } + +TEST(EventTimestampTest, givenEnableTimestampWaitWhenCheckIsTimestampWaitEnabledThenReturnProperValue) { + DebugManagerStateRestore restorer; + VariableBackup backup(&ultHwConfig); + ultHwConfig.useWaitForTimestamps = true; + MockContext context{}; + auto mockDevice = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); + MockCommandQueue cmdQ(&context, mockDevice.get(), 0, false); + + MockEvent event{&cmdQ, CL_COMMAND_MARKER, 0, 0}; + + { + DebugManager.flags.EnableTimestampWaitForEvents.set(-1); + const auto &hwHelper = HwHelper::get(mockDevice->getHardwareInfo().platform.eRenderCoreFamily); + EXPECT_EQ(event.isWaitForTimestampsEnabled(), hwHelper.isTimestampWaitSupportedForEvents()); + } + + { + DebugManager.flags.EnableTimestampWaitForEvents.set(0); + EXPECT_FALSE(event.isWaitForTimestampsEnabled()); + } + + { + DebugManager.flags.EnableTimestampWaitForEvents.set(1); + EXPECT_EQ(event.isWaitForTimestampsEnabled(), cmdQ.getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled()); + } + + { + DebugManager.flags.EnableTimestampWaitForEvents.set(2); + EXPECT_EQ(event.isWaitForTimestampsEnabled(), cmdQ.getGpgpuCommandStreamReceiver().isDirectSubmissionEnabled()); + } + + { + DebugManager.flags.EnableTimestampWaitForEvents.set(3); + EXPECT_EQ(event.isWaitForTimestampsEnabled(), cmdQ.getGpgpuCommandStreamReceiver().isAnyDirectSubmissionEnabled()); + } + + { + DebugManager.flags.EnableTimestampWaitForEvents.set(4); + EXPECT_TRUE(event.isWaitForTimestampsEnabled()); + } +} \ No newline at end of file diff --git a/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp b/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp index b0791bebb8..63184b7e32 100644 --- a/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp +++ b/opencl/test/unit_test/helpers/timestamp_packet_1_tests.cpp @@ -819,7 +819,8 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenEnqueueingThe HWTEST_F(TimestampPacketTests, givenTimestampWaitEnabledWhenEnqueueWithEventThenEventHasCorrectTimestampsToCheckForCompletion) { DebugManagerStateRestore restorer; DebugManager.flags.UpdateTaskCountFromWait.set(3); - DebugManager.flags.EnableTimestampWait.set(1); + DebugManager.flags.EnableTimestampWaitForEvents.set(1); + DebugManager.flags.EnableTimestampWaitForQueues.set(1); auto &csr = device->getUltCommandStreamReceiver(); csr.timestampPacketWriteEnabled = true; @@ -889,10 +890,10 @@ HWTEST_F(TimestampPacketTests, givenTimestampWaitEnabledWhenEnqueueWithEventThen *csr.getTagAddress() = csr.peekTaskCount(); } -HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitWhenFinishWithoutEnqueueThenDoNotWaitOnTimestamp) { +HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitForQueuesWhenFinishWithoutEnqueueThenDoNotWaitOnTimestamp) { DebugManagerStateRestore restorer; DebugManager.flags.UpdateTaskCountFromWait.set(3); - DebugManager.flags.EnableTimestampWait.set(1); + DebugManager.flags.EnableTimestampWaitForQueues.set(1); auto &csr = device->getUltCommandStreamReceiver(); csr.timestampPacketWriteEnabled = true; @@ -910,10 +911,10 @@ HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitWhenFinishWithoutEnqueueT EXPECT_EQ(csr.waitForCompletionWithTimeoutTaskCountCalled, 1u); } -HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitWhenFinishThenWaitOnTimestamp) { +HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitForQueuesWhenFinishThenWaitOnTimestamp) { DebugManagerStateRestore restorer; DebugManager.flags.UpdateTaskCountFromWait.set(3); - DebugManager.flags.EnableTimestampWait.set(1); + DebugManager.flags.EnableTimestampWaitForQueues.set(1); auto &csr = device->getUltCommandStreamReceiver(); csr.timestampPacketWriteEnabled = true; @@ -940,10 +941,10 @@ HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitWhenFinishThenWaitOnTimes EXPECT_EQ(csr.waitForCompletionWithTimeoutTaskCountCalled, 0u); } -HWTEST_F(TimestampPacketTests, givenOOQAndEnableTimestampWaitWhenFinishThenWaitOnTimestamp) { +HWTEST_F(TimestampPacketTests, givenOOQAndEnableTimestampWaitForQueuesWhenFinishThenWaitOnTimestamp) { DebugManagerStateRestore restorer; DebugManager.flags.UpdateTaskCountFromWait.set(3); - DebugManager.flags.EnableTimestampWait.set(1); + DebugManager.flags.EnableTimestampWaitForQueues.set(1); auto &csr = device->getUltCommandStreamReceiver(); csr.timestampPacketWriteEnabled = true; @@ -982,10 +983,10 @@ extern uint32_t pauseOffset; extern std::function setupPauseAddress; } // namespace CpuIntrinsicsTests -HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitWhenFinishThenCallWaitUtils) { +HWTEST_F(TimestampPacketTests, givenEnableTimestampWaitForQueuesWhenFinishThenCallWaitUtils) { DebugManagerStateRestore restorer; DebugManager.flags.UpdateTaskCountFromWait.set(3); - DebugManager.flags.EnableTimestampWait.set(1); + DebugManager.flags.EnableTimestampWaitForQueues.set(1); device->getUltCommandStreamReceiver().timestampPacketWriteEnabled = true; cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0}; diff --git a/opencl/test/unit_test/mocks/mock_event.h b/opencl/test/unit_test/mocks/mock_event.h index 56463d3f01..376e638f39 100644 --- a/opencl/test/unit_test/mocks/mock_event.h +++ b/opencl/test/unit_test/mocks/mock_event.h @@ -37,6 +37,7 @@ struct MockEvent : public BaseEventType { using BaseEventType::timeStampNode; using Event::calcProfilingData; using Event::calculateSubmitTimestampData; + using Event::isWaitForTimestampsEnabled; using Event::magic; using Event::queueTimeStamp; using Event::submitTimeStamp; diff --git a/opencl/test/unit_test/test_files/igdrcl.config b/opencl/test/unit_test/test_files/igdrcl.config index 1f25ba0261..74b7ee0971 100644 --- a/opencl/test/unit_test/test_files/igdrcl.config +++ b/opencl/test/unit_test/test_files/igdrcl.config @@ -234,7 +234,7 @@ PrintIoctlTimes = 0 PrintIoctlEntries = 0 PrintUmdSharedMigration = 0 UpdateTaskCountFromWait = -1 -EnableTimestampWait = -1 +EnableTimestampWaitForQueues = -1 PreferCopyEngineForCopyBufferToBuffer = -1 EnableStaticPartitioning = -1 DisableDeepBind = 0 @@ -416,3 +416,4 @@ PrintImageBlitBlockCopyCmdDetails = 0 UseContextEndOffsetForEventCompletion = -1 DirectSubmissionInsertExtraMiMemFenceCommands = -1 DirectSubmissionInsertSfenceInstructionPriorToSubmission = -1 +EnableTimestampWaitForEvents = -1 diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index 5f2dda82c0..b9e7ee314e 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -417,7 +417,8 @@ DECLARE_DEBUG_VARIABLE(int32_t, UseVmBind, -1, "Use new residency model on Linux DECLARE_DEBUG_VARIABLE(int32_t, PassBoundBOToExec, -1, "Pass bound BOs to exec call to keep dependencies") DECLARE_DEBUG_VARIABLE(int32_t, EnableStaticPartitioning, -1, "Divide workload into partitions during dispatch, -1: default, 0: disabled, 1: enabled") DECLARE_DEBUG_VARIABLE(int32_t, UpdateTaskCountFromWait, -1, " Do not update task count after each enqueue, but send update request while wait, -1: default(disabled), 0: disabled, 1: enabled on gpgpue engine with direct submission, 2: enabled on any direct submission, 3: enabled") -DECLARE_DEBUG_VARIABLE(int32_t, EnableTimestampWait, -1, "Wait using timestamps, -1: default(disabled), 0: disabled, 1: enabled where UpdateTaskCountFromWait enabled, 2: enabled on gpgpue engine with direct submission, 3: enabled on any direct submission, 4: enabled") +DECLARE_DEBUG_VARIABLE(int32_t, EnableTimestampWaitForQueues, -1, "Wait on queues using timestamps, -1: default(disabled), 0: disabled, 1: enabled where UpdateTaskCountFromWait enabled, 2: enabled on gpgpue engine with direct submission, 3: enabled on any direct submission, 4: enabled") +DECLARE_DEBUG_VARIABLE(int32_t, EnableTimestampWaitForEvents, -1, "Wait on events using timestamps, -1: default(disabled), 0: disabled, 1: enabled where UpdateTaskCountFromWait enabled, 2: enabled on gpgpue engine with direct submission, 3: enabled on any direct submission, 4: enabled") DECLARE_DEBUG_VARIABLE(int32_t, DeferOsContextInitialization, -1, "-1: default, 0: create all contexts immediately, 1: defer, if possible") DECLARE_DEBUG_VARIABLE(int32_t, UsmInitialPlacement, -1, "-1: default, 0: optimize for first CPU access, 1: optimize for first GPU access") DECLARE_DEBUG_VARIABLE(int32_t, ForceHostPointerImport, -1, "-1: default, 0: disable, 1: enable, Forces the driver to import every host pointer coming into driver, WARNING this is not spec complaint.") diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index f95e40d9c5..a25b92e4eb 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -63,7 +63,8 @@ class HwHelper { static bool compressedImagesSupported(const HardwareInfo &hwInfo); static bool cacheFlushAfterWalkerSupported(const HardwareInfo &hwInfo); virtual bool timestampPacketWriteSupported() const = 0; - virtual bool isTimestampWaitSupported() const = 0; + virtual bool isTimestampWaitSupportedForQueues() const = 0; + virtual bool isTimestampWaitSupportedForEvents() const = 0; virtual bool isUpdateTaskCountFromWaitSupported() const = 0; virtual size_t getRenderSurfaceStateSize() const = 0; virtual void setRenderSurfaceStateForBuffer(const RootDeviceEnvironment &rootDeviceEnvironment, @@ -248,7 +249,9 @@ class HwHelperHw : public HwHelper { bool timestampPacketWriteSupported() const override; - bool isTimestampWaitSupported() const override; + bool isTimestampWaitSupportedForQueues() const override; + + bool isTimestampWaitSupportedForEvents() const override; bool isUpdateTaskCountFromWaitSupported() const override; diff --git a/shared/source/helpers/hw_helper_bdw_and_later.inl b/shared/source/helpers/hw_helper_bdw_and_later.inl index 6ecd23300e..308bd1f72b 100644 --- a/shared/source/helpers/hw_helper_bdw_and_later.inl +++ b/shared/source/helpers/hw_helper_bdw_and_later.inl @@ -41,7 +41,12 @@ bool HwHelperHw::timestampPacketWriteSupported() const { } template -bool HwHelperHw::isTimestampWaitSupported() const { +bool HwHelperHw::isTimestampWaitSupportedForQueues() const { + return false; +} + +template +bool HwHelperHw::isTimestampWaitSupportedForEvents() const { return false; } diff --git a/shared/source/helpers/hw_helper_xehp_and_later.inl b/shared/source/helpers/hw_helper_xehp_and_later.inl index cc5f89c75c..e86245fdde 100644 --- a/shared/source/helpers/hw_helper_xehp_and_later.inl +++ b/shared/source/helpers/hw_helper_xehp_and_later.inl @@ -56,7 +56,12 @@ bool HwHelperHw::timestampPacketWriteSupported() const { } template -bool HwHelperHw::isTimestampWaitSupported() const { +bool HwHelperHw::isTimestampWaitSupportedForQueues() const { + return false; +} + +template +bool HwHelperHw::isTimestampWaitSupportedForEvents() const { return false; } diff --git a/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp b/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp index bd99fbbb4d..9283ea9f60 100644 --- a/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp @@ -446,7 +446,12 @@ size_t HwHelperHw::getSipKernelMaxDbgSurfaceSize(const HardwareInfo &hwI } template <> -bool HwHelperHw::isTimestampWaitSupported() const { +bool HwHelperHw::isTimestampWaitSupportedForQueues() const { + return true; +} + +template <> +bool HwHelperHw::isTimestampWaitSupportedForEvents() const { return true; } diff --git a/shared/source/xe_hpg_core/hw_helper_xe_hpg_core.cpp b/shared/source/xe_hpg_core/hw_helper_xe_hpg_core.cpp index 7cc164cef5..e68fd8a99e 100644 --- a/shared/source/xe_hpg_core/hw_helper_xe_hpg_core.cpp +++ b/shared/source/xe_hpg_core/hw_helper_xe_hpg_core.cpp @@ -130,6 +130,11 @@ inline bool HwHelperHw::isLinuxCompletionFenceSupported() const { return true; } +template <> +bool HwHelperHw::isTimestampWaitSupportedForEvents() const { + return true; +} + template class HwHelperHw; template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; diff --git a/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp b/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp index d267da5cc0..d285770613 100644 --- a/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp +++ b/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp @@ -61,7 +61,8 @@ XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenHwHelperWhenGettingIfRevisionSpeci XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenHwHelperWhenCheckTimestampWaitSupportThenReturnTrue) { auto &helper = HwHelper::get(renderCoreFamily); - EXPECT_TRUE(helper.isTimestampWaitSupported()); + EXPECT_TRUE(helper.isTimestampWaitSupportedForQueues()); + EXPECT_TRUE(helper.isTimestampWaitSupportedForEvents()); } XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenXeHPCPlatformWhenCheckAssignEngineRoundRobinSupportedThenReturnTrue) { diff --git a/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp index ac2fb83897..1243c01a3d 100644 --- a/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp @@ -127,9 +127,10 @@ XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenXeHPAndLaterPlatformWhenCheckAssig EXPECT_FALSE(hwHelper.isAssignEngineRoundRobinSupported()); } -XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenHwHelperWhenCheckTimestampWaitSupportThenReturnFalse) { +XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenHwHelperWhenCheckTimestampWaitSupportThenReturnFalseForQueuesButTrueForEvents) { auto &helper = HwHelper::get(renderCoreFamily); - EXPECT_FALSE(helper.isTimestampWaitSupported()); + EXPECT_FALSE(helper.isTimestampWaitSupportedForQueues()); + EXPECT_TRUE(helper.isTimestampWaitSupportedForEvents()); } XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenDisablePipeControlFlagIsEnabledWhenLocalMemoryIsEnabledThenReturnTrueAndProgramPipeControl) {