![]() |
DSPLIB User Guide
|
Go to the source code of this file.
Macros | |
| #define | SE_PARAM_BASE (0x0000) |
| #define | SE0_PARAM_OFFSET (SE_PARAM_BASE) |
| #define | SE1_PARAM_OFFSET (SE0_PARAM_OFFSET + SE_PARAM_SIZE) |
| #define | SA0_PARAM_OFFSET (SE1_PARAM_OFFSET + SE_PARAM_SIZE) |
| #define | DSPLIB_MATMUL_FIXED_UNROLL (32) |
Functions | |
| template<typename dataTypeIn , typename dataTypeOut > | |
| void | DSPLIB_matMul_fixed_PromoteTranspose_init_ci (__SE_TEMPLATE_v1 *se0Params, __SE_TEMPLATE_v1 *se1Params) |
| template<> | |
| void | DSPLIB_matMul_fixed_PromoteTranspose_init_ci< DSPLIB_MATMAPY_FXD_I16S_O16S > (__SE_TEMPLATE_v1 *se0Params, __SE_TEMPLATE_v1 *se1Params) |
| template<> | |
| void | DSPLIB_matMul_fixed_PromoteTranspose_init_ci< DSPLIB_MATMAPY_FXD_I8S_O8S > (__SE_TEMPLATE_v1 *se0Params, __SE_TEMPLATE_v1 *se1Params) |
| template<typename dataTypeIn , typename dataTypeOut > | |
| DSPLIB_STATUS | DSPLIB_matMul_fixed_init_ci (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_fixed_InitArgs *pKerInitArgs) |
| This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_matMul_fixed_init. More... | |
| template DSPLIB_STATUS | DSPLIB_matMul_fixed_init_ci< DSPLIB_MATMAPY_FXD_I8S_O8S > (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_fixed_InitArgs *pKerInitArgs) |
| template DSPLIB_STATUS | DSPLIB_matMul_fixed_init_ci< DSPLIB_MATMAPY_FXD_I16S_O16S > (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_fixed_InitArgs *pKerInitArgs) |
| template<typename V > | |
| static c7x::uchar_vec | setMask () |
| template<> | |
| c7x::uchar_vec | setMask< int16_t > () |
| template<> | |
| c7x::uchar_vec | setMask< int8_t > () |
| template<typename V , __SE_REG , __SE_REG > | |
| static void | vecMulAcc (V outSum0, V outSum1) |
| template<> | |
| void | vecMulAcc< c7x::long_vec &, __SE_REG_0, __SE_REG_1_ADV > (c7x::long_vec &outSum0, c7x::long_vec &outSum1) |
| template<> | |
| void | vecMulAcc< c7x::long_vec &, __SE_REG_0_ADV, __SE_REG_1_ADV > (c7x::long_vec &outSum0, c7x::long_vec &outSum1) |
| template<> | |
| void | vecMulAcc< c7x::int_vec &, __SE_REG_0, __SE_REG_1_ADV > (c7x::int_vec &outSum0, c7x::int_vec &outSum1) |
| template<> | |
| void | vecMulAcc< c7x::int_vec &, __SE_REG_0_ADV, __SE_REG_1_ADV > (c7x::int_vec &outSum0, c7x::int_vec &outSum1) |
| template<typename V > | |
| static void | vecShiftRight (V vecSR0, V vecSR1, V shiftVec) |
| template<> | |
| void | vecShiftRight< c7x::long_vec & > (c7x::long_vec &vecSRL0, c7x::long_vec &vecSRL1, c7x::long_vec &shiftVec) |
| template<> | |
| void | vecShiftRight< c7x::int_vec & > (c7x::int_vec &vecSRI0, c7x::int_vec &vecSRI1, c7x::int_vec &shiftVec) |
| template<typename V > | |
| static void | resetVec (V vecRes0, V vecRes1) |
| template<> | |
| void | resetVec< c7x::long_vec & > (c7x::long_vec &vecResL0, c7x::long_vec &vecResL1) |
| template<> | |
| void | resetVec< c7x::int_vec & > (c7x::int_vec &vecResI0, c7x::int_vec &vecResI1) |
| template<typename V > | |
| static void | packAlternate (V vecPA0, V vecPA1, V vecPA2, V vecPA3, V vecPAOut0, V vecPAOut1) |
| template<> | |
| void | packAlternate< c7x::long_vec & > (c7x::long_vec &vecPAL0, c7x::long_vec &vecPAL1, c7x::long_vec &vecPAL2, c7x::long_vec &vecPAL3, c7x::long_vec &vecPALOut0, c7x::long_vec &vecPALOut1) |
| template<> | |
| void | packAlternate< c7x::int_vec & > (c7x::int_vec &vecPAI0, c7x::int_vec &vecPAI1, c7x::int_vec &vecPAI2, c7x::int_vec &vecPAI3, c7x::int_vec &vecPAIOut0, c7x::int_vec &vecPAIOut1) |
| template<typename V , typename W > | |
| static void | vecPermutePack (V vecPerm1, V vecPerm2, V vecPerm3, V vecPerm4, V vecPerm5, V vecPerm6, V vecPerm7, V vecPerm8, W pOutLocal, c7x::uchar_vec vMask) |
| template<> | |
| void | vecPermutePack< c7x::long_vec &, int16_t * > (c7x::long_vec &vecPermL1, c7x::long_vec &vecPermL2, c7x::long_vec &vecPermL3, c7x::long_vec &vecPermL4, c7x::long_vec &vecPermL5, c7x::long_vec &vecPermL6, c7x::long_vec &vecPermL7, c7x::long_vec &vecPermL8, int16_t *pOutLocal, c7x::uchar_vec vMaskPerm) |
| template<> | |
| void | vecPermutePack< c7x::int_vec &, int8_t * > (c7x::int_vec &vecPermI1, c7x::int_vec &vecPermI2, c7x::int_vec &vecPermI3, c7x::int_vec &vecPermI4, c7x::int_vec &vecPermI5, c7x::int_vec &vecPermI6, c7x::int_vec &vecPermI7, c7x::int_vec &vecPermI8, int8_t *pOutLocal, c7x::uchar_vec vMaskPerm) |
| template<typename dataTypeIn > | |
| static void | writeOutSA0 (dataTypeIn *pOut, c7x::short_vec v1, c7x::short_vec v2) |
| template<> | |
| void | writeOutSA0 (int16_t *pOut, c7x::short_vec v1, c7x::short_vec v2) |
| template<> | |
| void | writeOutSA0 (int8_t *pOut, c7x::short_vec v1, c7x::short_vec v2) |
| template<typename dataTypeIn , typename dataTypeOut > | |
| DSPLIB_STATUS | DSPLIB_matMul_fixed_exec_ci (DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut) |
| This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_matMul_fixed_exec. More... | |
| template DSPLIB_STATUS | DSPLIB_matMul_fixed_exec_ci< DSPLIB_MATMAPY_FXD_I16S_O16S > (DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut) |
| template DSPLIB_STATUS | DSPLIB_matMul_fixed_exec_ci< DSPLIB_MATMAPY_FXD_I8S_O8S > (DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut) |
| #define SE_PARAM_BASE (0x0000) |
Definition at line 43 of file DSPLIB_matMul_fixed_ci.cpp.
| #define SE0_PARAM_OFFSET (SE_PARAM_BASE) |
Definition at line 44 of file DSPLIB_matMul_fixed_ci.cpp.
| #define SE1_PARAM_OFFSET (SE0_PARAM_OFFSET + SE_PARAM_SIZE) |
Definition at line 45 of file DSPLIB_matMul_fixed_ci.cpp.
| #define SA0_PARAM_OFFSET (SE1_PARAM_OFFSET + SE_PARAM_SIZE) |
Definition at line 46 of file DSPLIB_matMul_fixed_ci.cpp.
| #define DSPLIB_MATMUL_FIXED_UNROLL (32) |
Definition at line 47 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
|
inline |
Definition at line 55 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 66 of file DSPLIB_matMul_fixed_ci.cpp.
| DSPLIB_STATUS DSPLIB_matMul_fixed_init_ci | ( | DSPLIB_kernelHandle | handle, |
| const DSPLIB_bufParams2D_t * | bufParamsIn0, | ||
| const DSPLIB_bufParams2D_t * | bufParamsIn1, | ||
| const DSPLIB_bufParams2D_t * | bufParamsOut, | ||
| const DSPLIB_matMul_fixed_InitArgs * | pKerInitArgs | ||
| ) |
This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_matMul_fixed_init.
This function determines the configuration for the streaming engine and MMA hardware resources based on the function call parameters, and the configuration is saved in bufPBlock array. In the kernel call sequence, DSPLIB_matMul_fixed_exec_ci would be called later independently by the application. When DSPLIB_matMul_fixed_exec_ci runs, it merely retrieves the configuration from the bufPBlock and uses it to set up the hardware resources. This arrangement is so that DSPLIB_matMul_fixed_exec_ci does not lose cycles to determine the hardware configuration.
| [in] | handle | : Active handle to the kernel |
| [in] | bufParamsIn1 | : Pointer to the structure containing dimensional information of input buffer 1 |
| [in] | bufParamsIn2 | : Pointer to the structure containing dimensional information of input buffer 2 |
| [out] | bufParamsOut | : Pointer to the structure containing dimensional information of ouput buffer |
| [in] | pKerInitArgs | : Pointer to the structure holding init parameters |
Definition at line 77 of file DSPLIB_matMul_fixed_ci.cpp.
| template DSPLIB_STATUS DSPLIB_matMul_fixed_init_ci< DSPLIB_MATMAPY_FXD_I8S_O8S > | ( | DSPLIB_kernelHandle | handle, |
| const DSPLIB_bufParams2D_t * | bufParamsIn0, | ||
| const DSPLIB_bufParams2D_t * | bufParamsIn1, | ||
| const DSPLIB_bufParams2D_t * | bufParamsOut, | ||
| const DSPLIB_matMul_fixed_InitArgs * | pKerInitArgs | ||
| ) |
| template DSPLIB_STATUS DSPLIB_matMul_fixed_init_ci< DSPLIB_MATMAPY_FXD_I16S_O16S > | ( | DSPLIB_kernelHandle | handle, |
| const DSPLIB_bufParams2D_t * | bufParamsIn0, | ||
| const DSPLIB_bufParams2D_t * | bufParamsIn1, | ||
| const DSPLIB_bufParams2D_t * | bufParamsOut, | ||
| const DSPLIB_matMul_fixed_InitArgs * | pKerInitArgs | ||
| ) |
|
inlinestatic |
|
inline |
Definition at line 182 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 191 of file DSPLIB_matMul_fixed_ci.cpp.
|
inlinestatic |
|
inline |
Definition at line 203 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 212 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 221 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 228 of file DSPLIB_matMul_fixed_ci.cpp.
|
inlinestatic |
|
inline |
Definition at line 237 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 244 of file DSPLIB_matMul_fixed_ci.cpp.
|
inlinestatic |
|
inline |
Definition at line 251 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 257 of file DSPLIB_matMul_fixed_ci.cpp.
|
inlinestatic |
|
inline |
Definition at line 266 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 278 of file DSPLIB_matMul_fixed_ci.cpp.
|
inlinestatic |
|
inline |
Definition at line 301 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 342 of file DSPLIB_matMul_fixed_ci.cpp.
|
inlinestatic |
|
inline |
Definition at line 372 of file DSPLIB_matMul_fixed_ci.cpp.
|
inline |
Definition at line 379 of file DSPLIB_matMul_fixed_ci.cpp.
| DSPLIB_STATUS DSPLIB_matMul_fixed_exec_ci | ( | DSPLIB_kernelHandle | handle, |
| void *restrict | pIn1, | ||
| void *restrict | pIn2, | ||
| void *restrict | pOut | ||
| ) |
This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_matMul_fixed_exec.
The function uses MMA hardware accelerator to perform the convolution computation. Filter data is loaded into B panel of the MMA from memory using one streaming engine, while the input data is loaded into A vectors of the MMA using the other streaming engine. Result of the compute from MMA C panel is stored into memory using a stream matMul_fixedress generator.
| [in] | handle | : Active handle to the kernel |
| [in] | pIn | : Pointer to buffer holding the input data |
| [out] | pOut | : Pointer to buffer holding the output data |
Definition at line 388 of file DSPLIB_matMul_fixed_ci.cpp.
| template DSPLIB_STATUS DSPLIB_matMul_fixed_exec_ci< DSPLIB_MATMAPY_FXD_I16S_O16S > | ( | DSPLIB_kernelHandle | handle, |
| void *restrict | pIn0, | ||
| void *restrict | pIn1, | ||
| void *restrict | pOut | ||
| ) |
| template DSPLIB_STATUS DSPLIB_matMul_fixed_exec_ci< DSPLIB_MATMAPY_FXD_I8S_O8S > | ( | DSPLIB_kernelHandle | handle, |
| void *restrict | pIn0, | ||
| void *restrict | pIn1, | ||
| void *restrict | pOut | ||
| ) |