Skip to content

Commit 963168f

Browse files
CMSIS-NN: Refactor, remove unused function arm_nn_mat_mult_kernel_s8_s16_reordered (#1417)
* CMSIS-NN: Remove unused function arm_nn_mat_mult_kernel_s8_s16_reordered.c
1 parent 11ff706 commit 963168f

File tree

4 files changed

+38
-287
lines changed

4 files changed

+38
-287
lines changed

ARM.CMSIS.pdsc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2815,7 +2815,6 @@ and 8-bit Java bytecodes in Jazelle state.
28152815
<file category="source" name="CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_1_x_n_s8.c"/>
28162816
<file category="source" name="CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_s8_s16.c"/>
28172817
<file category="source" name="CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_conv_u8_basic_ver1.c"/>
2818-
<file category="source" name="CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_s8_s16_reordered.c"/>
28192818
<file category="source" name="CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_separable_conv_HWC_q7.c"/>
28202819
<file category="source" name="CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_conv_wrapper_s8.c"/>
28212820
<file category="source" name="CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_q7_q15.c"/>

CMSIS/NN/Include/arm_nnfunctions.h

Lines changed: 2 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* Title: arm_nnfunctions.h
2222
* Description: Public header file for CMSIS NN Library
2323
*
24-
* $Date: 24 January 2022
25-
* $Revision: V.7.4.0
24+
* $Date: 7 February 2022
25+
* $Revision: V.8.0.0
2626
*
2727
* Target Processor: Cortex-M CPUs
2828
* -------------------------------------------------------------------- */
@@ -1585,87 +1585,6 @@ q7_t *arm_nn_mat_mult_kernel_q7_q15(const q7_t *pA,
15851585
const uint16_t out_shift,
15861586
const q7_t *bias,
15871587
q7_t *pOut);
1588-
/**
1589-
* @brief Matrix-multiplication function for convolution with per-channel requantization.
1590-
* @param[in] input_a pointer to operand A
1591-
* @param[in] input_b pointer to operand B, always consists of 2 vectors.
1592-
* @param[in] output_ch number of rows of A
1593-
* @param[in] out_shift pointer to per output channel requantization shift parameter.
1594-
* @param[in] out_mult pointer to per output channel requantization multiplier parameter.
1595-
* @param[in] out_offset output tensor offset.
1596-
* @param[in] activation_min minimum value to clamp the output to. Range : int8
1597-
* @param[in] activation_max maximum value to clamp the output to. Range : int8
1598-
* @param[in] num_col_a number of columns of A
1599-
* @param[in] output_bias per output channel bias. Range : int32
1600-
* @param[in,out] out_0 pointer to output
1601-
* @return The function returns one of the two
1602-
* 1. The incremented output pointer for a successful operation or
1603-
* 2. NULL if implementation is not available.
1604-
*
1605-
* @details This function does the matrix multiplication of weight matrix for all output channels
1606-
* with 2 columns from im2col and produces two elements/output_channel. The outputs are
1607-
* clamped in the range provided by activation min and max.
1608-
* Supported framework: TensorFlow Lite micro.
1609-
*/
1610-
q7_t *arm_nn_mat_mult_kernel_s8_s16(const q7_t *input_a,
1611-
const q15_t *input_b,
1612-
const uint16_t output_ch,
1613-
const int32_t *out_shift,
1614-
const int32_t *out_mult,
1615-
const int32_t out_offset,
1616-
const int16_t activation_min,
1617-
const int16_t activation_max,
1618-
const uint16_t num_col_a,
1619-
const int32_t *const output_bias,
1620-
q7_t *out_0);
1621-
1622-
/**
1623-
* @brief Matrix-multiplication of re-ordered input B with A.
1624-
*
1625-
* @details For arguments, refer arm_nn_mat_mult_kernel_s8_s16. The re-ordering is a consequence
1626-
* of sign extension done by the SXTB16 command on input_b. The outputs are clamped in the range
1627-
* provided by activation min and max.
1628-
* * @details
1629-
* - Supported framework : TensorFlow Lite Micro
1630-
* - The following constrains on the arguments apply
1631-
* -# num_col_a is a multiple of 4
1632-
* -# output_ch is a multiple of 2
1633-
*
1634-
*/
1635-
q7_t *arm_nn_mat_mult_kernel_s8_s16_reordered(const q7_t *input_a,
1636-
const q15_t *input_b,
1637-
const uint16_t output_ch,
1638-
const int32_t *out_shift,
1639-
const int32_t *out_mult,
1640-
const int32_t out_offset,
1641-
const int16_t activation_min,
1642-
const int16_t activation_max,
1643-
const uint16_t num_col_a,
1644-
const int32_t *const output_bias,
1645-
q7_t *out_0);
1646-
1647-
/**
1648-
*@brief Matrix-multiplication function for convolution with reordered columns
1649-
*@param[in] pA pointer to operand A
1650-
*@param[in] pInBuffer pointer to operand B, always conssists of 2 vectors
1651-
*@param[in] ch_im_out numRow of A
1652-
*@param[in] numCol_A numCol of A
1653-
*@param[in] bias_shift amount of left-shift for bias
1654-
*@param[in] out_shift amount of right-shift for output
1655-
*@param[in] bias the bias
1656-
*@param[in,out] pOut pointer to output
1657-
*@return The function returns the incremented output pointer
1658-
*
1659-
*@details This function assumes that data in pInBuffer are reordered
1660-
*/
1661-
q7_t *arm_nn_mat_mult_kernel_q7_q15_reordered(const q7_t *pA,
1662-
const q15_t *pInBuffer,
1663-
const uint16_t ch_im_out,
1664-
const uint16_t numCol_A,
1665-
const uint16_t bias_shift,
1666-
const uint16_t out_shift,
1667-
const q7_t *bias,
1668-
q7_t *pOut);
16691588

16701589
#ifdef __cplusplus
16711590
}

CMSIS/NN/Include/arm_nnsupportfunctions.h

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* Title: arm_nnsupportfunctions.h
2222
* Description: Public header file of support functions for CMSIS NN Library
2323
*
24-
* $Date: 3. February 2022
25-
* $Revision: V.6.0.1
24+
* $Date: 7. February 2022
25+
* $Revision: V.6.1.0
2626
*
2727
* Target Processor: Cortex-M CPUs
2828
* -------------------------------------------------------------------- */
@@ -742,6 +742,40 @@ void arm_nn_mult_q15(q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, const uint16_t out
742742

743743
void arm_nn_mult_q7(q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, const uint16_t out_shift, uint32_t blockSize);
744744

745+
/**
746+
* @brief Matrix-multiplication function for convolution with per-channel requantization.
747+
* @param[in] input_a pointer to operand A
748+
* @param[in] input_b pointer to operand B, always consists of 2 vectors.
749+
* @param[in] output_ch number of rows of A
750+
* @param[in] out_shift pointer to per output channel requantization shift parameter.
751+
* @param[in] out_mult pointer to per output channel requantization multiplier parameter.
752+
* @param[in] out_offset output tensor offset.
753+
* @param[in] activation_min minimum value to clamp the output to. Range : int8
754+
* @param[in] activation_max maximum value to clamp the output to. Range : int8
755+
* @param[in] num_col_a number of columns of A
756+
* @param[in] output_bias per output channel bias. Range : int32
757+
* @param[in,out] out_0 pointer to output
758+
* @return The function returns one of the two
759+
* 1. The incremented output pointer for a successful operation or
760+
* 2. NULL if implementation is not available.
761+
*
762+
* @details This function does the matrix multiplication of weight matrix for all output channels
763+
* with 2 columns from im2col and produces two elements/output_channel. The outputs are
764+
* clamped in the range provided by activation min and max.
765+
* Supported framework: TensorFlow Lite micro.
766+
*/
767+
q7_t *arm_nn_mat_mult_kernel_s8_s16(const q7_t *input_a,
768+
const q15_t *input_b,
769+
const uint16_t output_ch,
770+
const int32_t *out_shift,
771+
const int32_t *out_mult,
772+
const int32_t out_offset,
773+
const int16_t activation_min,
774+
const int16_t activation_max,
775+
const uint16_t num_col_a,
776+
const int32_t *const output_bias,
777+
q7_t *out_0);
778+
745779
/**
746780
* @brief macro for adding rounding offset
747781
*/

CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_s8_s16_reordered.c

Lines changed: 0 additions & 201 deletions
This file was deleted.

0 commit comments

Comments
 (0)