提交 3e6718e2 编写于 作者: W wangyang59

simplified include structure

上级 d87ac4de
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
limitations under the License. */ limitations under the License. */
#include "paddle/fluid/operators/bilinear_interp_op.h" #include "paddle/fluid/operators/bilinear_interp_op.h"
#include "paddle/fluid/framework/op_registry.h"
namespace paddle { namespace paddle {
namespace operators { namespace operators {
...@@ -48,11 +49,11 @@ class BilinearInterpOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -48,11 +49,11 @@ class BilinearInterpOpMaker : public framework::OpProtoAndCheckerMaker {
AddAttr<int>("out_w", "output weight of bilinear interpolation op."); AddAttr<int>("out_w", "output weight of bilinear interpolation op.");
AddComment(R"DOC( AddComment(R"DOC(
Bilinear interpolation is an extension of linear interpolation for Bilinear interpolation is an extension of linear interpolation for
interpolating functions of two variables (e.g. H-direction and W-direction interpolating functions of two variables (e.g. H-direction and
in this op) on a rectilinear 2D grid. W-direction in this op) on a rectilinear 2D grid.
The key idea is to perform linear interpolation first in one direction, The key idea is to perform linear interpolation first in one
and then again in the other direction. direction, and then again in the other direction.
For details, please refer to Wikipedia: For details, please refer to Wikipedia:
https://en.wikipedia.org/wiki/Bilinear_interpolation https://en.wikipedia.org/wiki/Bilinear_interpolation
......
...@@ -9,14 +9,15 @@ ...@@ -9,14 +9,15 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ 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.cu.h"
#include "paddle/fluid/operators/bilinear_interp_op.h"
#include "paddle/fluid/operators/math/math_function.h" #include "paddle/fluid/operators/math/math_function.h"
#include "paddle/fluid/platform/cuda_helper.h"
namespace paddle { namespace paddle {
namespace operators { namespace operators {
using framework::Tensor;
template <typename T> template <typename T>
class BilinearInterpOpCUDAKernel : public framework::OpKernel<T> { class BilinearInterpOpCUDAKernel : public framework::OpKernel<T> {
public: public:
......
...@@ -13,15 +13,11 @@ See the License for the specific language governing permissions and ...@@ -13,15 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma once #pragma once
#include "paddle/fluid/framework/tensor.h"
#include "paddle/fluid/platform/cuda_helper.h" #include "paddle/fluid/platform/cuda_helper.h"
#include "paddle/fluid/platform/place.h"
namespace paddle { namespace paddle {
namespace operators { namespace operators {
using Tensor = framework::Tensor;
template <typename T> template <typename T>
__global__ void KeBilinearInterpFw(const T* in, const size_t inImgH, __global__ void KeBilinearInterpFw(const T* in, const size_t inImgH,
const size_t inImgW, const size_t inputH, const size_t inImgW, const size_t inputH,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册