aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/while_loop_simplifier.h
diff options
context:
space:
mode:
authorGravatar Justin Lebar <jlebar@google.com>2017-11-02 19:12:40 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-02 19:18:02 -0700
commit58143d36c06c2b027ae7f9f4d51dadcdc1c66b74 (patch)
treed206d37c80b4587346ede5a0e00c88afee9a227e /tensorflow/compiler/xla/service/while_loop_simplifier.h
parent02608eadc34e5a606a95375ba078879145a55b7e (diff)
[XLA] Add dead tuple elem removal to WhileLoopSimplifier.
Specifically, if a while loop has tuple element that - is not used by the while condition, and - is not used by the while body, except to pass it along to the next iteration of the loop, then we can reshape the while loop's computations to eliminate this tuple element. PiperOrigin-RevId: 174413683
Diffstat (limited to 'tensorflow/compiler/xla/service/while_loop_simplifier.h')
-rw-r--r--tensorflow/compiler/xla/service/while_loop_simplifier.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/while_loop_simplifier.h b/tensorflow/compiler/xla/service/while_loop_simplifier.h
index 30774f2b3c..50dac32a4a 100644
--- a/tensorflow/compiler/xla/service/while_loop_simplifier.h
+++ b/tensorflow/compiler/xla/service/while_loop_simplifier.h
@@ -27,6 +27,8 @@ namespace xla {
// - A while loop with static trip count of 0 is deleted.
// - A while loops with static trip count of 1 is replaced by its body (sans
// loop).
+// - Elements of a while loop's tuple that the loop doesn't use are removed
+// from the tuple.
//
class WhileLoopSimplifier : public HloPassInterface {
public: