tensorflow: Run MIRNet and get Segment Fault on Raspberry Pi Model 3B
Run MIRNet and get Segment Fault on Raspberry Pi Model 3B. The tflite model I used is from dynamic_shape and named mirnet_dr.tflite. Following is the error info from my binary built from our repo:
#0 0x003648dc in ruy::TrMul(ruy::Ctx*, ruy::TrMulParams*) ()
#1 0x0035fd84 in ruy::MulFrontEndFromTrMulParams(ruy::Ctx*, ruy::TrMulParams*) ()
#2 0x00095c84 in void ruy::MulFrontEnd<(ruy::Path)17, signed char, signed char, int, int>(ruy::Mat<signed char> const&, ruy::Mat<signed char> const&, ruy::MulParams<int, int> const&, ruy::Ctx*, ruy::Mat<int>*) ()
#3 0x00091918 in void ruy::Mul<(ruy::Path)17, signed char, signed char, int, int>(ruy::Matrix<signed char> const&, ruy::Matrix<signed char> const&, ruy::MulParams<int, int> const&, ruy::Context*, ruy::Matrix<int>*) ()
#4 0x0033ba00 in tflite::tensor_utils::NeonCpuBackendGemm(signed char const*, int const*, signed char const*, int, int, int, int, int*, tflite::CpuBackendContext*) ()
#5 0x0033ba88 in tflite::tensor_utils::NeonMatrixBatchVectorMultiplyAccumulate(signed char const*, int, int, signed char const*, float const*, int, int*, float*, tflite::CpuBackendContext*) ()
#6 0x000f0c74 in tflite::optimized_ops::HybridConv(tflite::ConvParams const&, float*, tflite::RuntimeShape const&, signed char const*, tflite::RuntimeShape const&, signed char const*, tflite::RuntimeShape const&, float const*, tflite::RuntimeShape const&, int*, tflite::RuntimeShape const&, float*, tflite::RuntimeShape const&, signed char*, tflite::CpuBackendContext*) ()
#7 0x001088c4 in TfLiteStatus tflite::ops::builtin::conv::EvalHybrid<(tflite::ops::builtin::conv::KernelType)2>(TfLiteContext*, TfLiteNode*, TfLiteConvParams*, tflite::ops::builtin::conv::OpData*, TfLiteTensor const*, TfLiteTensor const*, TfLiteTensor const*, TfLiteTensor*, TfLiteTensor*, TfLiteTensor*) ()
#8 0x000fe188 in TfLiteStatus tflite::ops::builtin::conv::EvalImpl<(tflite::ops::builtin::conv::KernelType)2, (TfLiteType)1>(TfLiteContext*, TfLiteNode*) ()
#9 0x000f68dc in TfLiteStatus tflite::ops::builtin::conv::Eval<(tflite::ops::builtin::conv::KernelType)2>(TfLiteContext*, TfLiteNode*) ()
#10 0x00391c6c in tflite::Subgraph::OpInvoke(TfLiteRegistration const&, TfLiteNode*) ()
#11 0x0038e940 in tflite::Subgraph::Invoke() ()
#12 0x0039e354 in tflite::Interpreter::Invoke() ()
#13 0x0001ff24 in mirnet::MIRNet::RunInference(cv::Mat const&, cv::Mat&) ()
#14 0x00020188 in mirnet::MIRNet::EnhanceImage(cv::Mat const&, cv::Mat&) ()
#15 0x0001c5d0 in main ()
BTW, it also was crash with minimal.cc examples from tflite repo, please take a check. Thanks.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (7 by maintainers)
Sorry for the late reply. I also had a segfault issue recently with a very similar stack trace. And it turned out to be caused by an int overflow when handling very large tensors in the RUY library. A fix is WIP. After it’s pushed, pls patch it and see if this happened again or not.