From ad9a7ed2f9969381af0b9c97438a3402e16d9483 Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Fri, 16 Sep 2022 14:14:21 +0100 Subject: Rework DepthwiseConvolution heuristic on OpenCL Resolves COMPMID-5632 Change-Id: I2bdbe69a610ca2510fbd74d5d412842679299762 Signed-off-by: Gian Marco Iodice Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8365 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Viet-Hoa Do Reviewed-by: Jakub Sujak Comments-Addressed: Arm Jenkins --- .../ClDirectConvDefaultConfigValhall.cpp | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/gpu/cl/kernels/direct_conv/ClDirectConvDefaultConfigValhall.cpp') diff --git a/src/gpu/cl/kernels/direct_conv/ClDirectConvDefaultConfigValhall.cpp b/src/gpu/cl/kernels/direct_conv/ClDirectConvDefaultConfigValhall.cpp index d87cada159..ad94678335 100644 --- a/src/gpu/cl/kernels/direct_conv/ClDirectConvDefaultConfigValhall.cpp +++ b/src/gpu/cl/kernels/direct_conv/ClDirectConvDefaultConfigValhall.cpp @@ -77,15 +77,15 @@ DirectConvComputeKernelInfo ClDirectConvDefaultConfigValhall::configure_G78_f32( if(src->data_layout() == DataLayout::NHWC) { // Get the output shape - const TensorShape wei_shape = wei->tensor_shape(); - const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_shape(*src, *wei, conv_info); - const bool export_to_cl_image = export_weights_to_cl_image(wei); + const TensorShape wei_shape = wei->tensor_shape(); + const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_shape(*src, *wei, conv_info); + const bool export_weights_to_cl_image = export_to_cl_image(wei); const int32_t ofm = dst_shape[0]; const int32_t m = dst_shape[1] * dst_shape[2]; const bool is_pointwise = (wei_shape[1] == wei_shape[2]) && wei_shape[1] == 1; - desc.export_weights_to_cl_image = export_to_cl_image; + desc.export_weights_to_cl_image = export_weights_to_cl_image; if(dst_shape[0] <= 4) { @@ -138,15 +138,15 @@ DirectConvComputeKernelInfo ClDirectConvDefaultConfigValhall::configure_G78_f16( if(src->data_layout() == DataLayout::NHWC) { // Get the output shape - const TensorShape wei_shape = wei->tensor_shape(); - const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_shape(*src, *wei, conv_info); - const bool export_to_cl_image = export_weights_to_cl_image(wei); + const TensorShape wei_shape = wei->tensor_shape(); + const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_shape(*src, *wei, conv_info); + const bool export_weights_to_cl_image = export_to_cl_image(wei); const int32_t ofm = dst_shape[0]; const int32_t m = dst_shape[1] * dst_shape[2]; const bool is_pointwise = (wei_shape[1] == wei_shape[2]) && wei_shape[1] == 1; - desc.export_weights_to_cl_image = export_to_cl_image; + desc.export_weights_to_cl_image = export_weights_to_cl_image; if(dst_shape[0] <= 4) { @@ -232,14 +232,14 @@ DirectConvComputeKernelInfo ClDirectConvDefaultConfigValhall::configure_G57_f32( if(src->data_layout() == DataLayout::NHWC) { // Get the output shape - const TensorShape wei_shape = wei->tensor_shape(); - const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_shape(*src, *wei, conv_info); - const bool export_to_cl_image = export_weights_to_cl_image(wei); + const TensorShape wei_shape = wei->tensor_shape(); + const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_shape(*src, *wei, conv_info); + const bool export_weights_to_cl_image = export_to_cl_image(wei); const int32_t m = dst_shape[1] * dst_shape[2]; const bool is_pointwise = (wei_shape[1] == wei_shape[2]) && wei_shape[1] == 1; - desc.export_weights_to_cl_image = export_to_cl_image; + desc.export_weights_to_cl_image = export_weights_to_cl_image; if(dst_shape[0] <= 4) { @@ -292,15 +292,15 @@ DirectConvComputeKernelInfo ClDirectConvDefaultConfigValhall::configure_G57_f16( if(src->data_layout() == DataLayout::NHWC) { // Get the output shape - const TensorShape wei_shape = wei->tensor_shape(); - const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_shape(*src, *wei, conv_info); - const bool export_to_cl_image = export_weights_to_cl_image(wei); + const TensorShape wei_shape = wei->tensor_shape(); + const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_shape(*src, *wei, conv_info); + const bool export_weights_to_cl_image = export_to_cl_image(wei); const int32_t ofm = dst_shape[0]; const int32_t m = dst_shape[1] * dst_shape[2]; const bool is_pointwise = (wei_shape[1] == wei_shape[2]) && wei_shape[1] == 1; - desc.export_weights_to_cl_image = export_to_cl_image; + desc.export_weights_to_cl_image = export_weights_to_cl_image; if(dst_shape[0] <= 4) { -- cgit v1.2.1