diff options
author | SiCong Li <sicong.li@arm.com> | 2023-02-22 17:24:09 +0000 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2023-03-06 16:19:11 +0000 |
commit | 47f177e679874dc901888973c5fc237b756b38cb (patch) | |
tree | 130386717101d0c2440111cb288faa21df8ab151 /src/gpu | |
parent | adfcacc8e39888a9a62e33c178041642d0a3047a (diff) | |
download | ComputeLibrary-47f177e679874dc901888973c5fc237b756b38cb.tar.gz |
Fix LWS search space used by CLTuner
* Ensure CLTuner uses the real GWS used by run(), instead of the
static GWS (which is usually changed at run time), by caching GWS in
each kernel
Note this is a somewhat inelegant workaround. The real issue stems
from the fact that execution window and scheduler are very much
coupled with our operator run() / run_op() method.
(Please see COMPMID-5934)
* Restrict LWS values to explore within GWS bound for exhaustive mode
* Refactor gws_from_window() to include all the information required
to calculate GWS
* Log lws search space used for tuning
* Fix ClDirectConv2dKernel config id
Resolves COMPMID-5892
Signed-off-by: SiCong Li <sicong.li@arm.com>
Change-Id: I420490d8b94d13ada2e44eb0a12078f883379334
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9193
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/cl/kernels/ClDirectConv2dKernel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp b/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp index 5f882e3a28..68d7e30c9b 100644 --- a/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp +++ b/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp @@ -367,6 +367,7 @@ void ClDirectConv2dKernel::configure(const CLCompileContext &compile_context, IT _kernel = create_kernel(compile_context, kernel_name.str(), build_options.options()); // Set config_id for enabling LWS tuning + // config_id should include the variables used to parameterize the kernel _config_id = kernel_name.str(); _config_id += "_"; _config_id += lower_string(string_from_data_type(data_type)); @@ -384,6 +385,16 @@ void ClDirectConv2dKernel::configure(const CLCompileContext &compile_context, IT _config_id += support::cpp11::to_string(conv_stride_x); _config_id += "_"; _config_id += support::cpp11::to_string(conv_stride_y); + // SRC_CHANNELS, SRC_WIDTH, SRC_HEIGHT + _config_id += "_"; + _config_id += support::cpp11::to_string(src->dimension(channel_idx)); + _config_id += "_"; + _config_id += support::cpp11::to_string(src->dimension(width_idx)); + _config_id += "_"; + _config_id += support::cpp11::to_string(src->dimension(height_idx)); + _config_id += "_"; + // DST_CHANNELS, DST_WIDTH, DST_HEIGHT + _config_id += support::cpp11::to_string(dst->dimension(channel_idx)); _config_id += "_"; _config_id += support::cpp11::to_string(dst->dimension(width_idx)); _config_id += "_"; |