diff options
Diffstat (limited to 'tensorflow/core/kernels/cwise_op_square.cc')
-rw-r--r-- | tensorflow/core/kernels/cwise_op_square.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/cwise_op_square.cc b/tensorflow/core/kernels/cwise_op_square.cc index 0ce4473d83..f867f127a7 100644 --- a/tensorflow/core/kernels/cwise_op_square.cc +++ b/tensorflow/core/kernels/cwise_op_square.cc @@ -18,6 +18,18 @@ limitations under the License. namespace tensorflow { REGISTER7(UnaryOp, CPU, "Square", functor::square, float, Eigen::half, double, int32, int64, complex64, complex128); + +#if TENSORFLOW_USE_SYCL +#define REGISTER_SYCL_KERNEL(TYPE) \ + REGISTER_KERNEL_BUILDER( \ + Name("Square") \ + .Device(DEVICE_SYCL) \ + .TypeConstraint<TYPE>("T"), \ + UnaryOp<SYCLDevice, functor::square<TYPE>>); +REGISTER_SYCL_KERNEL(float); +#undef REGISTER_SYCL_KERNEL +#endif // TENSORFLOW_USE_SYC + #if GOOGLE_CUDA REGISTER4(UnaryOp, GPU, "Square", functor::square, float, Eigen::half, double, int64); |