Commit a997e989 authored by Peter Hawkins's avatar Peter Hawkins Committed by TensorFlower Gardener
Browse files

[TF:XLA] Always return a tuple-shaped result when converting a TensorFlow...

[TF:XLA] Always return a tuple-shaped result when converting a TensorFlow graph into an XLA computation. Previously we had special case logic where the number of outputs was 1 to avoid the tuple, but this meant that any code that wanted to reason about the outputs had to have a special case. By using tuples unconditionally we can simplify the code.

Since loop conditions must be untupled, wrap loop condition computations with code that unpacks the output tuple into a PRED value.

[XLA:CPU] Use CallInliner pass on CPU to work around wrong output bug exposed by this change. Add a unit test that exhibits the bug if the CallInliner is disabled.

PiperOrigin-RevId: 169333679
parent 36cf5439
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment