81 #ifndef MMALIB_CNN_FULLYCONNECTED_IXX_IXX_OXX_H_
82 #define MMALIB_CNN_FULLYCONNECTED_IXX_IXX_OXX_H_
84 #include "../../common/MMALIB_types.h"
388 int32_t processWidth,
417 const void *restrict pWeights,
418 void *restrict pReorderWeights);
449 uint64_t *archCycles,
451 int32_t * caseNumber);
MMALIB_STATUS MMALIB_CNN_fullyConnected_ixX_ixX_oxX_exec(MMALIB_kernelHandle handle, const void *src0, const void *src1, void *dst, const MMALIB_CNN_fullyConnected_ixX_ixX_oxX_ExecArgs *pKerExecArgs)
This function is the main compute function, and performs matrix-matrix multiplication.
MMALIB_STATUS MMALIB_CNN_fullyConnected_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...
void MMALIB_CNN_fullyConnected_ixX_ixX_oxX_perfEst(MMALIB_kernelHandle handle, const MMALIB_bufParams2D_t *src0_addr, const MMALIB_bufParams2D_t *src1_addr, const MMALIB_bufParams2D_t *dst_addr, uint64_t *archCycles, uint64_t *estCycles, int32_t *caseNumber)
This function estimates the cycles consumed for the kernel execution.
MMALIB_CNN_FULLYCONNECTED_IXX_IXX_OXX_STATUS_NAME
Enumeration of different error codes for the MMALIB_CNN_FULLYCONNECTED kernel.
@ MMALIB_CNN_FULLYCONNECTED_IXX_IXX_OXX_ERR_MAX
@ MMALIB_CNN_FULLYCONNECTED_IXX_IXX_OXX_ERR_SMALL_K
int32_t MMALIB_CNN_fullyConnected_ixX_ixX_oxX_getHandleSize(MMALIB_CNN_fullyConnected_ixX_ixX_oxX_InitArgs *pKerInitArgs)
This is a query function to return the size of internal handle.
MMALIB_STATUS MMALIB_CNN_fullyConnected_ixX_ixX_oxX_init_checkParams(MMALIB_kernelHandle handle, const MMALIB_bufParams2D_t *src0_addr, const MMALIB_bufParams2D_t *src1_addr, const MMALIB_bufParams2D_t *dst_addr, const MMALIB_CNN_fullyConnected_ixX_ixX_oxX_InitArgs *pKerInitArgs)
This function checks the parameters and should be called before kernel execution. It can be called on...
MMALIB_STATUS MMALIB_CNN_fullyConnected_ixX_ixX_oxX_init(MMALIB_kernelHandle handle, const MMALIB_bufParams2D_t *src0_addr, const MMALIB_bufParams2D_t *src1_addr, const MMALIB_bufParams2D_t *dst_addr, const MMALIB_CNN_fullyConnected_ixX_ixX_oxX_InitArgs *pKerInitArgs)
This function call is required to initialize the handle. In this function most of the one time operat...
MMALIB_STATUS MMALIB_CNN_fullyConnected_ixX_ixX_oxX_exec_checkParams(MMALIB_kernelHandle handle, const void *src0, const void *src1, const void *dst)
This function checks the parameters and should be called before kernel executuon. It can be called on...
int32_t MMALIB_CNN_generateFillBiasPredicateRegisters(MMALIB_kernelHandle handle, int32_t inputWidth, int32_t processWidth, uint32_t mmaWidth)
This function generates the predicate buffer for feature matrix.
MMALIB_STATUS_NAME
The enumeration of all status codes.
void * MMALIB_kernelHandle
Handle type for MMALIB operations.
bool lastCall
flag signifies last call to kernel when compute is broken down
bool multiPassH
flag signifies kernel matrix cannot be fit in memory; therefore, compute is broken down by processin...
int32_t blockOffsetA
Offset of A matrix when kernel matrix is broken down in multi-pass case to pick appropriate block of ...
bool firstCall
flag signifies first call to kernel when compute is broken down
bool multiPassX
flag signifies feature matrix cannot be fit in memory; therefore, compute is broken down by processi...
bool writeCBuffer
flag signifies when to write accumulated value out Cbuffer
int8_t shift
Scalar value to scale output
int8_t funcStyle
Variant of the function refer to MMALIB_FUNCTION_STYLE
int8_t activationType
Output activation type: Saturation or ReLU
int32_t bias
Bias values added to output
int32_t kDimRows
Value of number of bias rows.
int32_t Ni
Value of used in natural C code only.
bool multiPassX
flag signifies feature matrix cannot be fit in memory; therefore, compute is broken down by processi...
bool multiPassH
flag signifies kernel matrix cannot be fit in memory; therefore, compute is broken down by processin...
void * bufCAccum_cn
Buffer pointer to hold partially accumulated values in multi-pass case.
A structure for a 2 dimensional buffer descriptor.