1 /* Copyright 2018 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 || TENSORFLOW_USE_ROCM 17 18 #define EIGEN_USE_GPU 19 20 #include <algorithm> 21 #include <array> 22 #include <limits> 23 #include <utility> 24 25 #include "tensorflow/core/kernels/conv_2d.h" 26 #include "tensorflow/core/kernels/conv_2d_gpu.h" 27 28 namespace tensorflow { 29 30 namespace functor { 31 32 template struct TransformDepth<Eigen::GpuDevice, float, int>; 33 34 template struct SwapDimension1And2InTensor3<Eigen::GpuDevice, float4>; 35 template struct SwapDimension1And2InTensor3<Eigen::GpuDevice, float2, 36 /*conjugate=*/true>; 37 38 template struct SwapDimension0And2InTensor3<Eigen::GpuDevice, float4>; 39 template struct SwapDimension0And2InTensor3<Eigen::GpuDevice, float2, 40 /*conjugate=*/true>; 41 42 // For 2d ops. 43 template struct TransformFilter<Eigen::GpuDevice, float, int, 4>; 44 template struct ReverseTransformFilter<Eigen::GpuDevice, float, 4>; 45 template struct NHWCToNCHW<Eigen::GpuDevice, float, 4>; 46 template struct NCHWToNHWC<Eigen::GpuDevice, float, 4>; 47 template struct PadInput<Eigen::GpuDevice, float, int, 4>; 48 49 // For 3d ops. 50 template struct TransformFilter<Eigen::GpuDevice, float, int, 5>; 51 template struct ReverseTransformFilter<Eigen::GpuDevice, float, 5>; 52 template struct NHWCToNCHW<Eigen::GpuDevice, float, 5>; 53 template struct NCHWToNHWC<Eigen::GpuDevice, float, 5>; 54 template struct PadInput<Eigen::GpuDevice, float, int, 5>; 55 56 } // namespace functor 57 } // namespace tensorflow 58 59 #endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM 60