diff options
author | Mark Heffernan <meheff@google.com> | 2017-01-19 10:31:30 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-01-19 10:45:19 -0800 |
commit | 6149fc54f4567cb00619fe085a691e3513343faf (patch) | |
tree | 3717073e5533e99e4b9bca674a36c170b9f3e3f9 /tensorflow/compiler/xla/service/reshape_mover.cc | |
parent | 6bbd60ca09e95dcd18e1a0d129c62ece1ab3b396 (diff) |
Don't remove send, recv, or trace instructions in DCE pass. Also,
opportunistically change HloComputation::Remove*,
HloComputation::Replace*, and HloInstruction::Replace* to return Status.
An error Status is returned if one of those instruction types (send, etc)
is removed.
Change: 144978731
Diffstat (limited to 'tensorflow/compiler/xla/service/reshape_mover.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/reshape_mover.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/reshape_mover.cc b/tensorflow/compiler/xla/service/reshape_mover.cc index 5625804c2e..f8023f1c37 100644 --- a/tensorflow/compiler/xla/service/reshape_mover.cc +++ b/tensorflow/compiler/xla/service/reshape_mover.cc @@ -95,7 +95,8 @@ bool TrySinkReshapeOrTranspose(HloComputation* computation, default: LOG(FATAL) << "Bad opcode"; } - computation->ReplaceWithNewInstruction(instruction, std::move(new_reshape)); + TF_CHECK_OK(computation->ReplaceWithNewInstruction(instruction, + std::move(new_reshape))); return true; } return false; |