From 9b64aac41ffa89cd742c9a926591a4607b3c15ed Mon Sep 17 00:00:00 2001 From: nhzlx Date: Fri, 16 Nov 2018 09:54:36 +0000 Subject: [PATCH] add macro for pool2dDirectCUDAFunctor test=develop --- paddle/fluid/operators/math/pooling.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/operators/math/pooling.h b/paddle/fluid/operators/math/pooling.h index fa732f96d4..923babd4c2 100644 --- a/paddle/fluid/operators/math/pooling.h +++ b/paddle/fluid/operators/math/pooling.h @@ -82,7 +82,7 @@ class AvgPoolGrad { * This is different from average pooling. So we rewrite the max_pool_grad: * MaxPool2dGradFunctor, MaxPool3dGradFunctor. */ - +#ifdef PADDLE_WITH_CUDA template class Pool2dDirectCUDAFunctor { public: @@ -93,6 +93,7 @@ class Pool2dDirectCUDAFunctor { const std::vector& paddings, PoolProcess pool_compute, bool exclusive, T* output, cudaStream_t stream); }; +#endif template class Pool2dFunctor {