Enable while loop constant sinking for GPU
authorSanjoy Das <sanjoy@google.com>
Sat, 26 May 2018 00:22:11 +0000 (17:22 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Sat, 26 May 2018 00:24:56 +0000 (17:24 -0700)
commit8fcc95ebf42ed8eea543ec2edf1a1ed1c62ca7e8
tree66758f11ac719ff941050e4bb5182c1dfea2c4c0
parent06717b77e05bd602d10fe40f4519dbb105fabd5c
Enable while loop constant sinking for GPU

To avoid keeping constants in while loop bodies after optimization (where they
may cause extra copies) we run a late pass of LICM that has been asked to hoist
constants when it can.

PiperOrigin-RevId: 198126497
tensorflow/compiler/xla/service/BUILD
tensorflow/compiler/xla/service/gpu/BUILD
tensorflow/compiler/xla/service/gpu/gpu_compiler.cc
tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc
tensorflow/compiler/xla/service/while_loop_invariant_code_motion.h
tensorflow/compiler/xla/service/while_loop_invariant_code_motion_test.cc