armnn icon indicating copy to clipboard operation
armnn copied to clipboard

ERROR: Operator FULLY_CONNECTED is not supported by armnn_delegate.

Open luchangli03 opened this issue 2 years ago • 1 comments

ERROR: Operator FULLY_CONNECTED is not supported by armnn_delegate.

luchangli03 avatar Aug 02 '22 09:08 luchangli03

Hi @luchangli03

Can you provide any more details on the issue? Such as: ArmNN Version, ACL version, TfLite version, System OS, what device is being used, Model information ( can you link the model? ) How are you running the delegate?

Regards, Ryan

ArmRyan avatar Aug 10 '22 09:08 ArmRyan

I also encountered this message and failed to run my transformers model with tflite

ArmNN version: ArmNN v29.0.0, prebuilt binaries for x86 ACL version: Not downloaded TfLite version: tensorflow == 2.10.0rc0 System OS: Linux Device: Graviton gen 1 (ec2 a1) Model download: BERT QA. Also found here: https://www.tensorflow.org/lite/examples/bert_qa/overview

This seems to be an issue with CpuAcc, as removing it from the list of backends fixes the warnings and errors.

Attempting to instantiate the interpreter

delegates = (
            [
                tflite_runtime.interpreter.load_delegate(
                    library=delegate_lib_path,
                    options={"backends": "CpuAcc,CpuRef", "logging-severity": "debug"},
                )
            ]
            if delegate_lib_path
            else None
        )

interpreter = tflite_runtime.interpreter.Interpreter(
            model_path=model_path, experimental_delegates=delegates,
        )

Which leads to the following outputs:

WARNING: FULLY_CONNECTED: not supported by armnn
WARNING: TRANSPOSE: not supported by armnn: in validate_arguments src/cpu/kernels/CpuPermuteKernel.cpp
:113: Objects have different dimensions
Info: ArmnnSubgraph creation
Info: Parse nodes to ArmNN time: 26.52 ms
Warning: WARNING: Layer of type Gather is not supported on requested backend CpuAcc for input data type Float32 and output data type Float32 (reason: in validate_arguments src/core/NEON/kernels/NEGatherKernel.cpp:59: indices->num_dimensions() > 1), falling back to the next backend.
Warning: WARNING: Layer of type Gather is not supported on requested backend CpuAcc for input data type Float32 and output data type Float32 (reason: in validate_arguments src/core/NEON/kernels/NEGatherKernel.cpp:59: indices->num_dimensions() > 1), falling back to the next backend.
Warning: WARNING: Layer of type Transpose is not supported on requested backend CpuAcc for input data type Float32 and output data type Float32 (reason: in validate_arguments src/cpu/kernels/CpuPermuteKernel.cpp:113: Objects have different dimensions), falling back to the next backend.
Warning: WARNING: Layer of type Transpose is not supported on requested backend CpuAcc for input data type Float32 and output data type Float32 (reason: in validate_arguments src/cpu/kernels/CpuPermuteKernel.cpp:113: Objects have different dimensions), falling back to the next backend.
Warning: WARNING: Layer of type Transpose is not supported on requested backend CpuAcc for input data type Float32 and output data type Float32 (reason: in validate_arguments src/cpu/kernels/CpuPermuteKernel.cpp:113: Objects have different dimensions), falling back to the next backend.
Info: Optimize ArmnnSubgraph time: 8.07 ms
python3: /build/armnn-YyCEBh/armnn-22.05.01/src/armnn/LoadedNetwork.cpp:653: const armnn::IWorkloadFactory& armnn::LoadedNetwork::GetWorkloadFactory(const armnn::Layer&) const: Assertion `(IWorkloadFactory::IsLayerSupported(layer, {}, reasonIfUnsupported, m_OptimizedNetwork->pOptimizedNetworkImpl->GetModelOptions())) && "Factory does not support layer"' failed.
Aborted (core dumped)

kylesayrs avatar Aug 22 '22 18:08 kylesayrs

Hi @kylesayrs , CpuAcc requires ACL library to work. Is it possible to include ACL 22.05 in your build?

ArmRyan avatar Aug 24 '22 10:08 ArmRyan