Skip to content

Commit af6ac59

Browse files
Revert "fix: Override timestamp width from KMD"
This reverts commit 7f2b806. Signed-off-by: Szymon Morek <szymon.morek@intel.com>
1 parent 4010ff6 commit af6ac59

File tree

13 files changed

+1
-97
lines changed

13 files changed

+1
-97
lines changed

shared/source/debug_settings/debug_variables_base.inl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ DECLARE_DEBUG_VARIABLE(int32_t, EnableTimestampPoolAllocator, -1, "-1: default,
304304
DECLARE_DEBUG_VARIABLE(int32_t, ForceComputeWalkerPostSyncFlushWithWrite, -1, "-1: ignore. >=0: Force PostSync cache flush and override postSync immediate write address to given value")
305305
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)")
306306
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")
307-
DECLARE_DEBUG_VARIABLE(int32_t, OverrideTimestampWidth, -1, "-1: default from KMD, > 0: Override timestamp width used for profiling. Requires XeKMD kernel.")
308307
DECLARE_DEBUG_VARIABLE(int32_t, DebugUmdFifoPollInterval, -1, "-1: default , > 0: Fifo will be polled based on input in milliseconds.")
309308
DECLARE_DEBUG_VARIABLE(int32_t, SetMaxBVHLevels, -1, "-1: default , > 0: Set maxBVHLevel in RTDispatchGlobal.")
310309
DECLARE_DEBUG_VARIABLE(int32_t, DebugUmdInterruptTimeout, -1, "-1: default , > 0: interruptTimeout based on input in milliseconds. Default is 2000 milliseconds")

shared/source/execution_environment/root_device_environment.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ void RootDeviceEnvironment::initOsTime() {
139139
if (!osTime) {
140140
osTime = OSTime::create(osInterface.get());
141141
osTime->setDeviceTimerResolution();
142-
osTime->setDeviceTimestampWidth(gfxCoreHelper->getDeviceTimestampWidth());
143142
}
144143
}
145144

shared/source/helpers/gfx_core_helper.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ class GfxCoreHelper {
209209

210210
virtual bool usmCompressionSupported(const NEO::HardwareInfo &hwInfo) const = 0;
211211

212-
virtual uint32_t getDeviceTimestampWidth() const = 0;
213212
virtual void alignThreadGroupCountToDssSize(uint32_t &threadCount, uint32_t dssCount, uint32_t threadsPerDss, uint32_t threadGroupSize) const = 0;
214213
virtual bool getSipBinaryFromExternalLib() const = 0;
215214
virtual uint32_t getImplicitArgsVersion() const = 0;
@@ -470,7 +469,6 @@ class GfxCoreHelperHw : public GfxCoreHelper {
470469

471470
bool usmCompressionSupported(const NEO::HardwareInfo &hwInfo) const override;
472471

473-
uint32_t getDeviceTimestampWidth() const override;
474472
uint32_t getImplicitArgsVersion() const override;
475473

476474
bool getSipBinaryFromExternalLib() const override;

shared/source/helpers/gfx_core_helper_base.inl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -892,14 +892,6 @@ void GfxCoreHelperHw<GfxFamily>::alignThreadGroupCountToDssSize(uint32_t &thread
892892
threadCount = std::min(threadCount, availableTreadCount);
893893
}
894894

895-
template <typename GfxFamily>
896-
uint32_t GfxCoreHelperHw<GfxFamily>::getDeviceTimestampWidth() const {
897-
if (debugManager.flags.OverrideTimestampWidth.get() != -1) {
898-
return debugManager.flags.OverrideTimestampWidth.get();
899-
}
900-
return 0u;
901-
}
902-
903895
template <typename Family>
904896
uint32_t GfxCoreHelperHw<Family>::getInternalCopyEngineIndex(const HardwareInfo &hwInfo) const {
905897
if (debugManager.flags.ForceBCSForInternalCopyEngine.get() != -1) {

shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,6 @@ bool IoctlHelperXe::setGpuCpuTimes(TimeStampData *pGpuCpuTime, OSTime *osTime) {
504504
ret = IoctlHelper::ioctl(DrmIoctl::query, &deviceQuery);
505505

506506
auto nValidBits = queryEngineCycles->width;
507-
if (osTime->getDeviceTimestampWidth() != 0) {
508-
nValidBits = osTime->getDeviceTimestampWidth();
509-
}
510507
auto gpuTimestampValidBits = maxNBitValue(nValidBits);
511508
auto gpuCycles = queryEngineCycles->engine_cycles & gpuTimestampValidBits;
512509

shared/source/os_interface/os_time.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,6 @@ class OSTime {
9494
deviceTime->setDeviceTimerResolution();
9595
}
9696

97-
void setDeviceTimestampWidth(uint32_t timestampWidth) {
98-
this->timestampWidth = timestampWidth;
99-
}
100-
101-
uint32_t getDeviceTimestampWidth() const {
102-
return this->timestampWidth;
103-
}
104-
10597
void setRefreshTimestampsFlag() const {
10698
deviceTime->setRefreshTimestampsFlag();
10799
}
@@ -115,6 +107,5 @@ class OSTime {
115107
OSInterface *osInterface = nullptr;
116108
std::unique_ptr<DeviceTime> deviceTime;
117109
uint64_t maxGpuTimeStamp = 0;
118-
uint32_t timestampWidth = 0;
119110
};
120111
} // namespace NEO

shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,6 @@ uint32_t GfxCoreHelperHw<Family>::getMetricsLibraryGenId() const {
283283
return static_cast<uint32_t>(MetricsLibraryApi::ClientGen::Xe2HPG);
284284
}
285285

286-
template <>
287-
uint32_t GfxCoreHelperHw<Family>::getDeviceTimestampWidth() const {
288-
if (debugManager.flags.OverrideTimestampWidth.get() != -1) {
289-
return debugManager.flags.OverrideTimestampWidth.get();
290-
}
291-
return 64u;
292-
};
293-
294286
template <>
295287
void MemorySynchronizationCommands<Family>::setStallingBarrier(void *commandsBuffer, PipeControlArgs &args) {
296288
using RESOURCE_BARRIER = typename Family::RESOURCE_BARRIER;

shared/test/common/test_files/igdrcl.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,6 @@ FinalizerLibraryName = unk
631631
EnableGlobalTimestampViaSubmission = -1
632632
DirectSubmissionSwitchSemaphoreMode = -1
633633
DisableProgrammableMetricsSupport = 0
634-
OverrideTimestampWidth = -1
635634
IgnoreZebinUnknownAttributes = 0
636635
DebugUmdFifoPollInterval = -1
637636
MaxSubSlicesSupportedOverride = -1

shared/test/unit_test/helpers/gfx_core_helper_tests.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,16 +1894,6 @@ HWTEST2_F(GfxCoreHelperTest, GivenModifiedGtSystemInfoWhenCallingCalculateAvaila
18941894
}
18951895
}
18961896

1897-
HWTEST_F(GfxCoreHelperTest, givenGetDeviceTimestampWidthCalledThenReturnCorrectValue) {
1898-
DebugManagerStateRestore restore;
1899-
1900-
auto &helper = getHelper<GfxCoreHelper>();
1901-
EXPECT_EQ(0u, helper.getDeviceTimestampWidth());
1902-
1903-
debugManager.flags.OverrideTimestampWidth.set(64);
1904-
EXPECT_EQ(64u, helper.getDeviceTimestampWidth());
1905-
}
1906-
19071897
HWTEST_F(GfxCoreHelperTest, givenHwHelperWhenAligningThreadGroupCountToDssSizeThenThreadGroupCountChanged) {
19081898
auto &helper = getHelper<GfxCoreHelper>();
19091899
uint32_t threadGroupCountBefore = 4096;

shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,36 +2003,6 @@ TEST_F(IoctlHelperXeTest, givenIoctlFailureWhenSetGpuCpuTimesIsCalledThenProperV
20032003
EXPECT_EQ(pGpuCpuTime.cpuTimeinNS, expectedTimestamp);
20042004
}
20052005

2006-
TEST_F(IoctlHelperXeTest, whenDeviceTimestampWidthSetThenProperValuesAreSet) {
2007-
DebugManagerStateRestore restorer;
2008-
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
2009-
auto &rootDeviceEnvironment = *executionEnvironment->rootDeviceEnvironments[0];
2010-
rootDeviceEnvironment.osInterface = std::make_unique<OSInterface>();
2011-
rootDeviceEnvironment.osInterface->setDriverModel(std::make_unique<DrmMockTime>(mockFd, rootDeviceEnvironment));
2012-
auto drm = DrmMockXe::create(rootDeviceEnvironment);
2013-
auto xeIoctlHelper = static_cast<MockIoctlHelperXe *>(drm->getIoctlHelper());
2014-
xeIoctlHelper->initialize();
2015-
auto engineInfo = xeIoctlHelper->createEngineInfo(false);
2016-
ASSERT_NE(nullptr, engineInfo);
2017-
2018-
uint64_t expectedCycles = maxNBitValue(64);
2019-
auto xeQueryEngineCycles = reinterpret_cast<drm_xe_query_engine_cycles *>(drm->queryEngineCycles);
2020-
xeQueryEngineCycles->width = 32;
2021-
xeQueryEngineCycles->engine_cycles = expectedCycles;
2022-
xeQueryEngineCycles->cpu_timestamp = 100;
2023-
2024-
TimeStampData pGpuCpuTime{};
2025-
std::unique_ptr<MockOSTimeLinux> osTime = MockOSTimeLinux::create(*rootDeviceEnvironment.osInterface);
2026-
auto ret = xeIoctlHelper->setGpuCpuTimes(&pGpuCpuTime, osTime.get());
2027-
EXPECT_EQ(true, ret);
2028-
2029-
EXPECT_EQ(pGpuCpuTime.gpuTimeStamp, expectedCycles & maxNBitValue(32));
2030-
osTime->setDeviceTimestampWidth(64);
2031-
ret = xeIoctlHelper->setGpuCpuTimes(&pGpuCpuTime, osTime.get());
2032-
EXPECT_EQ(true, ret);
2033-
EXPECT_EQ(pGpuCpuTime.gpuTimeStamp, expectedCycles);
2034-
}
2035-
20362006
TEST_F(IoctlHelperXeTest, whenSetDefaultEngineIsCalledThenProperEngineIsSet) {
20372007
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get();
20382008
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>(&hwInfo);

0 commit comments

Comments
 (0)