TIOVX User Guide
TIDL (TI Deep Learning) Kernel APIs

Detailed Description

TIDL Network Kernels.

Data Structures

struct  tivxTIDLJ7Params
 TIDL params structure. More...
 

Defines

#define TIVX_KERNEL_TIDL_NAME   "com.ti.tidl"
 tidl kernel name
 

Functions

void tivxTIDLLoadKernels (vx_context context)
 Used for the Application to load the tidl kernels into the context. More...
 
void tivxTIDLUnLoadKernels (vx_context context)
 Used for the Application to unload the tidl kernels from the context.
 
void tivxRegisterTIDLTargetKernels (void)
 Function to register TIDL Kernels on the TIDL Target.
 
void tivxUnRegisterTIDLTargetKernels (void)
 Function to un-register TIDL Kernels on the TIDL Target.
 
void tivxRegisterTIDLTargetKernelsMpu (void)
 Function to register TIDL Kernels on the TIDL MPU Target.
 
void tivxUnRegisterTIDLTargetKernelsMpu (void)
 Function to un-register TIDL Kernels on the TIDL MPU Target.
 
static void tivx_tidl_j7_params_init (tivxTIDLJ7Params *tidlParams)
 TIDL params initialization.
 
VX_API_ENTRY vx_node VX_API_CALL tivxTIDLNode (vx_graph graph, vx_kernel kernel, vx_reference appParams[], vx_tensor input_tensors[], vx_tensor output_tensors[])
 [Graph] Creates a TIDL Node. More...
 
vx_kernel tivxAddKernelTIDL (vx_context context, uint32_t num_input_tensors, uint32_t num_output_tensors)
 Used for the Application to create the tidl kernel from the context. More...
 

Function Documentation

◆ tivxTIDLLoadKernels()

void tivxTIDLLoadKernels ( vx_context  context)

Used for the Application to load the tidl kernels into the context.

End of group_vision_function_tidl

◆ tivxTIDLNode()

VX_API_ENTRY vx_node VX_API_CALL tivxTIDLNode ( vx_graph  graph,
vx_kernel  kernel,
vx_reference  appParams[],
vx_tensor  input_tensors[],
vx_tensor  output_tensors[] 
)

[Graph] Creates a TIDL Node.

Parameters
[in]graphReference to vx_graph.
[in]kernelReference to vx_kernel.
[in,out]appParamsis an array of 5 parameters:
  • config vx_user_data_object type corresponding to the configuration (named string: sTIDL_IOBufDesc_t)
  • network vx_user_data_object type corresponding to the network (named string: TIDL_network)
  • createParams: vx_user_data_object type corresponding to the structure TIDL_CreateParams. This structure contains create-time parameters and are used only one time to initialize the node. Currently members quantHistoryParam1, quantHistoryParam2, quantMargin need to be initialized by the application.
  • inArgs: vx_user_data_object type corresponding to the structure TIDL_InArgs. Used to pass input parameters that goes in effect during the node's process call when graph is executed. These parameters can be updated before each frame execution of a graph. Currently the list of parameters is empty. So inArgs is just a placeholder for future extension.
  • outArgs: vx_user_data_object type corresponding to the structure TIDL_outArgs. Used to collect output parameters that are returned by the node's process call when graph is executed. These parameters are refreshed after each frame execution of a graph. Currently the list of parameters is empty. So outArgs is just a placeholder for future extension.
[in]input_tensorsArray of input tensors This parameter is ignored when the first layer of the network is a data layer, which is most of the time. Only networks that are dependent on the output of a previous networks have first layer that are not data layer.
[out]output_tensorsArray of output tensors
Returns
vx_node.
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxAddKernelTIDL()

vx_kernel tivxAddKernelTIDL ( vx_context  context,
uint32_t  num_input_tensors,
uint32_t  num_output_tensors 
)

Used for the Application to create the tidl kernel from the context.

Parameters
[in]contextOpenVX context which must be created using vxCreateContext
[in]num_input_tensorsNumber of input vx_tensor objects to be created
[in]num_output_tensorsNumber of output vx_tensor objects to be created
Returns
Handle to vx_kernel object if successful, NULL otherwise
Note
The caller of this function should check status of the return vx_kernel handle and if found to be NULL must handle or propagate error appropriately.