23 #ifndef MMALIB_CNN_TENSOR_CONVERT_IXX_IXX_OXX_H_
24 #define MMALIB_CNN_TENSOR_CONVERT_IXX_IXX_OXX_H_
26 #include "../../common/MMALIB_types.h"
202 const uint8_t *shift,
233 const uint8_t *shift,
261 uint64_t *idealCycles,
262 uint64_t *archCycles,
263 uint64_t *estCycles);
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 *q, 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 on...
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.
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.
MMALIB_STATUS MMALIB_CNN_tensor_convert_ixX_oxX_exec(MMALIB_kernelHandle handle, const void *src, const void *scale, const uint8_t *shift, const void *q, 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.
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.
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 opera...
MMALIB_STATUS_NAME
The enumeration of all status codes.
void * MMALIB_kernelHandle
Handle type for MMALIB operations.
MMALIB_tensor_format_e
Tensor format.
This structure holds all the runtime input parameters for tensor convert kernel.
uint32_t srcDimY
update if this is different from init src_addr.dimy
uint32_t srcDimZ
update if this is different from init src_addr.dimz
This structure holds all the runtime output parameters for tensor convert kernel.
int32_t validColsOut
dummy placeholder for now
Structure containing the parameters initialization of tensor convert function.
int8_t funcStyle
Variant of the function refer to MMALIB_FUNCTION_STYLE
int32_t inPad
input pad of each row of output feature map, unused for now
int32_t outPad
output pad of each row of output feature map, specify pad only on one side
MMALIB_tensor_format tensorFormatOut
output tensor format: CHW or HWC
MMALIB_tensor_format tensorFormatIn
input tensor format: CHW or HWC
A structure for a 1 dimensional buffer descriptor.
A structure for a 3 dimensional buffer descriptor.