diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-06-27 16:45:51 -0700 |
---|---|---|
committer | Gunhan Gulsoy <gunan@google.com> | 2018-06-28 21:37:43 -0700 |
commit | a13b12d7a76e1b9426d5fc2e4ed03ec8288e0364 (patch) | |
tree | 126d8fb64fe66535819da27ea85dcd6f4489fd90 /tensorflow/stream_executor/host/host_gpu_executor.cc | |
parent | 23858d2a08ec1995d9cc407514311d25d0647567 (diff) |
Automated g4 rollback of changelist 202347723
PiperOrigin-RevId: 202392792
Diffstat (limited to 'tensorflow/stream_executor/host/host_gpu_executor.cc')
-rw-r--r-- | tensorflow/stream_executor/host/host_gpu_executor.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tensorflow/stream_executor/host/host_gpu_executor.cc b/tensorflow/stream_executor/host/host_gpu_executor.cc index 8adf739b17..c8a6297330 100644 --- a/tensorflow/stream_executor/host/host_gpu_executor.cc +++ b/tensorflow/stream_executor/host/host_gpu_executor.cc @@ -26,6 +26,8 @@ limitations under the License. #include "tensorflow/stream_executor/lib/statusor.h" #include "tensorflow/stream_executor/plugin_registry.h" +bool FLAGS_stream_executor_cpu_real_clock_rate = false; + namespace stream_executor { namespace host { @@ -188,8 +190,11 @@ DeviceDescription *HostExecutor::PopulateDeviceDescription() const { // doesn't result in thrashing or other badness? 4GiB chosen arbitrarily. builder.set_device_memory_size(static_cast<uint64>(4) * 1024 * 1024 * 1024); - float cycle_counter_frequency = static_cast<float>( - tensorflow::profile_utils::CpuUtils::GetCycleCounterFrequency()); + float cycle_counter_frequency = 1e9; + if (FLAGS_stream_executor_cpu_real_clock_rate) { + cycle_counter_frequency = static_cast<float>( + tensorflow::profile_utils::CpuUtils::GetCycleCounterFrequency()); + } builder.set_clock_rate_ghz(cycle_counter_frequency / 1e9); auto built = builder.Build(); |