diff --git a/opencl/test/unit_test/command_queue/enqueue_command_without_kernel_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_command_without_kernel_tests.cpp index cf2a325a24..b874c8c6a5 100644 --- a/opencl/test/unit_test/command_queue/enqueue_command_without_kernel_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_command_without_kernel_tests.cpp @@ -80,6 +80,8 @@ struct EnqueueHandlerTimestampTest : public EnqueueHandlerTest { using EnqueueHandlerTimestampEnabledTest = EnqueueHandlerTimestampTest; HWTEST_F(EnqueueHandlerTimestampEnabledTest, givenProflingAndTimeStampPacketsEnabledWhenEnqueueCommandWithoutKernelThenSubmitTimeStampIsSet) { + DebugManagerStateRestore dbgRestore; + DebugManager.flags.EnableDeviceBasedTimestamps.set(1); cl_queue_properties properties[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_PROFILING_ENABLE, 0}; std::unique_ptr> mockCmdQ(new MockCommandQueueHw(context, pClDevice, properties)); @@ -118,6 +120,8 @@ HWTEST_F(EnqueueHandlerTimestampEnabledTest, givenProflingAndTimeStampPacketsEna using EnqueueHandlerTimestampDisabledTest = EnqueueHandlerTimestampTest; HWTEST_F(EnqueueHandlerTimestampDisabledTest, givenProflingEnabledTimeStampPacketsDisabledWhenEnqueueCommandWithoutKernelThenSubmitTimeStampIsSet) { + DebugManagerStateRestore dbgRestore; + DebugManager.flags.EnableDeviceBasedTimestamps.set(1); cl_queue_properties properties[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_PROFILING_ENABLE, 0}; std::unique_ptr> mockCmdQ(new MockCommandQueueHw(context, pClDevice, properties)); @@ -540,4 +544,4 @@ HWTEST_F(EnqueueHandlerMultiRootSync, givenOutEventInMultiRootContextWhenEnqueue clReleaseEvent(clEvent); } -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/opencl/test/unit_test/device/device_timers_tests.cpp b/opencl/test/unit_test/device/device_timers_tests.cpp index 1024ff0d93..2b05cd557b 100644 --- a/opencl/test/unit_test/device/device_timers_tests.cpp +++ b/opencl/test/unit_test/device/device_timers_tests.cpp @@ -133,6 +133,8 @@ TEST(MockOSTime, givenDeviceTimestampBaseNotEnabledWhenGetDeviceAndHostTimerThen } TEST(MockOSTime, givenDeviceTimestampBaseEnabledWhenGetDeviceAndHostTimerThenGpuTimestampIsReturned) { + DebugManagerStateRestore dbgRestore; + DebugManager.flags.EnableDeviceBasedTimestamps.set(1); auto mockDevice = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); mockDevice->setOSTime(new MockOSTimeWithConstTimestamp()); diff --git a/opencl/test/unit_test/event/event_tests.cpp b/opencl/test/unit_test/event/event_tests.cpp index b2a9d1c6c9..427d809e99 100644 --- a/opencl/test/unit_test/event/event_tests.cpp +++ b/opencl/test/unit_test/event/event_tests.cpp @@ -841,6 +841,8 @@ TEST_F(InternalsEventTest, givenDeviceTimestampBaseNotEnabledWhenCalculateStartT } TEST_F(InternalsEventTest, givenDeviceTimestampBaseEnabledWhenGetEventProfilingInfoThenGpuTimestampIsReturned) { + DebugManagerStateRestore dbgRestore; + DebugManager.flags.EnableDeviceBasedTimestamps.set(1); pClDevice->setOSTime(new MockOSTimeWithConstTimestamp()); const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_PROFILING_ENABLE, 0}; MockCommandQueue cmdQ(mockContext, pClDevice, props, false); @@ -857,6 +859,8 @@ TEST_F(InternalsEventTest, givenDeviceTimestampBaseEnabledWhenGetEventProfilingI } TEST_F(InternalsEventTest, givenDeviceTimestampBaseEnabledWhenCalculateStartTimestampThenCorrectTimeIsReturned) { + DebugManagerStateRestore dbgRestore; + DebugManager.flags.EnableDeviceBasedTimestamps.set(1); const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_PROFILING_ENABLE, 0}; MockCommandQueue cmdQ(mockContext, pClDevice, props, false); MockEvent event(&cmdQ, CL_COMPLETE, 0, 0); @@ -878,6 +882,8 @@ TEST_F(InternalsEventTest, givenDeviceTimestampBaseEnabledWhenCalculateStartTime } TEST_F(InternalsEventTest, givenDeviceTimestampBaseEnabledAndGlobalStartTSSmallerThanQueueTSWhenCalculateStartTimestampThenCorrectTimeIsReturned) { + DebugManagerStateRestore dbgRestore; + DebugManager.flags.EnableDeviceBasedTimestamps.set(1); const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_PROFILING_ENABLE, 0}; MockCommandQueue cmdQ(mockContext, pClDevice, props, false); MockEvent event(&cmdQ, CL_COMPLETE, 0, 0); @@ -1937,4 +1943,4 @@ TEST(MultiRootEvent, givenEventWithTagWhenEventGetsNewTagThenNewTagContainerIsNo EXPECT_NE(containerPtr, nullptr); event.getMultiRootTimestampSyncNode(); EXPECT_EQ(containerPtr, event.getMultiRootDeviceTimestampPacketNodes()); -} \ No newline at end of file +} diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index 7533b80b0a..5be552f8bb 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -502,7 +502,7 @@ DECLARE_DEBUG_VARIABLE(bool, ExperimentalEnableTileAttach, true, "Experimentally /*DRIVER TOGGLES*/ DECLARE_DEBUG_VARIABLE(bool, UseMaxSimdSizeToDeduceMaxWorkgroupSize, false, "With this flag on, max workgroup size is deduced using SIMD32 instead of SIMD8, this causes the max wkg size to be 4 times bigger") DECLARE_DEBUG_VARIABLE(bool, ReturnRawGpuTimestamps, false, "Driver returns raw GPU timestamps instead of calculated ones.") -DECLARE_DEBUG_VARIABLE(bool, EnableDeviceBasedTimestamps, true, "Driver returns timestamps in nanoseconds based on device timer.") +DECLARE_DEBUG_VARIABLE(bool, EnableDeviceBasedTimestamps, false, "Driver returns timestamps in nanoseconds based on device timer.") DECLARE_DEBUG_VARIABLE(bool, UseCommandBufferHeaderSizeForWddmQueueSubmission, true, "0: Page size (4096), 1: sizeof(COMMAND_BUFFER_HEADER)") DECLARE_DEBUG_VARIABLE(bool, DisableDeepBind, false, "Disable passing RTLD_DEEPBIND flag to all dlopen calls.") DECLARE_DEBUG_VARIABLE(bool, UseUmKmDataTranslator, false, "Use helper library for UMD<->KMD (WDDM) struct layout compatibility") diff --git a/shared/test/common/test_files/igdrcl.config b/shared/test/common/test_files/igdrcl.config index c5cb9cd0af..9bc6827afb 100644 --- a/shared/test/common/test_files/igdrcl.config +++ b/shared/test/common/test_files/igdrcl.config @@ -203,7 +203,7 @@ EnableTimestampPacket = -1 AllocateSharedAllocationsWithCpuAndGpuStorage = -1 UseMaxSimdSizeToDeduceMaxWorkgroupSize = 0 ReturnRawGpuTimestamps = 0 -EnableDeviceBasedTimestamps = 1 +EnableDeviceBasedTimestamps = 0 MaxHwThreadsPercent = 0 MinHwThreadsUnoccupied = 0 LimitBlitterMaxWidth = -1