aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_rematerialization.cc
diff options
context:
space:
mode:
authorGravatar Mark Heffernan <meheff@google.com>2017-02-14 21:44:13 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-02-14 22:10:30 -0800
commit484642aede3ff42f8525b40d5a58790a1cb629be (patch)
tree75f04eb82c6bd273129087210e8a31cea5826011 /tensorflow/compiler/xla/service/hlo_rematerialization.cc
parent872a4200f33c1645f7989b699da754c45c3e83f7 (diff)
[XLA] Make rematerialization failure non-fatal.
Change failure to meet memory limit during rematerialization from a fatal error to a WARNING message. Rematerialization only estimates runtime memory usage and the estimate is not even a bound (lower or upper). Change: 147559827
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_rematerialization.cc')
-rw-r--r--tensorflow/compiler/xla/service/hlo_rematerialization.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_rematerialization.cc b/tensorflow/compiler/xla/service/hlo_rematerialization.cc
index 915dd4af24..6aaebc0708 100644
--- a/tensorflow/compiler/xla/service/hlo_rematerialization.cc
+++ b/tensorflow/compiler/xla/service/hlo_rematerialization.cc
@@ -455,13 +455,10 @@ StatusOr<bool> HloRematerialization::RematerializeComputation(
VLOG(3) << "max memory usage = " << max_usage;
}
- if (max_usage > memory_limit_bytes_) {
- return ResourceExhausted(
- "Can't reduce memory use below %s by rematerialization (only "
- "reduced to %s)",
- HumanReadableNumBytes(memory_limit_bytes_).c_str(),
- HumanReadableNumBytes(max_usage).c_str());
- }
+ LOG(WARNING) << "Can't reduce memory use below "
+ << HumanReadableNumBytes(memory_limit_bytes_)
+ << " by rematerialization (only reduced to "
+ << HumanReadableNumBytes(max_usage) << ")";
// Verify that there are no more remaining uses.
for (auto instruction_uses : remaining_uses) {