diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2022-09-16 14:14:21 +0100 |
---|---|---|
committer | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2022-10-06 15:34:16 +0000 |
commit | ad9a7ed2f9969381af0b9c97438a3402e16d9483 (patch) | |
tree | 440ef7484418b49778e897bf00fb6396c24d0986 /src/gpu/cl | |
parent | 3bedd2f031680f53e2982638adfe99a29dca8d06 (diff) | |
download | ComputeLibrary-ad9a7ed2f9969381af0b9c97438a3402e16d9483.tar.gz |
Rework DepthwiseConvolution heuristic on OpenCL
Resolves COMPMID-5632
Change-Id: I2bdbe69a610ca2510fbd74d5d412842679299762
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8365
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu/cl')
3 files changed, 19 insertions, 19 deletions
diff --git a/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp b/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp index 722c802138..fd14f009e1 100644 --- a/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp +++ b/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp @@ -94,7 +94,7 @@ Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, co { ARM_COMPUTE_RETURN_ERROR_ON_MSG(desc.k0 != 4 && desc.k0 != 8 && desc.k0 != 16, "K0 can only be: 4, 8, and 16"); - ARM_COMPUTE_RETURN_ERROR_ON_MSG(!export_weights_to_cl_image(weights), + ARM_COMPUTE_RETURN_ERROR_ON_MSG(!export_to_cl_image(weights), "Export to CLImage is not supported for this weight configuration"); } } diff --git a/src/gpu/cl/kernels/direct_conv/ClDirectConvDefaultConfigBifrost.cpp b/src/gpu/cl/kernels/direct_conv/ClDirectConvDefaultConfigBifrost.cpp index 4ea198133b..ba176f8c5f 100644 --- a/src/gpu/cl/kernels/direct_conv/ClDirectConvDefaultConfigBifrost.cpp +++ b/src/gpu/cl/kernels/direct_conv/ClDirectConvDefaultConfigBifrost.cpp @@ -159,7 +159,7 @@ DirectConvComputeKernelInfo ClDirectConvDefaultConfigBifrost::configure_default_ desc.k0 = 8; - desc.export_weights_to_cl_image = export_weights_to_cl_image(wei); + desc.export_weights_to_cl_image = export_to_cl_image(wei); } return desc; @@ -183,7 +183,7 @@ DirectConvComputeKernelInfo ClDirectConvDefaultConfigBifrost::configure_default_ desc.k0 = 8; - desc.export_weights_to_cl_image = export_weights_to_cl_image(wei); + desc.export_weights_to_cl_image = export_to_cl_image(wei); } return desc; 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) { |