Hi,
We are using ArmNN to cross-compile a standalone C++ application on Linux that loads a standard onnx model. During the model loading, we see a crash with the below error output -
terminate called after throwing an instance of 'armnn::InvalidArgumentException' what(): Tensor numDimensions must be greater than 0
Initially we were on armnn master, and later we switched to tag v19.05, but the error was same for both.
Below is the code snippet to load the model - armnnOnnxParser::IOnnxParserPtr parser = armnnOnnxParser::IOnnxParser::Create(); std::cout << "\nmodel load start"; armnn::INetworkPtr network = parser->CreateNetworkFromBinaryFile("onnx_3DDFA.onnx"); std::cout << "\nmodel load end";
It crashes after printing "model load start" with the error message printed above.
A gdb backtrace is also provided below - (gdb) r Starting program: /home/root/Rahul/armnn_onnx/3DDFA_ArmNN_onnx/3ddfa_armnn_onnx [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1".
terminate called after throwing an instance of 'armnn::InvalidArgumentException' what(): Tensor numDimensions must be greater than 0 model load start Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at /usr/src/debug/glibc/2.26-r0/git/sysdeps/unix/sysv/linux/raise.c:51 51 } (gdb) bt #0 __GI_raise (sig=sig@entry=6) at /usr/src/debug/glibc/2.26-r0/git/sysdeps/unix/sysv/linux/raise.c:51 #1 0x0000ffffbe41df00 in __GI_abort () at /usr/src/debug/glibc/2.26-r0/git/stdlib/abort.c:90 #2 0x0000ffffbe6aa0f8 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6 #3 0x0000ffffbe6a7afc in ?? () from /usr/lib/libstdc++.so.6 #4 0x0000ffffbe6a7b50 in std::terminate() () from /usr/lib/libstdc++.so.6 #5 0x0000ffffbe6a7e20 in __cxa_throw () from /usr/lib/libstdc++.so.6 #6 0x0000ffffbefdad84 in armnn::TensorShape::TensorShape(unsigned int, unsigned int const*) () from /home/root/Rahul/armnn_onnx/build/libarmnn.so #7 0x0000ffffbe7e34d8 in armnnOnnxParser::(anonymous namespace)::ToTensorInfo(onnx::ValueInfoProto const&) [clone .constprop.493] () from /home/root/Rahul/armnn_onnx/build/libarmnnOnnxParser.so #8 0x0000ffffbe7e4080 in armnnOnnxParser::OnnxParser::SetupInfo(google::protobuf::RepeatedPtrFieldonnx::ValueInfoProto const*) () from /home/root/Rahul/armnn_onnx/build/libarmnnOnnxParser.so #9 0x0000ffffbe7e41ac in armnnOnnxParser::OnnxParser::LoadGraph() () from /home/root/Rahul/armnn_onnx/build/libarmnnOnnxParser.so #10 0x0000ffffbe7e4760 in armnnOnnxParser::OnnxParser::CreateNetworkFromModel(onnx::ModelProto&) () from /home/root/Rahul/armnn_onnx/build/libarmnnOnnxParser.so #11 0x0000ffffbe7e49b0 in armnnOnnxParser::OnnxParser::CreateNetworkFromBinaryFile(char const*) () from /home/root/Rahul/armnn_onnx/build/libarmnnOnnxParser.so #12 0x0000000000402290 in main () (gdb)
Can someone point out if we are missing something out or doing something wrong? Any help or input is highly appreciated.
Regards, Rahul