BYOC & tvm.relay.backend segv

Hi All,

I’m getting a segv while trying to use a bog standard yolo-v4 (tflite) model with BYOC and Arm ACL (version 21.11), hardware is an M1 Mac Pro, Debian linux in parallels, aarch64…

Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
Core was generated by `python3 yolo-v4-acl.py'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000ffffb3779df0 in void arm_compute::cpu::add_same_neon<float>(arm_compute::ITensor const*, arm_compute::ITensor const*, arm_compute::ITensor*, arm_compute::ConvertPolicy const&, arm_compute::Window const&) ()
   from /home/tgall/Compute/arm_compute-v21.11-bin-linux-arm64-v8.2-a-neon/lib/libarm_compute.so
[Current thread is 1 (Thread 0xffff9e0431e0 (LWP 17295))]

We’re in a worker thread: (gdb) bt #0 0x0000ffffb3779df0 in void arm_compute::cpu::add_same_neon(arm_compute::ITensor const*, arm_compute::ITensor const*, arm_compute::ITensor*, arm_compute::ConvertPolicy const&, arm_compute::Window const&) () from /home/tgall/Compute/arm_compute-v21.11-bin-linux-arm64-v8.2-a-neon/lib/libarm_compute.so #1 0x0000ffffb34499d4 in std::_Function_handler<void (arm_compute::ThreadInfo const&), arm_compute::IScheduler::schedule_common(arm_compute::ICPPKernel*, arm_compute::IScheduler::Hints const&, arm_compute::Window const&, arm_compute::ITensorPack&)::{lambda(arm_compute::ThreadInfo const&)#2}>::_M_invoke(std::_Any_data const&, arm_compute::ThreadInfo const&) () from /home/tgall/Compute/arm_compute-v21.11-bin-linux-arm64-v8.2-a-neon/lib/libarm_compute.so #2 0x0000ffffb3466470 in arm_compute::(anonymous namespace)::thread::worker_thread() () from /home/tgall/Compute/arm_compute-v21.11-bin-linux-arm64-v8.2-a-neon/lib/libarm_compute.so #3 0x0000ffffb310e1f4 in ?? () from /lib/aarch64-linux-gnu/libstdc++.so.6 #4 0x0000ffffbcc137e4 in start_thread (arg=0xffffe611eedf) at pthread_create.c:486 #5 0x0000ffffbca18adc in thread_start () at …/sysdeps/unix/sysv/linux/aarch64/clone.S:78

Then looking at the assembler |0x0000ffffb3779de0 <+3208>:|ldr|x0, [x29, #768]| |—|—|—| | 0x0000ffffb3779de4 <+3212>:|add|x6, x9, x6| | 0x0000ffffb3779de8 <+3216>:|ldr|x2, [x29, #872]| | 0x0000ffffb3779dec <+3220>:|ldr|x3, [x29, #976]| |=> 0x0000ffffb3779df0 <+3224>:|ldr|s2, [x15, x0]| | 0x0000ffffb3779df4 <+3228>:|add|x2, x22, x2| | 0x0000ffffb3779df8 <+3232>:|add|x4, x25, x3| | 0x0000ffffb3779dfc <+3236>:|add|x2, x23, x2| | 0x0000ffffb3779e00 <+3240>:|add|x4, x24, x4| | 0x0000ffffb3779e04 <+3244>:|cmp|w30, w26| | 0x0000ffffb3779e08 <+3248>:|dup|v1.4s, v2.s[0]|

X15 and X0 are both 0x0

@ramana-arm @gromero I’ll drop in the python code that reproduces this. Need to make it a bit more simple.

yes, please do - I have a patch to migrate to 21.11 anyway which I’ve been testing . Can you point at the yolov4 tflite model you are using ?

Ramana