[TF:XLA] Make noinline function work with control flow.
authorA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 17 May 2018 01:23:20 +0000 (18:23 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 17 May 2018 01:26:26 +0000 (18:26 -0700)
commit1ac9c483dc9c59101da21629184ba7ff40e27145
tree59bb1e90872ecc74d1c5a49272bac7fed40e7700
parent1d46d1a0fe1e1418022f08d26d22941441ead4cf
[TF:XLA] Make noinline function work with control flow.
1) Make the local function library for control flow self-contained. The control flow function could refer to a noinline function not defined in the local library. Copy the missing FunctionDefs from the glocal library to the local one.
2) Fix the index used to get the output shapes for functional nodes.

PiperOrigin-RevId: 196922649
tensorflow/compiler/tf2xla/functionalize_control_flow.cc
tensorflow/compiler/tf2xla/functionalize_control_flow.h
tensorflow/compiler/tf2xla/functionalize_control_flow_test.cc
tensorflow/compiler/tf2xla/graph_compiler.cc
tensorflow/compiler/tf2xla/xla_compiler.cc
tensorflow/compiler/tf2xla/xla_compiler_test.cc