From 1b19bc9edcd993e19e01cd935e9787e1672c4391 Mon Sep 17 00:00:00 2001 From: Max Galkin Date: Mon, 5 Feb 2018 15:10:44 -0800 Subject: [PATCH] Add logging to diagnose device properties parsing problem in Grappler. PiperOrigin-RevId: 184594084 --- tensorflow/core/grappler/costs/op_level_cost_estimator.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tensorflow/core/grappler/costs/op_level_cost_estimator.cc b/tensorflow/core/grappler/costs/op_level_cost_estimator.cc index 5600267..1af9738 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 -- 2.7.4