MMALIB User Guide
MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights.h
Go to the documentation of this file.
1 /******************************************************************************
2 * *
3 * module name :MMALIB *
4 * *
5 * module descripton :Matrix Multiply Accelerator Library module for C7x+MMA *
6 * *
7 * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/ *
8 * ALL RIGHTS RESERVED *
9 * *
10 ******************************************************************************/
11 
12 /********************************************************************************
13 * @file MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights.h
14 *
15 * @brief Public header file for MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights
16 * function
17 *
18 * @version 0.1 - Dec 2018 : Initial Version
19 *
20 ********************************************************************************/
21 
22 #ifndef MMALIB_CNN_CONVOLVE_COL_SMALLNO_HIGHPRECISION_REORDERWEIGHTS_H_
23 #define MMALIB_CNN_CONVOLVE_COL_SMALLNO_HIGHPRECISION_REORDERWEIGHTS_H_
24 
25 #include "../../common/MMALIB_types.h"
26 #include "../MMALIB_CNN_convolve_col_smallNo_highPrecision_pointwisePost/MMALIB_CNN_convolve_col_smallNo_highPrecision_pointwisePost_reorderWeights.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 
66  typedef enum _MMALIB_reorder_weights_highPrecision_operation_e
67  {
72 
73 
82 // typedef struct
83 // {
84 // int32_t dataType; //!< Data type must be a member of @ref MMALIB_data_type_e
85 // int32_t Ni; //!< Number of input channels to be processed
86 // int32_t No; //!< Number of output channels to be processed
87 // int32_t Fr; //!< Kernel height
88 // int32_t Fc; //!< Kernel width
89 // int32_t strideX; //!< Stride in the horizontal dimension
90 // int32_t strideY; //!< Stride in the vertical dimension
91 // int32_t dilationX; //!< Dilation in the horizontal dimension
92 // int32_t featureWidth; //!< Total feature width
93 // int32_t blockFeatureHeight; //!< Number of rows from the input feature map to be processed, including top and bottom pad that is to be applied inside the kernel
94 // int32_t topPad; //!< Pixels of pad to apply to the top side of the input data
95 // int32_t bottomPad; //!< Pixels of pad to apply to the bottom side of the input data
96 // int32_t leftPad; //!< Pixels of pad to apply to the left side of the input data
97 // int32_t rightPad; //!< Pixels of pad to apply to the rights side of the input data
98 // //int32_t numBiasVals; //!< Number of elements used for the bias (cols in weights, rows in feature maps)
99 // int32_t numGroupsPerKernel; //!< Number of groups to be processed in kernel call
100 // } MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights_Args ;
101 
102 // alias
104 
105 
121 
122 
141  MMALIB_bufParams3D_t *pReorderedWeights_addr);
142 
143 
182  const MMALIB_bufParams3D_t *pWeights_addr,
183  const void *restrict pWeights, // natural order for kernel weights
184  const MMALIB_bufParams2D_t *pBias_addr,
185  const void *restrict pBias, // bias values
186  const MMALIB_bufParams3D_t *pReorderedWeights_addr,
187  void *restrict pReorderedWeights); // weights reordered for this kernel
188 
189 
192 #ifdef __cplusplus
193 }
194 #endif
195 #endif /* MMALIB_CNN_CONVOLVE_COL_SMALLNO_HIGHPRECISION_REORDERWEIGHTS_H_ */
196 
197 /* ============================================================================ */
198 /* End of file: MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights.h */
199 /* ============================================================================ */
200 
MMALIB_STATUS MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights_exec(uint32_t operation, const MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights_Args *pArgs, const MMALIB_bufParams3D_t *pWeights_addr, const void *restrict pWeights, const MMALIB_bufParams2D_t *pBias_addr, const void *restrict pBias, const MMALIB_bufParams3D_t *pReorderedWeights_addr, void *restrict pReorderedWeights)
This function takes a set of weights and biases (optional) and reorders the coefficients for improved...
MMALIB_CNN_convolve_col_smallNo_highPrecision_pointwisePost_reorderWeights_Args MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights_Args
MMALIB_reorder_weights_highPrecision_operation_e
Enumeration for different operations for the reorderWeights function.
MMALIB_STATUS MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights_fillBufParams(const MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights_Args *pArgs, MMALIB_bufParams3D_t *pReorderedWeights_addr)
This function populates a structure of dimensional information about the reordered coefficients buffe...
int32_t MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights_getMemorySize(const MMALIB_CNN_convolve_col_smallNo_highPrecision_reorderWeights_Args *pArgs)
This function returns the amount of memory that needs to be allocated for reordered kernel coefficien...
MMALIB_STATUS_NAME
The enumeration of all status codes.
Definition: MMALIB_types.h:152
This structure holds all the input parameters for reordering CNN filter weights for column-based conv...
This structure holds all the input parameters for reordering CNN filter weights for column-based conv...
A structure for a 2 dimensional buffer descriptor.
A structure for a 3 dimensional buffer descriptor.