aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/benchmark
diff options
context:
space:
mode:
authorGravatar Andrew Harp <andrewharp@google.com>2017-01-10 15:41:24 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-01-10 16:10:08 -0800
commitcd826f76e7d9c1f0248be59517bc18d105fdd535 (patch)
tree4303861ffac2176f602113d68e64163a7fcc5cbb /tensorflow/tools/benchmark
parent15941d284db7c2747a2767d57c71b3768650c784 (diff)
Remove std:: from std::round() calls in benchmark_model.cc to avoid issue in Android ndk where std::round is not found: https://code.google.com/p/android/issues/detail?id=54418
Change: 144137666
Diffstat (limited to 'tensorflow/tools/benchmark')
-rw-r--r--tensorflow/tools/benchmark/benchmark_model.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/tools/benchmark/benchmark_model.cc b/tensorflow/tools/benchmark/benchmark_model.cc
index 332782d710..86416db953 100644
--- a/tensorflow/tools/benchmark/benchmark_model.cc
+++ b/tensorflow/tools/benchmark/benchmark_model.cc
@@ -430,11 +430,11 @@ int Main(int argc, char** argv) {
const float rounded_flops = (total_flops / 1000.0f);
pretty_flops = strings::StrCat(rounded_flops, "k FLOPs");
} else if (total_flops < (1000 * 1000 * 1000)) {
- const float rounded_flops = (std::round(total_flops / 1000.0f) / 1000.0f);
+ const float rounded_flops = round(total_flops / 1000.0f) / 1000.0f;
pretty_flops = strings::StrCat(rounded_flops, " million FLOPs");
} else {
const float rounded_flops =
- (std::round(total_flops / (1000.0f * 1000.0f)) / 1000.0f);
+ round(total_flops / (1000.0f * 1000.0f)) / 1000.0f;
pretty_flops = strings::StrCat(rounded_flops, " billion FLOPs");
}
LOG(INFO) << "FLOPs estimate: " << strings::HumanReadableNum(total_flops);