diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-06-19 23:22:08 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-06-25 10:40:32 +0000 |
commit | 0b5af9f2751ad6cb7ce76c577a6e67abe6dc8aa1 (patch) | |
tree | 1ab7fc1480fd3480b1e50873634a77278514d01e /src/core/CL/kernels/CLWidthConcatenate2TensorsKernel.cpp | |
parent | 36b8f0503218ecae5aafc4c5d825a7a60bdd9c39 (diff) | |
download | ComputeLibrary-0b5af9f2751ad6cb7ce76c577a6e67abe6dc8aa1.tar.gz |
COMPMID-3478: Allow SubTensors with XY indexing
Remove limitations on sub-tensor creation and allow any possible
indexing as long as it honors the parent tensor shape.
In case of padding expansion on a subtensor, an error is raised if
the sub-tensor is indexed on the XY dimensions.
Change-Id: Ibb5183a6cb7421f55068b47c06b43ebde0f6e9a5
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3427
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLWidthConcatenate2TensorsKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLWidthConcatenate2TensorsKernel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/CL/kernels/CLWidthConcatenate2TensorsKernel.cpp b/src/core/CL/kernels/CLWidthConcatenate2TensorsKernel.cpp index aba2af1bb7..ada84db285 100644 --- a/src/core/CL/kernels/CLWidthConcatenate2TensorsKernel.cpp +++ b/src/core/CL/kernels/CLWidthConcatenate2TensorsKernel.cpp @@ -51,8 +51,8 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input1, ITe // The window needs to be based on the output Window win = calculate_max_window(*output, Steps(num_elems_processed_per_iteration)); AccessWindowStatic input1_access(input1, 0, 0, ceil_to_multiple(input1->dimension(0), num_elems_processed_per_iteration), input1->dimension(1)); - const unsigned int input2_right_padding = (output->dimension(0) / num_elems_processed_per_iteration) * num_elems_processed_per_iteration - input1->dimension( - 0) + num_elems_processed_per_iteration - input2->dimension(0); + const unsigned int input2_right_padding = ((output->dimension(0) / num_elems_processed_per_iteration) * num_elems_processed_per_iteration - input1->dimension(0) - input2->dimension( + 0)) % num_elems_processed_per_iteration; AccessWindowStatic input2_access(input2, -(input1->dimension(0) % num_elems_processed_per_iteration), 0, input2->dimension(0) + input2_right_padding, input2->dimension(1)); AccessWindowHorizontal output_access(output, 0, num_elems_processed_per_iteration); |