DRP-AI TVM Application Development

From Renesas.info
Revision as of 21:42, 22 March 2023 by Zkmike (talk | contribs) (Zkmike moved page DRP-AI TVM Application Developemn to DRP-AI TVM Application Development: The title is wrong)

General Information

This is a sumary of how to run a TVM model on the RZV board. The code snippest are based on the TVM Tutorial Application that can be found here.  The TMV Runtime Inference API is part of the EdgeCortix MERA software. The API for the EdgeCortix MERA softwre is defined in the header file MeraDrpRuntimeWrapper.h. The DRP-AI pre-processing is defined in the TVM Applicaton Document appendix here .


It is requred that TVM applications be deployed as follows.

/
├── usr
│   └── lib64
│       └── libtvm_runtime.so
└── home
    └── root
        └── tvm
            ├── preprocess_tvm_v2ma
            │   ├── drp_param.bin
            │   ...
            │   └── preprocess_tvm_v2ma_weight.dat
            ├── resnet18_onnx
            │   ├── deploy.json
            │   ├── deploy.params
            │   └── deploy.so
            ├── sample.yuv
            ├── synset_words_imagenet.txt
            └── tutorial_app
  • libtvm_runtime.so
    • This is the TVM Runtime Library.
    • This is required to run any TVM AI Models.
    • This file is located ${TVM_ROOT}/obj/build_runtime (RZV2L, RZV2M,RZV2MA)
  • preprocess_tvm_v2xx
    • This is the pre-compiled DRP pre-processsing files. This is required to run the pre-process code on
    • The name of the direcory depends on the RZV MPU used ( _v2xx = l, m, or ma )
    • These directories are located : ${TVM_HOME}/app/exe
    • Only the the directory for your MPU needs to be compied. (i.e. the example above only copies the v2ma directory)
  • xxxxxxx_onnx directory
    • This is the location output files of the TVM Translator
    • The name of the directory
  • Application
  • Optional files: These files depend on the Model used
    • sample.yuv
      • This is the input YUV image used for TVM tutorial applicaion demo.
    • synset_words_imagenet.txt
      • This text file list the names of the Resnet classifications. This is used for post-processing to display the name

Initialization