23 #ifndef MMALIB_CNN_FULLYCONNECTEDBIAS_REORDER_WEIGHTS_H_
24 #define MMALIB_CNN_FULLYCONNECTEDBIAS_REORDER_WEIGHTS_H_
26 #include "../../common/MMALIB_types.h"
32 #if defined(__SE_FEAT_SPARSITY)
33 #define INDICATOR_BITS 64
34 #define PACKET_ROWS INDICATOR_BITS/__MMA_A_COLS(1)
37 #define PACKET_ROWS_SHIFT 0
38 #define PACKET_ROWS_MASK 0x0ULL
39 #elif PACKET_ROWS == 2
40 #define PACKET_ROWS_SHIFT 1
41 #define PACKET_ROWS_MASK 0x1ULL
42 #elif PACKET_ROWS == 4
43 #define PACKET_ROWS_SHIFT 2
44 #define PACKET_ROWS_MASK 0x3ULL
64 #if defined (__SE_FEAT_SPARSITY)
97 const void *restrict pWeights,
98 void *restrict pReorderWeights);
116 const void *restrict pWeights);
140 const void *restrict pWeights,
141 void *restrict pReordered_Weights);
MMALIB_STATUS MMALIB_CNN_fullyConnectedBias_processWeights_reorder(const MMALIB_CNN_fullyConnectedBias_processWeights_Args *pArgs, const void *restrict pWeights, void *restrict pReordered_Weights)
This function takes a set of weights and reorders them for use in computing convolve row flow convolu...
MMALIB_STATUS MMALIB_CNN_fullyConnectedBias_ixX_ixX_oxX_reorderWeights(int32_t mmaSize, int32_t NiBias, int32_t No, uint32_t strideOut, const void *restrict pWeights, void *restrict pReorderWeights)
This function re-orders the input weights (kernel matrix). Reordering of data is required to alleviat...
int32_t MMALIB_CNN_fullyConnectedBias_processWeights_getMemorySize(const MMALIB_CNN_fullyConnectedBias_processWeights_Args *pArgs, const void *restrict pWeights)
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.
This structure holds all the input parameters for reordering CNN filter weights.
int8_t funcStyle
Variant of the function refer to MMALIB_FUNCTION_STYLE.
uint32_t dim_y
Height of h buffer in Y dimension in elements.
int32_t stride_y
Stride of h buffer in Y dimension in bytes.
uint32_t dim_x
Width of h buffer in X dimension in elements.
uint32_t data_type
Data type must be a member of MMALIB_data_type_e.