pool_op.cu 2.1 KB
Newer Older
1
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
2

C
chengduoZH 已提交
3 4 5
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
6

C
chengduoZH 已提交
7 8 9 10 11 12 13
    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
14

Y
Yi Wang 已提交
15
#include "paddle/fluid/operators/pool_op.h"
16 17 18

namespace ops = paddle::operators;

Q
QI JUN 已提交
19 20
REGISTER_OP_CUDA_KERNEL(
    pool2d, ops::PoolKernel<paddle::platform::CUDADeviceContext, float>,
21 22 23
    ops::PoolKernel<paddle::platform::CUDADeviceContext, double>,
    ops::PoolKernel<paddle::platform::CUDADeviceContext,
                    paddle::platform::float16>);
Q
QI JUN 已提交
24 25 26
REGISTER_OP_CUDA_KERNEL(
    pool2d_grad,
    ops::PoolGradKernel<paddle::platform::CUDADeviceContext, float>,
27 28 29
    ops::PoolGradKernel<paddle::platform::CUDADeviceContext, double>,
    ops::PoolGradKernel<paddle::platform::CUDADeviceContext,
                        paddle::platform::float16>);
30

31 32 33 34 35 36 37
REGISTER_OP_CUDA_KERNEL(
    pool2d_grad_grad,
    ops::PoolGradGradKernel<paddle::platform::CUDADeviceContext, float>,
    ops::PoolGradGradKernel<paddle::platform::CUDADeviceContext, double>,
    ops::PoolGradGradKernel<paddle::platform::CUDADeviceContext,
                            paddle::platform::float16>);

Q
QI JUN 已提交
38 39
REGISTER_OP_CUDA_KERNEL(
    pool3d, ops::PoolKernel<paddle::platform::CUDADeviceContext, float>,
40 41 42
    ops::PoolKernel<paddle::platform::CUDADeviceContext, double>,
    ops::PoolKernel<paddle::platform::CUDADeviceContext,
                    paddle::platform::float16>);
Q
QI JUN 已提交
43 44 45
REGISTER_OP_CUDA_KERNEL(
    pool3d_grad,
    ops::PoolGradKernel<paddle::platform::CUDADeviceContext, float>,
46 47 48
    ops::PoolGradKernel<paddle::platform::CUDADeviceContext, double>,
    ops::PoolGradKernel<paddle::platform::CUDADeviceContext,
                        paddle::platform::float16>);