diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2021-04-15 17:57:31 +0100 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2021-04-16 15:59:15 +0000 |
commit | d05f67f825fc2b4f65b95a1d81476b03c095e266 (patch) | |
tree | 220bef3c863893abc0ed5e2a198b63ae3488da6e /src/core/CL/kernels | |
parent | 379549191246f7742d8175edd88d8cff8de3feda (diff) | |
download | ComputeLibrary-d05f67f825fc2b4f65b95a1d81476b03c095e266.tar.gz |
Remove unnecessary use AccessWindows
In these cases, no padding is introduced and the use of AccessWindows is
not necessary and makes the code more confusing.
Change-Id: Id712cba35bb0440eb40c69fdc7ad0084dc9a5ab3
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5440
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels')
-rw-r--r-- | src/core/CL/kernels/CLGEMMMatrixMultiplyReshapedKernel.cpp | 18 | ||||
-rw-r--r-- | src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp | 1 | ||||
-rw-r--r-- | src/core/CL/kernels/CLIm2ColKernel.cpp | 14 |
3 files changed, 1 insertions, 32 deletions
diff --git a/src/core/CL/kernels/CLGEMMMatrixMultiplyReshapedKernel.cpp b/src/core/CL/kernels/CLGEMMMatrixMultiplyReshapedKernel.cpp index 653887dcec..d270f92615 100644 --- a/src/core/CL/kernels/CLGEMMMatrixMultiplyReshapedKernel.cpp +++ b/src/core/CL/kernels/CLGEMMMatrixMultiplyReshapedKernel.cpp @@ -161,16 +161,6 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input0, ITe win = calculate_max_window(tmp_info, Steps(num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y)); win_out = calculate_max_window(*output, Steps(num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y)); - AccessWindowStatic input0_access(input0, 0, 0, - input0->dimension(0), - input0->dimension(1)); - AccessWindowStatic input1_access(input1, 0, 0, - input1->dimension(0), - input1->dimension(1)); - AccessWindowStatic output_access(output, 0, 0, - output->dimension(0), - output->dimension(1)); - if(input2 != nullptr) { const int bias_processed_per_iteration_x = num_elems_processed_per_iteration_x; @@ -181,13 +171,7 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input0, ITe ceil_to_multiple(input2->dimension(0), bias_processed_per_iteration_x), ceil_to_multiple(input2->dimension(1), bias_processed_per_iteration_y)); - window_changed = update_window_and_padding(win, input0_access, input1_access, input2_access) || // window used by the execute_window_loop - update_window_and_padding(win_out, output_access); // window used to update the padding requirements of output tensor - } - else - { - window_changed = update_window_and_padding(win, input0_access, input1_access) || // window used by the execute_window_loop - update_window_and_padding(win_out, output_access); // window used to update the padding requirements of output tensor + window_changed = update_window_and_padding(win, input2_access); // window used by the execute_window_loop } // Collapse along the Z direction diff --git a/src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp b/src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp index 8f2989e083..1c4092c0e5 100644 --- a/src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp +++ b/src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.cpp @@ -87,7 +87,6 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITen Window win = calculate_max_window(*input, Steps(num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y)); AccessWindowRectangle input_access(input, 0, 0, num_elems_processed_per_iteration_x, num_elems_processed_per_iteration_y); - AccessWindowStatic output_access(output, 0, 0, output->dimension(0), output->dimension(1)); window_changed = update_window_and_padding(win, input_access); diff --git a/src/core/CL/kernels/CLIm2ColKernel.cpp b/src/core/CL/kernels/CLIm2ColKernel.cpp index 671058106e..44012690e7 100644 --- a/src/core/CL/kernels/CLIm2ColKernel.cpp +++ b/src/core/CL/kernels/CLIm2ColKernel.cpp @@ -111,20 +111,6 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITen if(data_layout == DataLayout::NHWC) { win = calculate_max_window(*input, Steps(num_elems_processed_per_iteration)); - - const int xin_start = 0; - const int xin_end = input->dimension(0); - const int yin_start = 0; - const int yin_end = input->dimension(1); - - const int xout_start = 0; - const int xout_end = output->dimension(0); - const int yout_start = 0; - const int yout_end = output->dimension(1); - - AccessWindowStatic input_access(input, xin_start, yin_start, xin_end, yin_end); - AccessWindowStatic output_access(output, xout_start, yout_start, xout_end, yout_end); - window_changed = window_changed || update_window_and_padding(win, input_access, output_access); } else { |