From da99ab57f76c0995cf9c412987d8ef68ca9e8e68 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 14 Mar 2017 11:36:09 -0800 Subject: [PATCH] [SE:Host] Temporarily revert the determination of host frequency. Need to investigate some fork/exec related bugs and this is not critical functionality. Change: 150099703 --- tensorflow/stream_executor/host/host_gpu_executor.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tensorflow/stream_executor/host/host_gpu_executor.cc b/tensorflow/stream_executor/host/host_gpu_executor.cc index 259bd102387..8dea3c47315 100644 --- a/tensorflow/stream_executor/host/host_gpu_executor.cc +++ b/tensorflow/stream_executor/host/host_gpu_executor.cc @@ -28,6 +28,8 @@ limitations under the License. namespace gpu = ::perftools::gputools; +bool FLAGS_stream_executor_cpu_real_clock_rate = false; + namespace perftools { namespace gputools { namespace host { @@ -191,10 +193,12 @@ DeviceDescription *HostExecutor::PopulateDeviceDescription() const { // doesn't result in thrashing or other badness? 4GiB chosen arbitrarily. builder.set_device_memory_size(static_cast(4) * 1024 * 1024 * 1024); - builder.set_clock_rate_ghz( - static_cast( - tensorflow::profile_utils::CpuUtils::GetCycleCounterFrequency()) / - 1e9); + float cycle_counter_frequency = 1e9; + if (FLAGS_stream_executor_cpu_real_clock_rate) { + cycle_counter_frequency = static_cast( + tensorflow::profile_utils::CpuUtils::GetCycleCounterFrequency()); + } + builder.set_clock_rate_ghz(cycle_counter_frequency / 1e9); auto built = builder.Build(); return built.release(); -- GitLab