aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/host
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-03-14 11:36:09 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-03-14 12:48:23 -0700
commitda99ab57f76c0995cf9c412987d8ef68ca9e8e68 (patch)
tree53f961b60e5787165b8f7beab716f9cbcdb7fb82 /tensorflow/stream_executor/host
parent0a374c7182fb8f0970f3dbf13db9e6f8c5464c00 (diff)
[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
Diffstat (limited to 'tensorflow/stream_executor/host')
-rw-r--r--tensorflow/stream_executor/host/host_gpu_executor.cc12
1 files 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 259bd10238..8dea3c4731 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<uint64>(4) * 1024 * 1024 * 1024);
- builder.set_clock_rate_ghz(
- static_cast<float>(
- tensorflow::profile_utils::CpuUtils::GetCycleCounterFrequency()) /
- 1e9);
+ 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();
return built.release();