Network Compilation fails on RPi4 with RPC

Hi, I wanted to run a benchmark on the raspberry pi 4, using a RPCSession and the debug runtime. For this I am using the MXNet model zoo. However some of these networks cannot be compiled for the RPi4 as it fails with

RPCError: Error caught from RPC call:
RuntimeError: Compilation error:
/usr/bin/ld: BFD (GNU Binutils for Raspbian) 2.31.1 assertion fail ../../bfd/elf32-arm.c:9853
/usr/bin/ld: BFD (GNU Binutils for Raspbian) 2.31.1 assertion fail ../../bfd/elf32-arm.c:9853
/usr/bin/ld: BFD (GNU Binutils for Raspbian) 2.31.1 assertion fail ../../bfd/elf32-arm.c:9853
/usr/bin/ld: BFD (GNU Binutils for Raspbian) 2.31.1 assertion fail ../../bfd/elf32-arm.c:9853
collect2: error: ld returned 1 exit status

Command line: g++ -shared -fPIC -o /tmp/tmphyiku5p6/net.tar.so /tmp/tmphyiku5p6/net/devc.o /tmp/tmphyiku5p6/net/lib0.o

The networks are:

  • resnet34_v1
  • resnet101_v1
  • resnet152_v1
  • resnet34_v2
  • resnet101_v2
  • resnet152_v2
  • vgg11
  • vgg13
  • vgg16
  • vgg19
  • vgg11_bn
  • vgg13_bn
  • vgg16_bn
  • vgg19_bn

I suspect the reason could be the 32-bit operating system of the RPi4, but might be totally wrong here…

Perhaps this is due to a different target triple? You might want to query your target triple via g++ --verbose. The target for 32bit and 64bit are different.

See tvm/target.py at main · apache/tvm · GitHub

rasp4b and rasp4b64

1 Like

I am using target = tvm.target.arm_cpu("rasp4b") to target the raspberry pi and it is working for the other test networks (resnet18, mobilenet, alexnet, …), but I will try it with the 64-bit beta OS and an verbose settings.

1 Like

Glad it works for you

ok,

the problem seems to be the 32-bit operating system. I am not sure, if it is a TVM problem or a raspbian problem, as it worked with the rpi4b64 target and raspbian os in the 64-bit beta version.