* [OpenCL] Added RGBToHSV and HSVToRGB * Aligning '\'
This commit is contained in:
parent
832894ef89
commit
fc7361081f
@ -35,6 +35,9 @@ namespace tensorflow {
|
|||||||
|
|
||||||
typedef Eigen::ThreadPoolDevice CPUDevice;
|
typedef Eigen::ThreadPoolDevice CPUDevice;
|
||||||
typedef Eigen::GpuDevice GPUDevice;
|
typedef Eigen::GpuDevice GPUDevice;
|
||||||
|
#ifdef TENSORFLOW_USE_SYCL
|
||||||
|
typedef Eigen::SyclDevice SYCLDevice;
|
||||||
|
#endif
|
||||||
|
|
||||||
template <typename Device, typename T>
|
template <typename Device, typename T>
|
||||||
class RGBToHSVOp : public OpKernel {
|
class RGBToHSVOp : public OpKernel {
|
||||||
@ -146,4 +149,16 @@ TF_CALL_float(REGISTER_GPU);
|
|||||||
TF_CALL_double(REGISTER_GPU);
|
TF_CALL_double(REGISTER_GPU);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef TENSORFLOW_USE_SYCL
|
||||||
|
#define REGISTER_SYCL(T) \
|
||||||
|
REGISTER_KERNEL_BUILDER(Name("RGBToHSV").Device(DEVICE_SYCL) \
|
||||||
|
.TypeConstraint<T>("T"), \
|
||||||
|
RGBToHSVOp<SYCLDevice, T>); \
|
||||||
|
REGISTER_KERNEL_BUILDER(Name("HSVToRGB").Device(DEVICE_SYCL) \
|
||||||
|
.TypeConstraint<T>("T"), \
|
||||||
|
HSVToRGBOp<SYCLDevice, T>);
|
||||||
|
TF_CALL_float(REGISTER_SYCL);
|
||||||
|
TF_CALL_double(REGISTER_SYCL);
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace tensorflow
|
} // namespace tensorflow
|
||||||
|
Loading…
Reference in New Issue
Block a user