TI Deep Learning Product User Guide
|
By default, TIDL release includes all required pre-built libraries & executables. If there is no code change, you don't need to rebuild it. If code is changed or you want to debug step by step, you can rebuild it by following instructions given in this user guide
Please refer Validation Information section in the TIDeepLearningProduct_ReleaseNotes.html.
Before proceeding, please download all the dependent software components
Please note that PDK is a dependency for TIDL and it is available in SDK package. It is expected that user has already built PDK before building TIDL or using pre-built libraries. User should refer to SDK documentation for any issues with PDK build.
Description here assumes Open CV 4.1.0, but user must make appropriate changes as per the mentioned version in dependent software components
run "unzip opencv-4.1.0.zip" Install cmake if it not available in the system"sudo apt install cmake"
Use below CMake options to in "opencv-4.1.0/cmake" folder. And run "make" from same folder
Description here assumes protobuf 3.11.3, but user must make appropriate changes as per the mentioned version in dependent software components.
Extract the source "tar -xzvf protobuf-3.11.3.tar.gz"
Run below Configure command in "protobuf-3.11.3" folder and rum "make" from the same folder
Description here assumes protobuf 1.12.0, but user must make appropriate changes as per the mentioned version in dependent software components.
Run the following steps to build flatbuffers:
unzip v1.12.0.zip cd flatbuffers-1.12.0 cmake -G "Unix Makefiles" -DCMAKE_POSITION_INDEPENDENT_CODE=ON make
This dependency is needed for Tensorflow-lite runtime specific builds.
cd ${PSDKRA_PATH} git clone --depth 1 --single-branch -b tidl-j7 https://github.com/TexasInstruments/tensorflow.git
This dependency is needed for ONNX runtime specific builds.
cd ${PSDKRA_PATH} git clone --depth 1 --single-branch -b tidl-j7 https://github.com/TexasInstruments/onnxruntime.git
This dependency is needed for TVM/Neo-AI-DLR specific builds.
cd ${PSDKRA_PATH} git clone --single-branch -b tidl-j7 https://github.com/TexasInstruments/tvm cd tvm git submodule init git submodule update --init --recursive
Note
Note : If you are building the OpenCV and ProtoBuf in Windows machine. Enable the corresponding flag from CMake wizard..
gmake can be used from CCS for windows building
In some of the old machines, user many observe "Illegal Instruction" error while importing model or performing inference on PC. This is observed because of new x86_64 instruction used in the pre-built binaries. To overcome this, user would need to re-built the TIDL-RT host emulation executable by executing below command
Build system of TIDL-RT software assumes below environment variables being available in the system. Set below environment variables or modify “makerules/config.mk”. Most of these components except described in dependent software components are part of SDK.
Environment Variable | Description |
---|---|
IVISION_PATH | Directory pointing to ivision package in SDK |
DSP_TOOLS | Directory pointing to C7x CG tool |
MMALIB_PATH | Directory pointing to MMA LIB Package (Only needed for TI_DEVICE Build) |
PDK_INSTALL_PATH | Directory pointing to PDK Package, Default Path refers to pdk in PSDK_INSTALL_PATH, create a symbolic link to pdk_xx_xx_xx_xx with pdk |
TIDL_PROTOBUF_PATH | Directory pointing to Protobuf package (for Import tool only) |
TIDL_FLATBUF_PATH | Directory pointing to Flatbuffers package (for Import tool only) |
TIDL_OPENCV_PATH | Directory pointing to openCV package (for Test bench Only) |
UTILS_PATH | Directory pointing to utils command like mkdir, rm (can be found inside CCS installation CCS_INSTALLATION_DIR/ccs/utils/cygwin. Required only for Windows builds |
Please note that user should use "make" utility for building on Linux whereas "gmake" should be used for Windows. Also executable for Linux have type .out whereas the one for Windows have added .exe in executable name. For simplicity make and .out is used in below section.
Run “make TARGET_PLATFORM=PC” from ${TIDL_INSTALL_PATH}
folder to build PC tools
make gv all TARGET_PLATFORM=PC
. This will also generate the graph visulization toolRun “make” from ${TIDL_INSTALL_PATH}
folder to build the test bench for target
Use "TARGET_BUILD=debug" to build debug binaries
Pre-requisite : Above TIDL-RT build commands must be executed before running these commands. Note : These builds are supported only on LINUX platform, not supported for Windows.
Following commands can be used to build import tool for open source runtimes.
Tensorflow-lite runtime:
ONNX runtime:
TVM/Neo-AI-DLR: