Skip to content

Commit 9b64aac

Browse files
committed
add macro for pool2dDirectCUDAFunctor
test=develop
1 parent 8f9a8c4 commit 9b64aac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddle/fluid/operators/math/pooling.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class AvgPoolGrad {
8282
* This is different from average pooling. So we rewrite the max_pool_grad:
8383
* MaxPool2dGradFunctor, MaxPool3dGradFunctor.
8484
*/
85-
85+
#ifdef PADDLE_WITH_CUDA
8686
template <typename PoolProcess, typename T>
8787
class Pool2dDirectCUDAFunctor {
8888
public:
@@ -93,6 +93,7 @@ class Pool2dDirectCUDAFunctor {
9393
const std::vector<int>& paddings, PoolProcess pool_compute,
9494
bool exclusive, T* output, cudaStream_t stream);
9595
};
96+
#endif
9697

9798
template <typename DeviceContext, typename PoolProcess, typename T>
9899
class Pool2dFunctor {

0 commit comments

Comments
 (0)