aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/fill_functor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/kernels/fill_functor.cc')
-rw-r--r--tensorflow/core/kernels/fill_functor.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/fill_functor.cc b/tensorflow/core/kernels/fill_functor.cc
index 0d10a080db..94cc91bba3 100644
--- a/tensorflow/core/kernels/fill_functor.cc
+++ b/tensorflow/core/kernels/fill_functor.cc
@@ -52,5 +52,18 @@ DEFINE_SETZERO_CPU(complex64);
DEFINE_SETZERO_CPU(complex128);
#undef DEFINE_SETZERO_CPU
+#ifdef TENSORFLOW_USE_SYCL
+template <typename T>
+void SetZeroFunctor<Eigen::SyclDevice, T>::operator()(
+ const Eigen::SyclDevice& d, typename TTypes<T>::Flat out) {
+ out.device(d) = out.constant(T(0));
+}
+
+#define DEFINE_SETZERO_SYCL(T) \
+ template struct SetZeroFunctor<Eigen::SyclDevice, T>;
+DEFINE_SETZERO_SYCL(float);
+#undef DEFINE_SETZERO_SYCL
+#endif // TENSORFLOW_USE_SYCL
+
} // namespace functor
} // namespace tensorflow