MMALIB User Guide
MMALIB_CNN_convolveBias_row_ixX_ixX_oxX_processWeights.h File Reference

Go to the source code of this file.

Data Structures

struct  MMALIB_CNN_convolveBias_row_processWeights_Args
 This structure holds all the input parameters for reordering CNN filter weights. More...
 

Macros

#define MMA_SIZE_BLKS   2
 
#define INDICATOR_BITS   64
 
#define SPARSE_BLKS   2
 
#define PACKET_ROWS   INDICATOR_BITS/__MMA_A_COLS(1)
 

Functions

int32_t MMALIB_CNN_convolveBias_row_processWeights_getMemorySize (MMALIB_CNN_convolveBias_row_processWeights_Args *pArgs, const void *restrict pWeights)
 This function returns the amount of memory that needs to be allocated for reordered kernel coefficients needed to support MMALIB_CNN_convolveBias_row_ixX_ixX_oxX. More...
 
MMALIB_STATUS MMALIB_CNN_convolveBias_row_processWeights_reorder (const MMALIB_CNN_convolveBias_row_processWeights_Args *pArgs, const void *restrict pWeights, void *restrict pReorderedWeights)
 This function takes a set of weights and reorders them for use in computing convolve row flow convolution. More...
 
MMALIB_STATUS MMALIB_CNN_convolveBias_row_processWeights_depacketize (const MMALIB_CNN_convolveBias_row_processWeights_Args *pArgs, const void *restrict pReorderedWeights, const void *restrict pWeights)
 

Macro Definition Documentation

◆ MMA_SIZE_BLKS

#define MMA_SIZE_BLKS   2

◆ INDICATOR_BITS

#define INDICATOR_BITS   64

◆ SPARSE_BLKS

#define SPARSE_BLKS   2

◆ PACKET_ROWS

#define PACKET_ROWS   INDICATOR_BITS/__MMA_A_COLS(1)

Function Documentation

◆ MMALIB_CNN_convolveBias_row_processWeights_getMemorySize()

int32_t MMALIB_CNN_convolveBias_row_processWeights_getMemorySize ( MMALIB_CNN_convolveBias_row_processWeights_Args pArgs,
const void *restrict  pWeights 
)

This function returns the amount of memory that needs to be allocated for reordered kernel coefficients needed to support MMALIB_CNN_convolveBias_row_ixX_ixX_oxX.

Parameters
[in]pArgs: Pointer to the structure containing the required dimensional information
[in]pWeights: Pointer to weights array in natural order
Returns
Number of bytes required to store the reordered kernel coefficients
Remarks
Application is expected allocate this amount of memory for kernel coefficients

◆ MMALIB_CNN_convolveBias_row_processWeights_reorder()

MMALIB_STATUS MMALIB_CNN_convolveBias_row_processWeights_reorder ( const MMALIB_CNN_convolveBias_row_processWeights_Args pArgs,
const void *restrict  pWeights,
void *restrict  pReorderedWeights 
)

This function takes a set of weights and reorders them for use in computing convolve row flow convolution.

The function can receive the kernel weights a priori.

Parameters
[in]pArgs: Pointer to argument structure containing necessary parameters for reordering weights
[in]pWeights[]: Pointer to buffer holding naturally ordered convolution weights
[out]pReorderedWeights[]: Pointer to buffer holding the reordered weights output
Returns
Status of success or error with error codes, refer to MMALIB_STATUS.
Performance Considerations:
  • This function may either be called during the processing flow, or offline whenever the weights are known.

◆ MMALIB_CNN_convolveBias_row_processWeights_depacketize()

MMALIB_STATUS MMALIB_CNN_convolveBias_row_processWeights_depacketize ( const MMALIB_CNN_convolveBias_row_processWeights_Args pArgs,
const void *restrict  pReorderedWeights,
const void *restrict  pWeights 
)