@@ -38,8 +38,7 @@ void PoolRawGPUDNNKernel(const Context& dev_ctx,
3838 const std::string& padding_algorithm,
3939 DenseTensor* out) {
4040 if (x.numel () == 0 ) {
41- phi::Full<T, Context>(
42- dev_ctx, phi::IntArray (common::vectorize (out->dims ())), NAN, out);
41+ Full<T, Context>(dev_ctx, out->dims (), NAN, out);
4342 return ;
4443 }
4544 PADDLE_ENFORCE_EQ (
@@ -268,11 +267,9 @@ void Pool2dGPUDNNKernel(const Context& dev_ctx,
268267 DenseTensor* out) {
269268 if (x.numel () == 0 ) {
270269 if (pooling_type == " max" ) {
271- phi::Full<T, Context>(
272- dev_ctx, phi::IntArray (common::vectorize (out->dims ())), 0 , out);
270+ Full<T, Context>(dev_ctx, out->dims (), 0 , out);
273271 } else { // for pooling_type == "avg"
274- phi::Full<T, Context>(
275- dev_ctx, phi::IntArray (common::vectorize (out->dims ())), NAN, out);
272+ Full<T, Context>(dev_ctx, out->dims (), NAN, out);
276273 }
277274 return ;
278275 }
@@ -306,11 +303,9 @@ void Pool3dGPUDNNKernel(const Context& dev_ctx,
306303 DenseTensor* out) {
307304 if (x.numel () == 0 ) {
308305 if (pooling_type == " max" || (!adaptive && pooling_type == " avg" )) {
309- phi::Full<T, Context>(
310- dev_ctx, phi::IntArray (common::vectorize (out->dims ())), 0 , out);
306+ Full<T, Context>(dev_ctx, out->dims (), 0 , out);
311307 } else {
312- phi::Full<T, Context>(
313- dev_ctx, phi::IntArray (common::vectorize (out->dims ())), NAN, out);
308+ Full<T, Context>(dev_ctx, out->dims (), NAN, out);
314309 }
315310 return ;
316311 }
0 commit comments