diff options
author | 2016-04-15 04:56:05 -0800 | |
---|---|---|
committer | 2016-04-15 06:02:54 -0700 | |
commit | 31fd4868711f393bec74200231c2936bf3df079a (patch) | |
tree | 6cce655cc9690f232dbfd0725c7175e8d333f8bd /tensorflow/core/kernels/cwise_op_neg.cc | |
parent | df15baa9b10a0b2d194181dff7ee14bff70d9b8f (diff) |
fp16-enable all the componentwise ops.
This also includes updating parts of the Python test framework to handle fp16.
fp16 is too inaccurate to do numerical gradients unless a lot of care is taken,
so for fp16, we compare fp16 theoretical gradients to fp32 numerical ones.
This means that the gradient check doesn't also implicitly test the function
itself, so we will need to rely on the numpy tests for those.
Change: 119948035
Diffstat (limited to 'tensorflow/core/kernels/cwise_op_neg.cc')
-rw-r--r-- | tensorflow/core/kernels/cwise_op_neg.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/core/kernels/cwise_op_neg.cc b/tensorflow/core/kernels/cwise_op_neg.cc index db17045b73..97bbbb20ca 100644 --- a/tensorflow/core/kernels/cwise_op_neg.cc +++ b/tensorflow/core/kernels/cwise_op_neg.cc @@ -16,10 +16,10 @@ limitations under the License. #include "tensorflow/core/kernels/cwise_ops_common.h" namespace tensorflow { -REGISTER5(UnaryOp, CPU, "Neg", functor::neg, float, double, int32, complex64, - int64); +REGISTER6(UnaryOp, CPU, "Neg", functor::neg, Eigen::half, float, double, int32, + complex64, int64); #if GOOGLE_CUDA -REGISTER3(UnaryOp, GPU, "Neg", functor::neg, float, double, int64); +REGISTER4(UnaryOp, GPU, "Neg", functor::neg, Eigen::half, float, double, int64); // A special GPU kernel for int32. // TODO(b/25387198): Also enable int32 in device memory. This kernel |