[XLA] In HloEvaluator, fix an issue for HandleAbs to handle complex numbers
authorKay Zhu <kayzhu@google.com>
Tue, 27 Feb 2018 00:24:54 +0000 (16:24 -0800)
committerGunhan Gulsoy <gunan@google.com>
Tue, 27 Feb 2018 22:33:33 +0000 (14:33 -0800)
commitd1ba271902a91a044e7515e248cd9f384a91067b
tree83f3491d7940cf96e1d0437a733621858a8125f0
parentc7caa2d87daa37b66811ac99f997ad02acd4ecc8
[XLA] In HloEvaluator, fix an issue for HandleAbs to handle complex numbers
more correctly:

- abs([complex numbers]) would yield floats. However since the specilization for
HandleAbs is based on the return type (float), we'd CHECK fail due to float !=
complex when accessing the elements of the operand (complex).
- enable unary_op_test for interpreter.

PiperOrigin-RevId: 187099576
tensorflow/compiler/xla/service/hlo_evaluator.cc
tensorflow/compiler/xla/tests/BUILD