![]() |
TI Deep Learning Library 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 TIDeepLearningLibrary_ReleaseNotes.html.
Build system of TIDL software assumes below environment variables being available in the system. Set below environment variables or modify “makerules/config.mk”
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 use 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
Please note that PDK is a dependency for TIDL. 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.
Download open CV Source from : https://github.com/opencv/opencv/archive/3.1.0.zip run "unzip opencv-3.1.0.zip" Install cmake if it not available in the system"sudo apt install cmake"
Use below CMake options to in "opencv-3.1.0/cmake" folder. And run "make" from same folder
Download ProtoBuf source: https://github.com/protocolbuffers/protobuf/releases/download/v3.5.1/protobuf-cpp-3.5.1.tar.gz
Extract the source "tar -xzvf protobuf-3.5.1.tar.gz"
Run below Configure command in "protobuf-3.5.1" folder and rum "make" from the same folder
Download flatbuffers from here : https://github.com/google/flatbuffers/archive/v1.12.0.zip 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
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 running 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 PC executable by running below command