TIOVX User Guide
TVM (Tensor Virtual Machine) Kernel APIs

Detailed Description

TVM Network Kernels.

Data Structures

struct  tivxTVMJ7Params
 TVM params structure. More...
 

Defines

#define TIVX_KERNEL_TVM_NAME   "com.ti.tvm"
 tvm kernel name
 

Functions

void tivxTVMLoadKernels (vx_context context)
 Used for the Application to load the tvm kernels into the context.
 
void tivxTVMUnLoadKernels (vx_context context)
 Used for the Application to unload the tvm kernels from the context.
 
void tivxRegisterTVMTargetKernels (void)
 Function to register TVM Kernels on the TVM Target.
 
void tivxUnRegisterTVMTargetKernels (void)
 Function to un-register TVM Kernels on the TVM Target.
 
VX_API_ENTRY vx_node VX_API_CALL tivxTVMNode (vx_graph graph, vx_kernel kernel, vx_reference appParams[], vx_tensor input_tensors[], vx_tensor output_tensors[])
 [Graph] Creates a TVM Node. More...
 
vx_kernel tivxAddKernelTVM (vx_context context, uint32_t num_input_tensors, uint32_t num_output_tensors)
 Used for the Application to create the tvm kernel from the context. More...
 

Function Documentation

◆ tivxTVMNode()

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

[Graph] Creates a TVM Node.

Parameters
[in]graphReference to vx_graph.
[in]kernelReference to vx_kernel.
[in,out]appParamsis an array of 2 parameters:
  • config vx_user_data_object type corresponding to the configuration (named string: tivxTVMJ7Params)
  • deploy_mod vx_user_data_object type corresponding to the TVM deployable module (named string: tivxTVMJ7DeployMod)
[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

◆ tivxAddKernelTVM()

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

Used for the Application to create the tvm 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.