From 8c3e9e49d247debcd3ee1a601fe5f63c4a223e0d Mon Sep 17 00:00:00 2001 From: wangdongxu Date: Tue, 30 Mar 2021 18:56:24 +0800 Subject: [PATCH] optimize opencl conv2d on mate40 --- mindspore/lite/src/runtime/kernel/opencl/kernel/conv2d.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindspore/lite/src/runtime/kernel/opencl/kernel/conv2d.cc b/mindspore/lite/src/runtime/kernel/opencl/kernel/conv2d.cc index 93e4bc0faaa..7347710b82f 100644 --- a/mindspore/lite/src/runtime/kernel/opencl/kernel/conv2d.cc +++ b/mindspore/lite/src/runtime/kernel/opencl/kernel/conv2d.cc @@ -350,6 +350,9 @@ void Conv2DOpenCLKernel::SetGlobalLocal() { size_t global_w = UP_DIV(OW_, block_size_.W); size_t global_c = UP_DIV(CO_SLICES_, block_size_.C); int local_max = filter_type_ == MemType::IMG ? 64 : 128; + if (ocl_runtime_->DeviceComputeUnits() > 16) { + local_max = 256; + } const int local_c_max = 16; const int OH_threshold = 100; const int OW_threshold = 100;