diff --git a/paddle/fluid/operators/bilinear_interp_op.cc b/paddle/fluid/operators/bilinear_interp_op.cc index c8ccc47bedbaebdafa0de44d00ebf768f388c40a..047a79765fb114dd471bb4ca112a93f5ed747cf8 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 f5899e9067105c7637448530b4446df8f78d7da1..0dbbe29b2de973d4fcdcb2deee82f34494c28114 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 ea9a19bf3faed25748babb936e3ac0b89860399e..0eb568d80efb1cda311519ae553a3263b6e5c27f 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,