TimVX is not working

Hey guys, I’m using Khadas Vim3 pro and decided to run TimVX tool to use my gpu and npu.
But after I made everything from your tutorial in github, I got the error while checking the result of your demo:


Text: Error, not found chip def: ChipID:0x0, ChipVersion:0x0, ProductID:0x0, EcoID:0x0, CustomerID:0x0! tm_yolov5s_timvx: nnArchPerf.cpp:7187: void* CreateAPModel(APM_IN_PARAM_T): Assertion `0' failed. Aborted

Also make sure that your models and weights are correct because while testing your demo yolov5s on CPU it failed with error

Please find time to answer it, because I’m coping with this problem already few days

Also this are the installation commands I’ve used:


git clone https://github.com/VeriSilicon/TIM-VX.git
cd TIM-VX && git checkout 68b5acb && cd ..
 
wget -c https://github.com/VeriSilicon/TIM-VX/releases/download/v1.1.28/aarch64_A311D_D312513_A294074_R311680_T312233_O312045.tgz && tar zxvf aarch64_A311D_D312513_A294074_R311680_T312233_O312045.tgz && mv aarch64_A311D_D312513_A294074_R311680_T312233_O312045 prebuild-sdk-a311d && rm aarch64_A311D_D312513_A294074_R311680_T312233_O312045.tgz
cd <tengine-lite-root-dir>
mkdir -p ./3rdparty/tim-vx/lib/aarch64
mkdir -p ./3rdparty/tim-vx/include
cp -rf ../TIM-VX/include/*    ./3rdparty/tim-vx/include/
cp -rf ../TIM-VX/src    ./source/device/tim-vx/
cp -rf ../prebuild-sdk-a311d/include/*    ./3rdparty/tim-vx/include/
cp -rf ../prebuild-sdk-a311d/lib/*    ./3rdparty/tim-vx/lib/aarch64/
rm ./source/device/tim-vx/src/tim/vx/*_test.cc
export LD_LIBRARY_PATH=<tengine-lite-root-dir>/3rdparty/tim-vx/lib/aarch64
cd <tengine-lite-root-dir>
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-linux-gnu.toolchain.cmake -DTENGINE_ENABLE_TIM_VX=ON -DTIM_VX_ENABLE_TEST=ON ..
make -j4```

I also want to mark that in your instruction topic the version of your git was 1.2, here is 1.5
Plus maybe it’s something with TimVX version how do you think?

@numbqq

Which os and kernel are you using?

Anyway, I don’t think the framework is working. Here is my post Mainline kernel Tengine timvx models freezes the board, everytime I run the NPU it freezes.

Maybe I’ve found the solution
Which instructions did you use to work with npu?

./build/install/bin/tm_classification_timvx -m mobilenet_uint8.tmfile -i images/cat.jpg invoking a binary ending with timvx will use the NPU.