diff --git a/doc/docs_en/source_compile/compile_timvx.md b/doc/docs_en/source_compile/compile_timvx.md index 68a90b8ee09695752ec1bef90ccecf755b0a5f85..713f866abd82b96fc350450b9134971c6ab54fb3 100644 --- a/doc/docs_en/source_compile/compile_timvx.md +++ b/doc/docs_en/source_compile/compile_timvx.md @@ -10,17 +10,19 @@ Tengine Lite has supported to integrate with TIM-VX Library of Verisilicon to in For some special reasons, only supported on Khadas VIM3 or x86_64 simulator to work the following steps, currently. -### Download Source code of TIM-VX +### Download Source code of TIM-VX + +TIM-VX is updated very frequently, and the latest compatible version is `68b5acb`. ```bash $ git clone https://github.com/VeriSilicon/TIM-VX.git +$ cd TIM-VX && git checkout 68b5acb && cd .. ``` ### Download Tengine Lite ```bash $ git clone https://github.com/OAID/Tengine.git tengine-lite -$ cd tengine-lite ``` ### 2.1 Prepare for x86_64 simulator platform @@ -118,3 +120,41 @@ $ mkdir build && cd build $ cmake -DTENGINE_ENABLE_TIM_VX=ON .. $ make -j4 ``` + + +### 2.3 Prepare for NXP i.MX 8M Plus Linux latform + +It is highly recommended to compile Tengine natively rather than cross-compiling. + +#### 2.4.1 Prepare 3rd-party library + +```bash +wget -c https://github.com/VeriSilicon/TIM-VX/releases/download/v1.1.28/aarch64_S905D3_D312513_A294074_R311680_T312233_O312045.tgz && tar xvf aarch64_S905D3_D312513_A294074_R311680_T312233_O312045.tgz && mv aarch64_S905D3_D312513_A294074_R311680_T312233_O312045 prebuild-sdk-s905d3 +``` + +#### 2.4.2 Prepare source files + +Suppose you have the following dependencies in a same directory: + +``` +. +├── tengine-lite +└── TIM-VX +└── prebuild-sdk-s905d3 +``` + +Then you can prepare the source files in the following way: + +```bash +cd tengine-lite && mkdir -p ./source/device/tim-vx/ && /bin/cp -rf ../TIM-VX/include ./source/device/tim-vx/ && /bin/cp -rf ../TIM-VX/src ./source/device/tim-vx/ && mkdir -p ./3rdparty/tim-vx/include && mkdir -p ./3rdparty/tim-vx/lib/aarch64 && /bin/cp -rf ../prebuild-sdk-s905d3/include/* ./3rdparty/tim-vx/include/ +``` + +#### 2.4.3 Build Tengine + + +```bash +mkdir -p build && cd ./build && cmake -DTENGINE_ENABLE_TIM_VX=ON .. && make -j4 VERBOSE=1 && make install +``` + +You will find `libengine-lite.so` from the install directory. And example applications are possible to run. + diff --git a/tools/save_graph/tm2_op_save.hpp b/tools/save_graph/tm2_op_save.hpp index 79456b6469c779c1c8679210200edb0ff83a5f03..e5cdc7f56edced231aca225472c167a3757e05ad 100644 --- a/tools/save_graph/tm2_op_save.hpp +++ b/tools/save_graph/tm2_op_save.hpp @@ -2,6 +2,7 @@ #define __TM2_OP_SAVE_HPP__ #include +#include extern "C" { #include "utility/vector.h" #include "serializer/tmfile/tm2_format.h"