diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-08-02 13:07:52 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-02 13:11:32 -0700 |
commit | bcb5a132684424ff678e9d64fc291f49ce7fcc4c (patch) | |
tree | f3666b8fa6ec1a0f24089f67b113283db8fce5e4 | |
parent | de4c12857782f65dc4a941776d506ecac50a5934 (diff) |
Explicitly cast the types of a few variables in VLOG statements to avoid an issue where the compiler isn't sure of the type when building for arm64 computers.
PiperOrigin-RevId: 207151595
-rw-r--r-- | tensorflow/core/grappler/costs/virtual_scheduler.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tensorflow/core/grappler/costs/virtual_scheduler.cc b/tensorflow/core/grappler/costs/virtual_scheduler.cc index 6a1b0aebfa..34fe2c75ef 100644 --- a/tensorflow/core/grappler/costs/virtual_scheduler.cc +++ b/tensorflow/core/grappler/costs/virtual_scheduler.cc @@ -859,9 +859,10 @@ Costs VirtualScheduler::Summary() const { const auto& memory_cost = op_cost_pair.second.memory_time.count(); const bool is_op_cost_accurate = !op_cost_pair.second.inaccurate; if (cost) { // Skip printing out zero-cost ops. - VLOG(1) << strings::Printf(" + %30s : %c %10ld / %10ld / %10ld", - op.c_str(), (is_op_cost_accurate ? ' ' : '~'), - cost, compute_cost, memory_cost); + VLOG(1) << strings::Printf( + " + %30s : %c %10lld / %10lld / %10lld", op.c_str(), + (is_op_cost_accurate ? ' ' : '~'), static_cast<int64>(cost), + static_cast<int64>(compute_cost), static_cast<int64>(memory_cost)); } } @@ -936,10 +937,12 @@ Costs VirtualScheduler::Summary() const { : 0.0; if (cost || mem_usage_percent > 1.0) { // Print out only non-zero cost ops or ops with > 1% memory usage. - VLOG(1) << strings::Printf(" + %30s : %c %10ld / %10ld / %10ld", + VLOG(1) << strings::Printf(" + %30s : %c %10lld / %10lld / %10lld", op.c_str(), - (is_op_cost_accurate ? ' ' : '~'), cost, - compute_cost, memory_cost) + (is_op_cost_accurate ? ' ' : '~'), + static_cast<int64>(cost), + static_cast<int64>(compute_cost), + static_cast<int64>(memory_cost)) << " (" << strings::HumanReadableNumBytes(op_mem_usage) << " [" << mem_usage_percent << "%] " << (persisent_ops.count(op) > 0 ? ": persistent op)" : ")"); |