From 3e6718e2de3c46c14766ba71c84b8e06fc3fae56 Mon Sep 17 00:00:00 2001 From: wangyang59 Date: Thu, 22 Mar 2018 16:52:33 -0700 Subject: [PATCH] simplified include structure --- paddle/fluid/operators/bilinear_interp_op.cc | 9 +++++---- paddle/fluid/operators/bilinear_interp_op.cu | 5 +++-- paddle/fluid/operators/bilinear_interp_op.cu.h | 4 ---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/paddle/fluid/operators/bilinear_interp_op.cc b/paddle/fluid/operators/bilinear_interp_op.cc index c8ccc47bed..047a79765f 100644 --- a/paddle/fluid/operators/bilinear_interp_op.cc +++ b/paddle/fluid/operators/bilinear_interp_op.cc @@ -10,6 +10,7 @@ limitations under the License. */ #include "paddle/fluid/operators/bilinear_interp_op.h" +#include "paddle/fluid/framework/op_registry.h" namespace paddle { namespace operators { @@ -48,11 +49,11 @@ class BilinearInterpOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr("out_w", "output weight of bilinear interpolation op."); AddComment(R"DOC( Bilinear interpolation is an extension of linear interpolation for - interpolating functions of two variables (e.g. H-direction and W-direction - in this op) on a rectilinear 2D grid. + interpolating functions of two variables (e.g. H-direction and + W-direction in this op) on a rectilinear 2D grid. - The key idea is to perform linear interpolation first in one direction, - and then again in the other direction. + The key idea is to perform linear interpolation first in one + direction, and then again in the other direction. For details, please refer to Wikipedia: https://en.wikipedia.org/wiki/Bilinear_interpolation diff --git a/paddle/fluid/operators/bilinear_interp_op.cu b/paddle/fluid/operators/bilinear_interp_op.cu index f5899e9067..0dbbe29b2d 100644 --- a/paddle/fluid/operators/bilinear_interp_op.cu +++ b/paddle/fluid/operators/bilinear_interp_op.cu @@ -9,14 +9,15 @@ See the License for the specific language governing permissions and limitations under the License. */ +#include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/operators/bilinear_interp_op.cu.h" -#include "paddle/fluid/operators/bilinear_interp_op.h" #include "paddle/fluid/operators/math/math_function.h" -#include "paddle/fluid/platform/cuda_helper.h" namespace paddle { namespace operators { +using framework::Tensor; + template class BilinearInterpOpCUDAKernel : public framework::OpKernel { public: diff --git a/paddle/fluid/operators/bilinear_interp_op.cu.h b/paddle/fluid/operators/bilinear_interp_op.cu.h index ea9a19bf3f..0eb568d80e 100644 --- a/paddle/fluid/operators/bilinear_interp_op.cu.h +++ b/paddle/fluid/operators/bilinear_interp_op.cu.h @@ -13,15 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. */ #pragma once -#include "paddle/fluid/framework/tensor.h" #include "paddle/fluid/platform/cuda_helper.h" -#include "paddle/fluid/platform/place.h" namespace paddle { namespace operators { -using Tensor = framework::Tensor; - template __global__ void KeBilinearInterpFw(const T* in, const size_t inImgH, const size_t inImgW, const size_t inputH, -- GitLab