From dde430234d6054e746d3807014e44df6b2d07a83 Mon Sep 17 00:00:00 2001 From: weihaoji Date: Fri, 18 Sep 2020 11:11:10 +0800 Subject: [PATCH] [XPU] bugfix on pooling test=develop test=xpu --- lite/kernels/xpu/pool_compute.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lite/kernels/xpu/pool_compute.cc b/lite/kernels/xpu/pool_compute.cc index 4480e4875c..348f5dcf31 100644 --- a/lite/kernels/xpu/pool_compute.cc +++ b/lite/kernels/xpu/pool_compute.cc @@ -38,8 +38,7 @@ void Pool2DCompute::Run() { auto& paddings = *param.paddings; auto type = xdnn::MAX_WITHOUT_INDEX; if (param.pooling_type == "avg") { - if (paddings[0] == 0 && paddings[1] == 0 && paddings[2] == 0 && - paddings[3] == 0) { + if (param.exclusive) { type = xdnn::AVG_WITHOUT_PAD; } else { type = xdnn::AVG_WITH_PAD; -- GitLab