![]() |
MMALIB User Guide
|
Public header file for MMALIB_CNN_tensor_convert_ixX_oxX function.
//version 0.1 - June 2020 : Initial Version - [Barath Ramesh]
Definition in file MMALIB_CNN_tensor_convert_ixX_oxX.h.
Go to the source code of this file.
Data Structures | |
| struct | MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs |
| Structure containing the parameters initialization of tensor convert function. More... | |
| struct | MMALIB_CNN_tensor_convert_ixX_oxX_ExecInArgs |
| This structure holds all the runtime input parameters for tensor convert kernel. More... | |
| struct | MMALIB_CNN_tensor_convert_ixX_oxX_ExecOutArgs |
| This structure holds all the runtime output parameters for tensor convert kernel. More... | |
Functions | |
| int32_t | MMALIB_CNN_tensor_convert_ixX_oxX_getHandleSize (MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs *pKerInitArgs) |
| This is a query function to calculate the size of internal handle. More... | |
| MMALIB_STATUS | MMALIB_CNN_tensor_convert_ixX_oxX_init (MMALIB_kernelHandle handle, const MMALIB_bufParams3D_t *src_addr, const MMALIB_bufParams1D_t *scale_addr, const MMALIB_bufParams3D_t *dst_addr, const MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs *pKerInitArgs) |
| This function call is required to initialize the handle. In this function, most of the one-time operations are performed and results are stored in handle. More... | |
| MMALIB_STATUS | MMALIB_CNN_tensor_convert_ixX_oxX_init_checkParams (MMALIB_kernelHandle handle, const MMALIB_bufParams3D_t *src_addr, const MMALIB_bufParams1D_t *scale_addr, const MMALIB_bufParams3D_t *dst_addr, const MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs *pKerInitArgs) |
| This function checks the validity of the input parameters. More... | |
| MMALIB_STATUS | MMALIB_CNN_tensor_convert_ixX_oxX_exec (MMALIB_kernelHandle handle, const void *src, const void *scale, const uint8_t *shift, const void *q1, const void *q2, void *dst, const MMALIB_CNN_tensor_convert_ixX_oxX_ExecInArgs *pKerInArgs, MMALIB_CNN_tensor_convert_ixX_oxX_ExecOutArgs *pKerOutArgs) |
| This function is the main compute function, and performs the tensor datatype conversion. More... | |
| MMALIB_STATUS | MMALIB_CNN_tensor_convert_ixX_oxX_exec_checkParams (MMALIB_kernelHandle handle, const void *src, const void *scale, const uint8_t *shift, const void *q1, const void *q2, void *dst, const MMALIB_CNN_tensor_convert_ixX_oxX_ExecInArgs *pKerInArgs, MMALIB_CNN_tensor_convert_ixX_oxX_ExecOutArgs *pKerOutArgs) |
| This function checks the parameters and should be called before kernel executuon. It can be called once. More... | |
| void | MMALIB_CNN_tensor_convert_ixX_oxX_perfEst (MMALIB_kernelHandle handle, const MMALIB_bufParams3D_t *src_addr, const MMALIB_bufParams3D_t *dst_addr, uint64_t *idealCycles, uint64_t *archCycles, uint64_t *estCycles) |
| This function estimates the kernel performance. More... | |
| int32_t MMALIB_CNN_tensor_convert_ixX_oxX_getHandleSize | ( | MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs * | pKerInitArgs | ) |
This is a query function to calculate the size of internal handle.
| [in] | pKerInitArgs | : Pointer to structure holding init parameters |
| MMALIB_STATUS MMALIB_CNN_tensor_convert_ixX_oxX_init | ( | MMALIB_kernelHandle | handle, |
| const MMALIB_bufParams3D_t * | src_addr, | ||
| const MMALIB_bufParams1D_t * | scale_addr, | ||
| const MMALIB_bufParams3D_t * | dst_addr, | ||
| const MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs * | pKerInitArgs | ||
| ) |
This function call is required to initialize the handle. In this function, most of the one-time operations are performed and results are stored in handle.
| [in] | handle | : Active handle to the kernel |
| [in] | src_addr | : Pointer to structure containing dimensional information of src (input tensor) |
| [in] | scale_addr | : Pointer to structure containing dimensional |
| [out] | dst_addr | : Pointer to structure containing dimensional information of dst (output tensor) |
| [in] | pKerInitArgs | : Pointer to structure holding init parameters |
| MMALIB_STATUS MMALIB_CNN_tensor_convert_ixX_oxX_init_checkParams | ( | MMALIB_kernelHandle | handle, |
| const MMALIB_bufParams3D_t * | src_addr, | ||
| const MMALIB_bufParams1D_t * | scale_addr, | ||
| const MMALIB_bufParams3D_t * | dst_addr, | ||
| const MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs * | pKerInitArgs | ||
| ) |
This function checks the validity of the input parameters.
| [in] | handle | : Active handle to the kernel |
| [in] | src_addr | : Pointer to structure containing dimensional information of src (input tensor) |
| [in] | scale_addr | : Pointer to structure containing dimensional information of scale |
| [out] | dst_addr | : Pointer to structure containing dimensional information of dst (output tensor) |
| [in] | pKerInitArgs | : Pointer to structure holding init parameters |
| MMALIB_STATUS MMALIB_CNN_tensor_convert_ixX_oxX_exec | ( | MMALIB_kernelHandle | handle, |
| const void * | src, | ||
| const void * | scale, | ||
| const uint8_t * | shift, | ||
| const void * | q1, | ||
| const void * | q2, | ||
| void * | dst, | ||
| const MMALIB_CNN_tensor_convert_ixX_oxX_ExecInArgs * | pKerInArgs, | ||
| MMALIB_CNN_tensor_convert_ixX_oxX_ExecOutArgs * | pKerOutArgs | ||
| ) |
This function is the main compute function, and performs the tensor datatype conversion.
TBD
| [in] | handle | : Active handle to the kernel |
| [in] | src[] | : Pointer to buffer holding input tensor |
| [in] | scale[] | : Pointer to buffer holding scale |
| [in] | shift[] | : Pointer to buffer holding shift |
| [in] | q1[] | : Pointer to buffer holding Q1 matrix, which is a scalar |
| [in] | q2[] | : Pointer to buffer holding Q2 matrix |
| [out] | dst[] | : Pointer to buffer holding output tensor |
| [in] | pKerInArgs | : Pointer to structure holding args used during kernel execution |
| [out] | pKerOutArgs | : Pointer to structure holding args generated during kernel execution (unused for now) |
| MMALIB_STATUS MMALIB_CNN_tensor_convert_ixX_oxX_exec_checkParams | ( | MMALIB_kernelHandle | handle, |
| const void * | src, | ||
| const void * | scale, | ||
| const uint8_t * | shift, | ||
| const void * | q1, | ||
| const void * | q2, | ||
| void * | dst, | ||
| const MMALIB_CNN_tensor_convert_ixX_oxX_ExecInArgs * | pKerInArgs, | ||
| MMALIB_CNN_tensor_convert_ixX_oxX_ExecOutArgs * | pKerOutArgs | ||
| ) |
This function checks the parameters and should be called before kernel executuon. It can be called once.
| [in] | handle | : Active handle to the kernel |
| [in] | src[] | : Pointer to buffer holding input tensor |
| [in] | scale[] | : Pointer to buffer holding scale |
| [in] | shift[] | : Pointer to buffer holding shift |
| [in] | q1[] | : Pointer to buffer holding Q1 matrix, which is a scalar |
| [in] | q2[] | : Pointer to buffer holding Q2 matrix |
| [out] | dst[] | : Pointer to buffer holding output tensor |
| [in] | pKerInArgs | : Pointer to structure holding args used during kernel execution |
| [out] | pKerOutArgs | : Pointer to structure holding args generated during kernel execution (unused for now) |
| void MMALIB_CNN_tensor_convert_ixX_oxX_perfEst | ( | MMALIB_kernelHandle | handle, |
| const MMALIB_bufParams3D_t * | src_addr, | ||
| const MMALIB_bufParams3D_t * | dst_addr, | ||
| uint64_t * | idealCycles, | ||
| uint64_t * | archCycles, | ||
| uint64_t * | estCycles | ||
| ) |
This function estimates the kernel performance.
| [in] | handle | : Active handle to the kernel |
| [in] | src_addr | : Pointer to structure containing dimensional information of src (input tensor) |
| [in] | dst_addr | : Pointer to structure containing dimensional information of dst (output tensor) |
| [out] | idealCycles | : TBD |
| [out] | archCycles | : TBD |
| [out] | estCycles | : Cycles estimated for the compute, startup, teardown and any associated overhead |