forked from ARM-software/CMSIS-NN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add grouped convolution to arm_convolve_s8 (ARM-software#99)
- Adds support for calling arm_convolve_s8 with conditions input_dims->c = filter_dims->c * N, output_dims->c = N * M, for N > 1, M >= 1, to use grouped convolution with N groups of size M - Adds argument row_address_offset to arm_nn_mat_mult_nt_t_s8 - Adds arm_nn_mat_mult_kernel_row_offset_s8_s16 - Update arm_convolve_wrapper to use only arm_convolve_s8 for grouped convolutions - Adds unit tests for grouped convolution Change-Id: Iaa2701a8bb460f4470c41a0e1f82ea09ca095802
- Loading branch information
1 parent
3b4e406
commit ffeca90
Showing
59 changed files
with
1,447 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* SPDX-FileCopyrightText: Copyright 2010-2023 Arm Limited and/or its affiliates <[email protected]> | ||
* SPDX-FileCopyrightText: Copyright 2010-2024 Arm Limited and/or its affiliates <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
|
@@ -21,16 +21,15 @@ | |
* Title: arm_convolve_1_x_n_s8.c | ||
* Description: s8 version of 1xN convolution using symmetric quantization. | ||
* | ||
* $Date: 8 March 2023 | ||
* $Revision: V.3.4.0 | ||
* $Date: 04 January 2024 | ||
* $Revision: V.3.5.0 | ||
* | ||
* Target : Arm(R) M-Profile Architecture | ||
* | ||
* -------------------------------------------------------------------- */ | ||
|
||
#include "arm_nnfunctions.h" | ||
#include "arm_nnsupportfunctions.h" | ||
|
||
/** | ||
* @ingroup Public | ||
*/ | ||
|
@@ -149,6 +148,7 @@ arm_cmsis_nn_status arm_convolve_1_x_n_s8(const cmsis_nn_context *ctx, | |
conv_params->output_offset, | ||
conv_params->activation.min, | ||
conv_params->activation.max, | ||
rhs_rows, | ||
lhs_offset); | ||
|
||
output_data += lhs_rows * rhs_rows; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <[email protected]> | ||
* SPDX-FileCopyrightText: Copyright 2022-2024 Arm Limited and/or its affiliates <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
|
@@ -21,8 +21,8 @@ | |
* Title: arm_convolve_1x1_s8.c | ||
* Description: Generic s8 version of 1x1 convolution | ||
* | ||
* $Date: 20 January 2023 | ||
* $Revision: V.1.0.1 | ||
* $Date: 04 January 2024 | ||
* $Revision: V.1.1.0 | ||
* | ||
* Target : Arm(R) M-Profile Architecture | ||
* | ||
|
@@ -96,6 +96,7 @@ arm_cmsis_nn_status arm_convolve_1x1_s8(const cmsis_nn_context *ctx, | |
conv_params->output_offset, | ||
conv_params->activation.min, | ||
conv_params->activation.max, | ||
rhs_rows, | ||
rhs_cols * stride_w); | ||
if (result != ARM_CMSIS_NN_SUCCESS) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* SPDX-FileCopyrightText: Copyright 2010-2023 Arm Limited and/or its affiliates <[email protected]> | ||
* SPDX-FileCopyrightText: Copyright 2010-2024 Arm Limited and/or its affiliates <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
|
@@ -21,8 +21,8 @@ | |
* Title: arm_convolve_1x1_s8_fast.c | ||
* Description: Fast s8 version of 1x1 convolution (non-square shape) | ||
* | ||
* $Date: 30 October 2023 | ||
* $Revision: V.3.4.0 | ||
* $Date: 04 January 2024 | ||
* $Revision: V.3.5.0 | ||
* | ||
* Target : Arm(R) M-Profile Architecture | ||
* | ||
|
@@ -86,6 +86,7 @@ arm_cmsis_nn_status arm_convolve_1x1_s8_fast(const cmsis_nn_context *ctx, | |
conv_params->output_offset, | ||
conv_params->activation.min, | ||
conv_params->activation.max, | ||
rhs_rows, | ||
rhs_cols); | ||
|
||
/* Return to application */ | ||
|
Oops, something went wrong.