diff options
author | 2016-06-06 12:45:58 -0800 | |
---|---|---|
committer | 2016-06-06 14:04:47 -0700 | |
commit | aba8beebab0b363f03492b3d5653ec14d148f3c3 (patch) | |
tree | 82648ff178ba1bf4fc5232328f2bc650cde27da6 /tensorflow/core/kernels/depthwise_conv_op.cc | |
parent | e70c452a18403b368ea845cfb654079386a00fd8 (diff) |
Change some kernels to use TF_CALL* macros, so that the instantiations for some
types can be avoided on mobile platform.
Change: 124172890
Diffstat (limited to 'tensorflow/core/kernels/depthwise_conv_op.cc')
-rw-r--r-- | tensorflow/core/kernels/depthwise_conv_op.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tensorflow/core/kernels/depthwise_conv_op.cc b/tensorflow/core/kernels/depthwise_conv_op.cc index c96365f4f0..4bee59aecd 100644 --- a/tensorflow/core/kernels/depthwise_conv_op.cc +++ b/tensorflow/core/kernels/depthwise_conv_op.cc @@ -376,14 +376,13 @@ class DepthwiseConv2dNativeOp : public BinaryOp<T> { TF_DISALLOW_COPY_AND_ASSIGN(DepthwiseConv2dNativeOp); }; -REGISTER_KERNEL_BUILDER( - Name("DepthwiseConv2dNative").Device(DEVICE_CPU).TypeConstraint<float>("T"), - DepthwiseConv2dNativeOp<CPUDevice, float>); +#define REGISTER_CPU_KERNEL(T) \ + REGISTER_KERNEL_BUILDER( \ + Name("DepthwiseConv2dNative").Device(DEVICE_CPU).TypeConstraint<T>("T"), \ + DepthwiseConv2dNativeOp<CPUDevice, T>); -REGISTER_KERNEL_BUILDER(Name("DepthwiseConv2dNative") - .Device(DEVICE_CPU) - .TypeConstraint<double>("T"), - DepthwiseConv2dNativeOp<CPUDevice, double>); +TF_CALL_float(REGISTER_CPU_KERNEL); +TF_CALL_double(REGISTER_CPU_KERNEL); #if GOOGLE_CUDA REGISTER_KERNEL_BUILDER( |