1 /* Copyright 2016 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 16 #if GOOGLE_CUDA 17 18 #define EIGEN_USE_GPU 19 20 #include "tensorflow/core/kernels/mirror_pad_op.h" 21 22 #include "tensorflow/core/framework/register_types.h" 23 24 namespace tensorflow { 25 26 using GpuDevice = Eigen::GpuDevice; 27 28 #define DEFINE_GPU_SPECS(T) \ 29 template struct functor::MirrorPad<GpuDevice, T, int32, 1>; \ 30 template struct functor::MirrorPad<GpuDevice, T, int32, 2>; \ 31 template struct functor::MirrorPad<GpuDevice, T, int32, 3>; \ 32 template struct functor::MirrorPad<GpuDevice, T, int32, 4>; \ 33 template struct functor::MirrorPad<GpuDevice, T, int32, 5>; \ 34 template struct functor::MirrorPad<GpuDevice, T, int64, 1>; \ 35 template struct functor::MirrorPad<GpuDevice, T, int64, 2>; \ 36 template struct functor::MirrorPad<GpuDevice, T, int64, 3>; \ 37 template struct functor::MirrorPad<GpuDevice, T, int64, 4>; \ 38 template struct functor::MirrorPad<GpuDevice, T, int64, 5>; \ 39 template struct functor::MirrorPadGrad<GpuDevice, T, int32, 1>; \ 40 template struct functor::MirrorPadGrad<GpuDevice, T, int32, 2>; \ 41 template struct functor::MirrorPadGrad<GpuDevice, T, int32, 3>; \ 42 template struct functor::MirrorPadGrad<GpuDevice, T, int32, 4>; \ 43 template struct functor::MirrorPadGrad<GpuDevice, T, int32, 5>; \ 44 template struct functor::MirrorPadGrad<GpuDevice, T, int64, 1>; \ 45 template struct functor::MirrorPadGrad<GpuDevice, T, int64, 2>; \ 46 template struct functor::MirrorPadGrad<GpuDevice, T, int64, 3>; \ 47 template struct functor::MirrorPadGrad<GpuDevice, T, int64, 4>; \ 48 template struct functor::MirrorPadGrad<GpuDevice, T, int64, 5>; 49 50 TF_CALL_GPU_NUMBER_TYPES(DEFINE_GPU_SPECS); 51 #undef DEFINE_GPU_SPECS 52 53 } // namespace tensorflow 54 55 #endif // GOOGLE_CUDA 56