提交 da99ab57 编写于 作者: A A. Unique TensorFlower 提交者: TensorFlower Gardener

[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
上级 0a374c71
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册