aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/grappler/costs/op_level_cost_estimator.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-07-21 14:07:14 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-21 14:11:06 -0700
commit74057361032bc4d9a9fbfced1f433b06c06c09ec (patch)
treebf6453e743bcd002619166a525bcf9907388b1e1 /tensorflow/core/grappler/costs/op_level_cost_estimator.h
parent51cbb58ca5147218b3995dc124bd92927d93e913 (diff)
Add option to use compute_memory_overlap; if true, use max of memory_cost and compute_cost, instead of sum for op level cost in analytical cost estimator.
PiperOrigin-RevId: 162782658
Diffstat (limited to 'tensorflow/core/grappler/costs/op_level_cost_estimator.h')
-rw-r--r--tensorflow/core/grappler/costs/op_level_cost_estimator.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/grappler/costs/op_level_cost_estimator.h b/tensorflow/core/grappler/costs/op_level_cost_estimator.h
index 59ced70ba6..36ef6a5c61 100644
--- a/tensorflow/core/grappler/costs/op_level_cost_estimator.h
+++ b/tensorflow/core/grappler/costs/op_level_cost_estimator.h
@@ -150,6 +150,9 @@ class OpLevelCostEstimator {
std::map<string, int> elementwise_ops_;
typedef std::function<Costs(const OpInfo& op_feature)> CostImpl;
std::map<string, CostImpl> device_cost_impl_;
+ // If true, assume compute and memory overlap; hence, the op cost is max of
+ // compute_time and memory_time, insteaf of sum of those two.
+ bool compute_memory_overlap_;
private:
friend class OpLevelCostEstimatorTest;