TI Deep Learning Product User Guide
|
TIDL-RT release include import tool source code. Users can modify the code and recompile it to implement their own design.
Different deep learning framework will generate model format to describe their models. TIDL-RT inference engine understands TI's internal model exchange format (net bin file) to describe the deep learning models. The import tool is to translate/convert/import different file type to a TI's model exchange format. Import tool utilize understanding of underneath device knowledge to optimize the users model for best inference time on the device. Import tool also calls the Quantizer and Graph compiler tools to do range collection and device specific optimization.
TIDL-RT inference engine supports many of the popular layers/operations involved in deep neural networks. For new layer/operators which can be converted to supported layers/operators, users can modify the source code of this tool to enable them. Users can easily adapt this tool to customize add support for any un-supported model exchange format (see here for supported model format).
TIDL import tool is at below path in TIDL release package::
├── ti_dl # TIDL release package │ ├── utils # Utilities │ │ ├── tidlModelImport # Import tool │ │ │ └── ti_dl.h # Import tool intermediate structure │ │ │ └── tidl_caffeImport.cpp # Old caffe import code, default unused, keep for fail backup. │ │ │ └── tidl_caffeImport_param.cpp # New caffe import code for map functions. │ │ │ └── tidl_caffeImport_param.h │ │ │ └── tidl_caffeImport_v2.cpp # New caffe import code for net searching. │ │ │ └── tidl_import_common.cpp # Common code for layer merging, reshape functions, utilities. │ │ │ └── tidl_import_common.h │ │ │ └── tidl_import_common_model_check.cpp # Common code for model sanity check. │ │ │ └── tidl_import_common_model_check.h │ │ │ └── tidl_import_config.cpp # Common code for parsing import config file. │ │ │ └── tidl_import_config.h │ │ │ └── tidl_import_include.h │ │ │ └── tidl_import_main.cpp # Main function of Import tool │ │ │ └── tidl_onnxImport.cpp # ONNX import code │ │ │ └── tidl_tfImport.cpp # Tensorflow import code │ │ │ └── tidl_tfLiteImport.cpp # tfLite import code │ │ │ └── tidl_tfMetaArchImport.cpp # MetaArch code
Following flow shows the main execution flow of TIDL import tool(tidl_import_main.cpp).
Following flow shows the internal execution flow of import process(same import flow for different framework).