message: [OpenCL] DenseUpdate sync
diff: @@ -24,6 +24,9 @@ limitations under the License.
  namespace tensorflow {
  typedef Eigen::ThreadPoolDevice CPUDevice;
  +#ifdef TENSORFLOW_USE_SYCL
  +typedef Eigen::SyclDevice SYCLDevice;
  +#endif // TENSORFLOW_USE_SYCL
  enum DenseUpdateType { ADD, SUB, ASSIGN };
  @@ -59,6 +62,32 @@ struct DenseUpdate<CPUDevice, T, ASSIGN> {
  }
  };
  +#ifdef TENSORFLOW_USE_SYCL
  +template <typename T>
  +struct DenseUpdate<SYCLDevice, T, ADD> {
  + void operator()(const SYCLDevice& d, typename TTypes<T>::Flat params,
  + typename TTypes<T>::ConstFlat update) {
  + params.device(d) += update;
  + }
  +};
  +
  +template <typename T>
  +struct DenseUpdate<SYCLDevice, T, SUB> {
  + void operator()(const SYCLDevice& d, typename TTypes<T>::Flat params,
  + typename TTypes<T>::ConstFlat update) {
  + params.device(d) -= update;
  + }
  +};
  +
  +template <typename T>
  +struct DenseUpdate<SYCLDevice, T, ASSIGN> {
  + void operator()(const SYCLDevice& d, typename TTypes<T>::Flat params,
  + typename TTypes<T>::ConstFlat update) {
  + params.device(d) = update;
  + }
  +};
  +#endif // TENSORFLOW_USE_SYCL
  +
  } // end namespace functor
  } // end namespace tensorflow
  