aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tensorflow/compiler/xla/service/hlo_rematerialization.cc11
-rw-r--r--tensorflow/compiler/xla/service/hlo_rematerialization.h7
2 files changed, 7 insertions, 11 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) {
diff --git a/tensorflow/compiler/xla/service/hlo_rematerialization.h b/tensorflow/compiler/xla/service/hlo_rematerialization.h
index d684e963ea..580a805ef0 100644
--- a/tensorflow/compiler/xla/service/hlo_rematerialization.h
+++ b/tensorflow/compiler/xla/service/hlo_rematerialization.h
@@ -44,10 +44,9 @@ class HloRematerialization {
// rematerialization. This is the order in which HLO instructions should
// be emitted to minimize memory use.
//
- // Returns whether any instructions were rematerialized. If memory use cannot
- // be reduced to the given limit then a ResourceExhausted error is
- // returned. If memory use is already below the given limit then no
- // instructions are rematerialized and false is returned.
+ // Returns whether any instructions were rematerialized. If memory use is
+ // already below the given limit then no instructions are rematerialized and
+ // false is returned.
//
// CSE will undo the effects of this optimization and should not be run after
// this pass. In general, this pass should be run very late immediately before