[Arm NN on Cortex-A9] Static build leads to "None of the preferred backends [CpuRef ] are supported" error at runtime

Hello ArmNN experts,
I'm currently facing an issue at runtime when using a statically built ArmNN lib.

I have been able to build a STATIC version of libarmnn with all dependancies and then build my own app for a Wandboard target (armv7).
At runtime I got this error: "ERROR: None of the preferred backends [CpuRef ] are supported. Current platform provides []"

When I compile SHARED libraries (*.so) the exact same app is running fine, and the inference is done as expected.

ArmNN version: 21.02
Model/Target: TFLite on armv7
Build options: cmake .. -DCMAKE_LINKER=/usr/bin/arm-linux-gnueabihf-ld -DCMAKE_C_COMPILER=/usr/bin/arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=/usr/bin/arm-linux-gnueabihf-g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS=-mfpu=neon -DARMCOMPUTE_ROOT=$BASEDIR/ComputeLibrary -DARMCOMPUTE_BUILD_DIR=$BASEDIR/ComputeLibrary/build -DBOOST_ROOT=$BASEDIR/boost_1_64_0 -DTF_GENERATED_SOURCES=$BASEDIR/tensorflow-protobuf -DBUILD_TF_PARSER=0 -DBUILD_ONNX_PARSER=0 -DONNX_GENERATED_SOURCES=$BASEDIR/onnx -DBUILD_TF_LITE_PARSER=1 -DTF_LITE_GENERATED_PATH=$BASEDIR/tflite -DFLATBUFFERS_ROOT=$BASEDIR/flatbuffers-arm32 -DFLATC_DIR=$BASEDIR/flatbuffers/build -DPROTOBUF_ROOT=$BASEDIR/protobuf-arm -DARMCOMPUTENEON=1 -DARMNNREF=1

Does anyone have an idea of a fix or additionnal investigations ??
Thanks!!

Regards,
Nicolas

Parents
  • Some update on my issue.

    I have been able to activate the CpuRef backend when using static amrnn lib.

    For this, the backend must be explicitely registred in the application:

    BackendRegistryInstance().Register(RefBackend::GetIdStatic(), []() { return IBackendInternalUniquePtr(new RefBackend); });

    This must be done before the runtime creation.

    I have not been able yet to register the Neon backend because of a lot of compilation issues, but I keep trying.

    Does someone knows why with SHARED version of the ArmNN lib this registration is done implicitly?

    Regards,

    Nicolas

Reply
  • Some update on my issue.

    I have been able to activate the CpuRef backend when using static amrnn lib.

    For this, the backend must be explicitely registred in the application:

    BackendRegistryInstance().Register(RefBackend::GetIdStatic(), []() { return IBackendInternalUniquePtr(new RefBackend); });

    This must be done before the runtime creation.

    I have not been able yet to register the Neon backend because of a lot of compilation issues, but I keep trying.

    Does someone knows why with SHARED version of the ArmNN lib this registration is done implicitly?

    Regards,

    Nicolas

Children
More questions in this forum
There are no posts to show. This could be because there are no posts in this forum or due to a filter.