Tengine icon indicating copy to clipboard operation
Tengine copied to clipboard

[Need Help] onnx2tengine: failed to convert mobilenetv2 model

Open fengwang opened this issue 2 years ago • 2 comments

Environment

uname -a && gcc -v                                                                                                                                                               
Linux hp-omen 5.15.12-arch1-1 #1 SMP PREEMPT Wed, 29 Dec 2021 12:04:56 +0000 x86_64 GNU/Linux
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.1.0 (GCC) 

Reproduction

git clone https://github.com/OAID/Tengine.git --depth 1 && cd Tengine && mkdir build && cd ./build && cmake .. -DTENGINE_BUILD_BENCHMARK=OFF -DTENGINE_BUILD_EXAMPLES=OFF -DTENGINE_OPENMP=OFF -DTENGINE_ONLINE_REPORT=OFF -DTENGINE_BUILD_CONVERT_TOOL=ON && make -j8 VERBOSE=1 && make install wget https://github.com/onnx/models/raw/master/vision/classification/mobilenet/model/mobilenetv2-7.onnx && ./install/bin/convert_tool -f onnx -m ./mobilenetv2-7.onnx -o ./mobilenetv2-7.tmfile

Output:


---- Tengine Convert Tool ---- 

Version     : v1.0, 10:14:15 Jan 19 2022
Status      : float32

----------onnx2tengine begin----------
Model op set is: 10
[1]    783719 segmentation fault (core dumped)  ./install/bin/convert_tool -f onnx -m ./mobilenetv2-7.onnx -o 

fengwang avatar Jan 19 '22 09:01 fengwang

A quick debug shows the problem comes from this line: https://github.com/OAID/Tengine/blob/tengine-lite/source/graph/graph.c#L256 , when the node type is Reshape, and the node index in the graph is 211.

fengwang avatar Jan 19 '22 09:01 fengwang

solved?

twmht avatar Mar 15 '22 03:03 twmht