diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index 12f01ddb2e..6ba6ffc27f 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -304,7 +304,6 @@ DECLARE_DEBUG_VARIABLE(int32_t, EnableTimestampPoolAllocator, -1, "-1: default, DECLARE_DEBUG_VARIABLE(int32_t, ForceComputeWalkerPostSyncFlushWithWrite, -1, "-1: ignore. >=0: Force PostSync cache flush and override postSync immediate write address to given value") DECLARE_DEBUG_VARIABLE(int32_t, DeferStateInitSubmissionToFirstRegularUsage, -1, "-1: ignore, 0: disabled, 1: enabled. If set, instead of initializing at Device creation, submit initial state during first usage (eg. kernel submission)") DECLARE_DEBUG_VARIABLE(int32_t, ForceNonWalkerSplitMemoryCopy, -1, "-1: default, 0: disabled, 1: enabled. If set, memory copy will be executed as single byte copy Walker without performance optimizations") -DECLARE_DEBUG_VARIABLE(int32_t, OverrideTimestampWidth, -1, "-1: default from KMD, > 0: Override timestamp width used for profiling. Requires XeKMD kernel.") DECLARE_DEBUG_VARIABLE(int32_t, DebugUmdFifoPollInterval, -1, "-1: default , > 0: Fifo will be polled based on input in milliseconds.") DECLARE_DEBUG_VARIABLE(int32_t, SetMaxBVHLevels, -1, "-1: default , > 0: Set maxBVHLevel in RTDispatchGlobal.") DECLARE_DEBUG_VARIABLE(int32_t, DebugUmdInterruptTimeout, -1, "-1: default , > 0: interruptTimeout based on input in milliseconds. Default is 2000 milliseconds") diff --git a/shared/source/execution_environment/root_device_environment.cpp b/shared/source/execution_environment/root_device_environment.cpp index dfdfb67b87..f336fec9af 100644 --- a/shared/source/execution_environment/root_device_environment.cpp +++ b/shared/source/execution_environment/root_device_environment.cpp @@ -139,7 +139,6 @@ void RootDeviceEnvironment::initOsTime() { if (!osTime) { osTime = OSTime::create(osInterface.get()); osTime->setDeviceTimerResolution(); - osTime->setDeviceTimestampWidth(gfxCoreHelper->getDeviceTimestampWidth()); } } diff --git a/shared/source/helpers/gfx_core_helper.h b/shared/source/helpers/gfx_core_helper.h index acd61b83c2..72b4a0efe1 100644 --- a/shared/source/helpers/gfx_core_helper.h +++ b/shared/source/helpers/gfx_core_helper.h @@ -209,7 +209,6 @@ class GfxCoreHelper { virtual bool usmCompressionSupported(const NEO::HardwareInfo &hwInfo) const = 0; - virtual uint32_t getDeviceTimestampWidth() const = 0; virtual void alignThreadGroupCountToDssSize(uint32_t &threadCount, uint32_t dssCount, uint32_t threadsPerDss, uint32_t threadGroupSize) const = 0; virtual bool getSipBinaryFromExternalLib() const = 0; virtual uint32_t getImplicitArgsVersion() const = 0; @@ -470,7 +469,6 @@ class GfxCoreHelperHw : public GfxCoreHelper { bool usmCompressionSupported(const NEO::HardwareInfo &hwInfo) const override; - uint32_t getDeviceTimestampWidth() const override; uint32_t getImplicitArgsVersion() const override; bool getSipBinaryFromExternalLib() const override; diff --git a/shared/source/helpers/gfx_core_helper_base.inl b/shared/source/helpers/gfx_core_helper_base.inl index 7853548b99..15945e5fff 100644 --- a/shared/source/helpers/gfx_core_helper_base.inl +++ b/shared/source/helpers/gfx_core_helper_base.inl @@ -892,14 +892,6 @@ void GfxCoreHelperHw::alignThreadGroupCountToDssSize(uint32_t &thread threadCount = std::min(threadCount, availableTreadCount); } -template -uint32_t GfxCoreHelperHw::getDeviceTimestampWidth() const { - if (debugManager.flags.OverrideTimestampWidth.get() != -1) { - return debugManager.flags.OverrideTimestampWidth.get(); - } - return 0u; -} - template uint32_t GfxCoreHelperHw::getInternalCopyEngineIndex(const HardwareInfo &hwInfo) const { if (debugManager.flags.ForceBCSForInternalCopyEngine.get() != -1) { diff --git a/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp b/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp index 41b986a002..033034833e 100644 --- a/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp +++ b/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp @@ -504,9 +504,6 @@ bool IoctlHelperXe::setGpuCpuTimes(TimeStampData *pGpuCpuTime, OSTime *osTime) { ret = IoctlHelper::ioctl(DrmIoctl::query, &deviceQuery); auto nValidBits = queryEngineCycles->width; - if (osTime->getDeviceTimestampWidth() != 0) { - nValidBits = osTime->getDeviceTimestampWidth(); - } auto gpuTimestampValidBits = maxNBitValue(nValidBits); auto gpuCycles = queryEngineCycles->engine_cycles & gpuTimestampValidBits; diff --git a/shared/source/os_interface/os_time.h b/shared/source/os_interface/os_time.h index bae7e5d435..9a614a670a 100644 --- a/shared/source/os_interface/os_time.h +++ b/shared/source/os_interface/os_time.h @@ -94,14 +94,6 @@ class OSTime { deviceTime->setDeviceTimerResolution(); } - void setDeviceTimestampWidth(uint32_t timestampWidth) { - this->timestampWidth = timestampWidth; - } - - uint32_t getDeviceTimestampWidth() const { - return this->timestampWidth; - } - void setRefreshTimestampsFlag() const { deviceTime->setRefreshTimestampsFlag(); } @@ -115,6 +107,5 @@ class OSTime { OSInterface *osInterface = nullptr; std::unique_ptr deviceTime; uint64_t maxGpuTimeStamp = 0; - uint32_t timestampWidth = 0; }; } // namespace NEO diff --git a/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp b/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp index 8916627236..1b15fff0a3 100644 --- a/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp +++ b/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp @@ -283,14 +283,6 @@ uint32_t GfxCoreHelperHw::getMetricsLibraryGenId() const { return static_cast(MetricsLibraryApi::ClientGen::Xe2HPG); } -template <> -uint32_t GfxCoreHelperHw::getDeviceTimestampWidth() const { - if (debugManager.flags.OverrideTimestampWidth.get() != -1) { - return debugManager.flags.OverrideTimestampWidth.get(); - } - return 64u; -}; - template <> void MemorySynchronizationCommands::setStallingBarrier(void *commandsBuffer, PipeControlArgs &args) { using RESOURCE_BARRIER = typename Family::RESOURCE_BARRIER; diff --git a/shared/test/common/test_files/igdrcl.config b/shared/test/common/test_files/igdrcl.config index 910488c4d7..089b9df5b4 100644 --- a/shared/test/common/test_files/igdrcl.config +++ b/shared/test/common/test_files/igdrcl.config @@ -631,7 +631,6 @@ FinalizerLibraryName = unk EnableGlobalTimestampViaSubmission = -1 DirectSubmissionSwitchSemaphoreMode = -1 DisableProgrammableMetricsSupport = 0 -OverrideTimestampWidth = -1 IgnoreZebinUnknownAttributes = 0 DebugUmdFifoPollInterval = -1 MaxSubSlicesSupportedOverride = -1 diff --git a/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp b/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp index d85d236f94..5edd7a7e50 100644 --- a/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp +++ b/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp @@ -1894,16 +1894,6 @@ HWTEST2_F(GfxCoreHelperTest, GivenModifiedGtSystemInfoWhenCallingCalculateAvaila } } -HWTEST_F(GfxCoreHelperTest, givenGetDeviceTimestampWidthCalledThenReturnCorrectValue) { - DebugManagerStateRestore restore; - - auto &helper = getHelper(); - EXPECT_EQ(0u, helper.getDeviceTimestampWidth()); - - debugManager.flags.OverrideTimestampWidth.set(64); - EXPECT_EQ(64u, helper.getDeviceTimestampWidth()); -} - HWTEST_F(GfxCoreHelperTest, givenHwHelperWhenAligningThreadGroupCountToDssSizeThenThreadGroupCountChanged) { auto &helper = getHelper(); uint32_t threadGroupCountBefore = 4096; diff --git a/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp b/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp index b30d1ef83a..1242bb3287 100644 --- a/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp @@ -2003,36 +2003,6 @@ TEST_F(IoctlHelperXeTest, givenIoctlFailureWhenSetGpuCpuTimesIsCalledThenProperV EXPECT_EQ(pGpuCpuTime.cpuTimeinNS, expectedTimestamp); } -TEST_F(IoctlHelperXeTest, whenDeviceTimestampWidthSetThenProperValuesAreSet) { - DebugManagerStateRestore restorer; - auto executionEnvironment = std::make_unique(); - auto &rootDeviceEnvironment = *executionEnvironment->rootDeviceEnvironments[0]; - rootDeviceEnvironment.osInterface = std::make_unique(); - rootDeviceEnvironment.osInterface->setDriverModel(std::make_unique(mockFd, rootDeviceEnvironment)); - auto drm = DrmMockXe::create(rootDeviceEnvironment); - auto xeIoctlHelper = static_cast(drm->getIoctlHelper()); - xeIoctlHelper->initialize(); - auto engineInfo = xeIoctlHelper->createEngineInfo(false); - ASSERT_NE(nullptr, engineInfo); - - uint64_t expectedCycles = maxNBitValue(64); - auto xeQueryEngineCycles = reinterpret_cast(drm->queryEngineCycles); - xeQueryEngineCycles->width = 32; - xeQueryEngineCycles->engine_cycles = expectedCycles; - xeQueryEngineCycles->cpu_timestamp = 100; - - TimeStampData pGpuCpuTime{}; - std::unique_ptr osTime = MockOSTimeLinux::create(*rootDeviceEnvironment.osInterface); - auto ret = xeIoctlHelper->setGpuCpuTimes(&pGpuCpuTime, osTime.get()); - EXPECT_EQ(true, ret); - - EXPECT_EQ(pGpuCpuTime.gpuTimeStamp, expectedCycles & maxNBitValue(32)); - osTime->setDeviceTimestampWidth(64); - ret = xeIoctlHelper->setGpuCpuTimes(&pGpuCpuTime, osTime.get()); - EXPECT_EQ(true, ret); - EXPECT_EQ(pGpuCpuTime.gpuTimeStamp, expectedCycles); -} - TEST_F(IoctlHelperXeTest, whenSetDefaultEngineIsCalledThenProperEngineIsSet) { NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get(); auto executionEnvironment = std::make_unique(&hwInfo); diff --git a/shared/test/unit_test/xe2_hpg_core/bmg/gfx_core_helper_tests_bmg.cpp b/shared/test/unit_test/xe2_hpg_core/bmg/gfx_core_helper_tests_bmg.cpp index 0ff1060d62..47183ca6e3 100644 --- a/shared/test/unit_test/xe2_hpg_core/bmg/gfx_core_helper_tests_bmg.cpp +++ b/shared/test/unit_test/xe2_hpg_core/bmg/gfx_core_helper_tests_bmg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -44,14 +44,3 @@ BMGTEST_F(GfxCoreHelperTestsBmg, WhenAskingForDcFlushThenReturnFalse) { setUpImpl(); EXPECT_FALSE(MemorySynchronizationCommands::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment())); } - -BMGTEST_F(GfxCoreHelperTestsBmg, givenGetDeviceTimestampWidthCalledThenReturnCorrectValue) { - setUpImpl(); - DebugManagerStateRestore restore; - - auto &helper = this->pDevice->getGfxCoreHelper(); - EXPECT_EQ(64u, helper.getDeviceTimestampWidth()); - - debugManager.flags.OverrideTimestampWidth.set(36); - EXPECT_EQ(36u, helper.getDeviceTimestampWidth()); -} \ No newline at end of file diff --git a/shared/test/unit_test/xe2_hpg_core/excludes_xe2_hpg_core.cpp b/shared/test/unit_test/xe2_hpg_core/excludes_xe2_hpg_core.cpp index bee600f2fd..82d0957be0 100644 --- a/shared/test/unit_test/xe2_hpg_core/excludes_xe2_hpg_core.cpp +++ b/shared/test/unit_test/xe2_hpg_core/excludes_xe2_hpg_core.cpp @@ -35,4 +35,3 @@ HWTEST_EXCLUDE_PRODUCT(GmmCompressionTests, givenEnabledAndPreferredE2ECWhenAppl HWTEST_EXCLUDE_PRODUCT(CommandEncodeSemaphore, givenIndirectModeSetWhenProgrammingSemaphoreThenSetIndirectBit_IsAtLeastXeCore, IGFX_XE2_HPG_CORE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned, IGFX_XE2_HPG_CORE); HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, whenEncodeAdditionalTimestampOffsetsThenNothingEncoded, IGFX_XE2_HPG_CORE); -HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, givenGetDeviceTimestampWidthCalledThenReturnCorrectValue, IGFX_XE2_HPG_CORE); diff --git a/shared/test/unit_test/xe2_hpg_core/lnl/gfx_core_helper_tests_lnl.cpp b/shared/test/unit_test/xe2_hpg_core/lnl/gfx_core_helper_tests_lnl.cpp index 536436954a..e2a44ac1e9 100644 --- a/shared/test/unit_test/xe2_hpg_core/lnl/gfx_core_helper_tests_lnl.cpp +++ b/shared/test/unit_test/xe2_hpg_core/lnl/gfx_core_helper_tests_lnl.cpp @@ -9,7 +9,6 @@ #include "shared/source/os_interface/product_helper.h" #include "shared/source/xe2_hpg_core/hw_cmds_lnl.h" #include "shared/source/xe2_hpg_core/hw_info_lnl.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/helpers/gfx_core_helper_tests.h" #include "shared/test/common/mocks/mock_device.h" @@ -28,13 +27,3 @@ LNLTEST_F(GfxCoreHelperTestsLnl, givenCommandBufferAllocationTypeWhenGetAllocati EXPECT_TRUE(allocData.flags.useSystemMemory); } - -LNLTEST_F(GfxCoreHelperTestsLnl, givenGetDeviceTimestampWidthCalledThenReturnCorrectValue) { - DebugManagerStateRestore restore; - - auto &helper = this->pDevice->getGfxCoreHelper(); - EXPECT_EQ(64u, helper.getDeviceTimestampWidth()); - - debugManager.flags.OverrideTimestampWidth.set(36); - EXPECT_EQ(36u, helper.getDeviceTimestampWidth()); -} \ No newline at end of file