aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/grappler/costs/op_level_cost_estimator.cc
diff options
context:
space:
mode:
authorGravatar Max Galkin <maxgalkin@google.com>2018-02-05 15:10:44 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-05 15:15:04 -0800
commit1b19bc9edcd993e19e01cd935e9787e1672c4391 (patch)
treea066e927204d8c81329e48e0f3e7ae956e04bfa9 /tensorflow/core/grappler/costs/op_level_cost_estimator.cc
parent85344e3366e440ecdb160b9bb3be71212f19bacd (diff)
Add logging to diagnose device properties parsing problem in Grappler.
PiperOrigin-RevId: 184594084
Diffstat (limited to 'tensorflow/core/grappler/costs/op_level_cost_estimator.cc')
-rw-r--r--tensorflow/core/grappler/costs/op_level_cost_estimator.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/core/grappler/costs/op_level_cost_estimator.cc b/tensorflow/core/grappler/costs/op_level_cost_estimator.cc
index 5600267f6a..1af973855e 100644
--- a/tensorflow/core/grappler/costs/op_level_cost_estimator.cc
+++ b/tensorflow/core/grappler/costs/op_level_cost_estimator.cc
@@ -411,6 +411,11 @@ Costs OpLevelCostEstimator::PredictCostOfAnUnknownOp(
Costs OpLevelCostEstimator::PredictOpCountBasedCost(
double operations, const OpInfo& op_features) const {
DeviceInfo device_perf = GetDeviceInfo(op_features.device());
+ if (device_perf.gigaops <= 0 || device_perf.gb_per_sec <= 0) {
+ VLOG(1) << "BAD DEVICE. Op:" << op_features.op()
+ << " device type:" << op_features.device().type()
+ << " device model:" << op_features.device().model();
+ }
Costs::NanoSeconds compute_cost(std::ceil(operations / device_perf.gigaops));
VLOG(1) << "Op:" << op_features.op() << " GOps:" << operations / 1e9