TI Deep Learning Library User Guide
|
TIDL releases include import tool source code. Any user can change the code and recompile it to implement their own design.
TIDL import process contains following steps(All these steps are done within one command line, import tool will handle all automatically):
Different deep learning framework will generate different file type to describe models. TIDL library accept TI format deep learning model describe file. This import tool is to translate/convert/import different file type to a universal descriptor. And this tool will utilize all the acceleration mechanism to optimize input model. After import, quant tool & network compiler tool will be called to do range collection & optimization.
TIDL library has already supported some popular layers/operations. For new layer/operators which can be converted to supported layers/operators, users can modify the source code of this tool to enable them. Also, users can easily adapt this tool to his customized training framework.
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).