aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/stream_executor')
-rw-r--r--tensorflow/stream_executor/host/host_gpu_executor.cc9
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();