TIOVX User Guide
vx_tutorial_tidl.c File Reference
#include <TI/tivx.h>
#include <tivx_utils_file_rd_wr.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
#include <float.h>
#include <math.h>
#include "../../../common/xdais_types.h"
#include "sTIDL_IOBufDesc.h"
#include "tivx_tidl_utils.h"
#include "itidl_ti.h"
#include "vx_tutorial_tidl.h"
#include "test_engine/test_utils.h"

Go to the source code of this file.

Detailed Description

Executes the inference of a deep learning network. It first reads the configuration file 'tidl/tidl_infer.cfg' located in directory test_data and that contains the following information:

  • path to network model's parameter file generated by the import tools
  • path to network's file generated by the import tools
  • path to the input file, usually a grayscale or color image
  • path to the output file, that will contain the output from the last layer. Not used in the current version of the tutorial.
  • mode of operation (0:classifier or 1:object detection). Only taken into account for formatting the display on the console window. Currently only 0:classifier is supported.
  • processing_core_mode: Specify how the network will be processed if multiple processing cores exist in the system. 0 (default): all cores can be utilized according to each layer's groupID. If a layer's group ID is 1 then it will run on EVE1. If it is 2, it will run on DSP1. 1: The entire network will run on EVE1, even the layers which have group ID 2 (DSP layers). 2: The entire network will run on DSP1, even the layers which have group ID 1 (EVE layers).

    All paths are relative to the test_data folder

    Using the parameters from the configuration file, vx_tutorial_tidl() will then apply the network model on the input data and display the result on the console window, which consists of the classification top-5 results.

    In this tutorial we learn the below concepts:

  • How to create OpenVX context, OpenVX user data object and OpenVX tensor objects.
  • How to read a data file and load the values into the user data object
  • How to read a data file and load the values into a tensor object
  • How to create OpenVX node and associate it with previously created graph
  • How to schedule OpenVX graph for execution then execute the graph
  • How to cleanup all created resources and exit the OpenVX application

To include OpenVX interfaces include below file

#include <VX/vx.h>

Follow the comments in the function vx_tutorial_tidl() to understand this tutorial

Definition in file vx_tutorial_tidl.c.