From 4d495329e2f66e5316652655505b2f2b2ddf2e03 Mon Sep 17 00:00:00 2001 From: xiebaiyuan Date: Fri, 24 Apr 2020 13:52:04 +0700 Subject: [PATCH] remove 256 enforce of in (#3477) * fix bilinear_interp build err on mali,test=develop * remove 256 enforce of in.. test=develop * remove 256 enforce of in ,code style.. test=develop --- mobile/src/operators/kernel/cl/instancenorm_kernel.cpp | 2 -- mobile/src/operators/kernel/cl/instancenorm_relu_kernel.cpp | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/mobile/src/operators/kernel/cl/instancenorm_kernel.cpp b/mobile/src/operators/kernel/cl/instancenorm_kernel.cpp index 439554ec10..d0f377faee 100644 --- a/mobile/src/operators/kernel/cl/instancenorm_kernel.cpp +++ b/mobile/src/operators/kernel/cl/instancenorm_kernel.cpp @@ -30,8 +30,6 @@ bool InstanceNormKernel::Init(InstanceNormParam *param) { build_options = "-DLOCAL_MEM_128"; } else if (h == 64) { build_options = "-DLOCAL_MEM_64"; - } else if (h > 256) { - PADDLE_MOBILE_THROW_EXCEPTION("instance norm unsupported input height"); } this->cl_helper_.AddKernel("instancenorm", "instancenorm_kernel.cl", build_options); diff --git a/mobile/src/operators/kernel/cl/instancenorm_relu_kernel.cpp b/mobile/src/operators/kernel/cl/instancenorm_relu_kernel.cpp index 270d77c4a0..bd1d1f8742 100644 --- a/mobile/src/operators/kernel/cl/instancenorm_relu_kernel.cpp +++ b/mobile/src/operators/kernel/cl/instancenorm_relu_kernel.cpp @@ -26,13 +26,11 @@ bool InstanceNormReluKernel::Init( FusionInstanceNormReluParam *param) { auto &dims = param->Out()->dims(); const int h = dims[2]; - std::string build_options = "-DRELU"; + std::string build_options = " -DRELU"; if (h == 128) { build_options += " -DLOCAL_MEM_128"; } else if (h == 64) { build_options += " -DLOCAL_MEM_64"; - } else if (h > 256) { - PADDLE_MOBILE_THROW_EXCEPTION("instance norm unsupported input height"); } this->cl_helper_.AddKernel("instancenorm", "instancenorm_kernel.cl", build_options); -- GitLab