MMALIB User Guide
MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_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_ixX_ixX_oxX_reorderWeights.h
14 *
15 * @brief Public header file for MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_reorderWeights
16 * function
17 *
18 * @version 0.1 - Dec 2018 : Initial Version
19 *
20 ********************************************************************************/
21 
22 #ifndef MMALIB_CNN_CONVOLVE_COL_SMALLNO_IXX_IXX_OXX_REORDERWEIGHTS_H_
23 #define MMALIB_CNN_CONVOLVE_COL_SMALLNO_IXX_IXX_OXX_REORDERWEIGHTS_H_
24 
25 #include "../../common/MMALIB_types.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 
69  typedef enum _MMALIB_reorder_weights_operation_e
70  {
75 
76 
85  typedef struct
86  {
87  int32_t dataType;
88  int32_t Ni;
89  int32_t No;
90  int32_t Fr;
91  int32_t Fc;
92  int32_t strideX;
93  int32_t strideY;
94  int32_t dilationX;
95  int32_t featureWidth;
97  int32_t topPad;
98  int32_t bottomPad;
99  int32_t leftPad;
100  int32_t rightPad;
101  int32_t numBiasVals;
104 
105 
121 
122 
141  MMALIB_bufParams2D_t *pReorderedWeights_addr);
142 
143 
182  const MMALIB_bufParams2D_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_bufParams2D_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_IXX_IXX_OXX_REORDERWEIGHTS_H_ */
196 
197 /* ============================================================================ */
198 /* End of file: MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_reorderWeights.h */
199 /* ============================================================================ */
200 
MMALIB_reorder_weights_operation_e
Enumeration for different operations for the reorderWeights function.
int32_t MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_reorderWeights_getMemorySize(const MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_reorderWeights_Args *pArgs)
This function returns the amount of memory that needs to be allocated for reordered kernel coefficien...
MMALIB_STATUS MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_reorderWeights_fillBufParams(const MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_reorderWeights_Args *pArgs, MMALIB_bufParams2D_t *pReorderedWeights_addr)
This function populates a structure of dimensional information about the reordered coefficients buffe...
MMALIB_STATUS MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_reorderWeights_exec(uint32_t operation, const MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_reorderWeights_Args *pArgs, const MMALIB_bufParams2D_t *pWeights_addr, const void *restrict pWeights, const MMALIB_bufParams2D_t *pBias_addr, const void *restrict pBias, const MMALIB_bufParams2D_t *pReorderedWeights_addr, void *restrict pReorderedWeights)
This function takes a set of weights and biases (optional) and reorders the coefficients for improved...
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...
int32_t numBiasVals
Number of elements used for the bias (cols in weights, rows in feature maps)
int32_t blockFeatureHeight
Number of rows from the input feature map to be processed, including top and bottom pad that is to be...
A structure for a 2 dimensional buffer descriptor.