diff options
Diffstat (limited to 'tensorflow/core/kernels/reduction_ops_min.cc')
-rw-r--r-- | tensorflow/core/kernels/reduction_ops_min.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/reduction_ops_min.cc b/tensorflow/core/kernels/reduction_ops_min.cc index c362bc8867..ec240421b9 100644 --- a/tensorflow/core/kernels/reduction_ops_min.cc +++ b/tensorflow/core/kernels/reduction_ops_min.cc @@ -57,4 +57,27 @@ REGISTER_KERNEL_BUILDER( #endif +#ifdef TENSORFLOW_USE_SYCL +#define REGISTER_SYCL_KERNELS(type) \ + REGISTER_KERNEL_BUILDER( \ + Name("Min") \ + .Device(DEVICE_SYCL) \ + .TypeConstraint<type>("T") \ + .TypeConstraint<int32>("Tidx") \ + .HostMemory("reduction_indices"), \ + ReductionOp<SYCLDevice, type, Eigen::internal::MinReducer<type>>); +REGISTER_SYCL_KERNELS(float); +#undef REGISTER_SYCL_KERNELS + +REGISTER_KERNEL_BUILDER( + Name("Min") + .Device(DEVICE_SYCL) + .HostMemory("reduction_indices") + .HostMemory("input") + .HostMemory("output") + .TypeConstraint<int32>("T") + .TypeConstraint<int32>("Tidx"), + ReductionOp<CPUDevice, int32, Eigen::internal::MinReducer<int32>>); +#endif // TENSORFLOW_USE_SYCL + } // namespace tensorflow |