Tengine icon indicating copy to clipboard operation
Tengine copied to clipboard

Khadas VIM3 - Kernel panic when running example

Open arthurgassner opened this issue 2 years ago • 0 comments

Hi everyone,

I am trying to run the build/examples/tm_classification_timvx on my Khadas VIM3 board.

I have set up the board by running

# Setup TIM-VX
git clone https://github.com/VeriSilicon/TIM-VX.git
cd TIM-VX && git checkout 68b5acb && cd ..

# Setup tengine-lite
git clone https://github.com/OAID/Tengine.git tengine-lite

# Setup Khadas VIM3 platform
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

cd ~/tengine-lite
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

# Run cross-compilation
export LD_LIBRARY_PATH=/home/khadas/tengine-lite/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 ..
make -j4
make install

However, when running the example, I get the following

-> % ./build/examples/tm_classification_timvx -m models/squeezenet_uint8.tmfile -i images/dog.jpg -r 1 -s 0.017,0.017,0.017 -r 1
Image height not specified, use default 227
Image width not specified, use default  227
Mean value not specified, use default   104.0, 116.7, 122.7
tengine-lite library version: 1.5-dev

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1925.911562@4] Internal error: Oops: 96000005 [#2] PREEMPT SMP

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.226572@4] Process tm_classificati (pid: 16952, stack limit = 0xffffff802042c000)

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.234285@4] Stack: (0xffffff802042faf0 to 0xffffff8020430000)

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.240179@4] fae0:                                   ffffff802042fbb0 ffffff8002659048

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.248152@4] fb00: ffffffc099286000 ffffff802042fc58 0000000000000004 0000000000000000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.256125@4] fb20: ffffff802042fc30 ffffff80091ce540 0000000000000002 000000000000400f

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.264098@4] fb40: 0000000000000081 0000000000000000 0000000000000000 ffffff800ac445d0

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.272072@4] fb60: 00000000024200ca 00004238024200ca 0000000000000000 ffffffc08c665400

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.280045@4] fb80: 0000000000000000 0000000000000000 0000000000000000 ffffffc08ae69880

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.288018@4] fba0: 0000007feed8d4da 0000000000000001 ffffff802042fbf0 ffffff80026510cc

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.295992@4] fbc0: ffffffc08c4e4200 00000000000001a8 ffffffc07efba000 0000000000000001

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.303965@4] fbe0: 0000000000000001 0000000000000000 ffffff802042fe00 ffffff8009255598

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.311938@4] fc00: 0000000000007530 ffffffc095109500 0000007feed8bc10 ffffffc0995bf368

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.319911@4] fc20: 0000000000000006 ffffff800950b2d0 0000000000000000 0000007feed8bc68

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.327886@4] fc40: 00000000000001a8 0000007feed8bc68 00000000000001a8 0000000400000002

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.335858@4] fc60: 0000007f00000055 00000000b314d100 000000556c41a000 fffffffffffff000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.343832@4] fc80: 000000000000005d 0000007fb1bb48b0 0000000000003000 000000000000005e

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.351805@4] fca0: 0000007feed8bd70 0000007fb305c934 0000007fb314da60 0000000000000004

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.359778@4] fcc0: 0000007fb37d0710 0000007fb37d0760 0000000000000050 000000556c407880

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.367752@4] fce0: 000000556c4180d0 0000007feed8c060 000000556c416590 0000000000000000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.375725@4] fd00: 0000007fb1bb4950 0000007fb314da60 0000000000000002 0000000000000000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.383698@4] fd20: 0000003000000002 0000000000000000 0000000000000000 0000000000000000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.391672@4] fd40: 0000007c00000077 0000005b0000006e 0000000000000000 0000000000000000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.399645@4] fd60: 0000007feed8bdb0 0000007fb1bafab4 0000007fb1bfb688 000000556c3e9ef0

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.407619@4] fd80: 0000000000000228 0000000000000004 0000007fb1bc9000 0000000000000000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.415592@4] fda0: 0000007feed8be00 0000007fb1bafb88 0000007feed8beb8 0000007feed8bf98

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.423565@4] fdc0: 0000000000000000 0000000000000000 0000000000000001 0000007fb1bb4a28

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.431538@4] fde0: 0000007feed8c040 0000000000000081 0000007feed8be10 0000007fb1a9bb80

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.439512@4] fe00: ffffff802042fe80 ffffff8009255dec 0000000000000000 ffffffc095109501

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.447485@4] fe20: ffffffc095109500 0000000000000006 0000000000007530 0000000000000006

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.455459@4] fe40: ffffff802042fe80 ffffff8009255db0 fffffffffffffee2 ffffffc095109501

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.463432@4] fe60: ffffffc095109500 0000000000000006 0000000000007530 000000556c41a000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.471405@4] fe80: 0000000000000000 ffffff8009083b40 fffffffffffffee2 0000004095d42000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.479379@4] fea0: ffffffffffffffff 0000007fb30acb5c 0000000020000000 0000000000000015

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.487352@4] fec0: 0000000000000006 0000000000007530 0000007feed8bc10 0000007fb2fc72e8

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.495325@4] fee0: 0000000000000001 00000000000001a8 0000007fb1bfb688 0000000000000003

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.503299@4] ff00: 000000000000001d 0000000000000088 00000000008888a6 00000000aaa22a22

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.511272@4] ff20: 000000000000000a 0000000000000001 0000000000000101 000000556c404350

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.519245@4] ff40: 0000007fb1bcacc8 0000007fb30acb50 0000000000000000 0000000000002710

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.527218@4] ff60: 0000000000007530 0000007fb1bfb688 0000007feed8bc10 0000007feed8bc68

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.535192@4] ff80: 00000000000001a8 0000007feed8c040 0000007feed8c060 000000556c416590

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.543165@4] ffa0: 0000000000000000 0000007feed8bbc0 0000007fb1bb1078 0000007feed8bbc0

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.551138@4] ffc0: 0000007fb30acb5c 0000000020000000 0000000000000006 000000000000001d

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.559112@4] ffe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000

Message from syslogd@localhost at Feb  8 16:24:48 ...
 kernel:[ 1926.701163@4] Code: f2e000a0 b9000e93 a9020281 17ffffd2 (f9400ea0) 

Has anyone encountered this issue?

Thank you for your time :)

arthurgassner avatar Feb 08 '22 16:02 arthurgassner