aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/grappler/costs/cost_estimator.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <bsteiner@google.com>2018-01-26 13:23:02 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-26 13:28:48 -0800
commit079a0e53311b4cf913be5ec5bd26bbb2b0649e93 (patch)
tree0a357c90e4e9f75173c371687b26ce7351010845 /tensorflow/core/grappler/costs/cost_estimator.h
parentd1910fa9eb274717719c4dcff3247498ea30caa4 (diff)
Improved heuristics for swapping
PiperOrigin-RevId: 183435438
Diffstat (limited to 'tensorflow/core/grappler/costs/cost_estimator.h')
-rw-r--r--tensorflow/core/grappler/costs/cost_estimator.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/grappler/costs/cost_estimator.h b/tensorflow/core/grappler/costs/cost_estimator.h
index b7eaf8dc63..d442861339 100644
--- a/tensorflow/core/grappler/costs/cost_estimator.h
+++ b/tensorflow/core/grappler/costs/cost_estimator.h
@@ -78,6 +78,9 @@ struct Costs {
MilliSeconds asMilliSeconds() const {
return std::chrono::duration_cast<std::chrono::milliseconds>(*this);
}
+ static NanoSeconds infinity() {
+ return NanoSeconds(std::chrono::nanoseconds::max());
+ }
};
// We store all our times in nanoseconds. If needs be, we can always switch to