BUG: using delegate with transformer | AttributeError: 'NoneType' object has no attribute 'c_void_p'
Running it on Orange Pi 5B Python 3.11 tflite_runtime 2.14.0 Installation of ARMNN etc works fine with other models (example: runs fine with mirNET)
Link to tflite model that causes the error: https://drive.google.com/file/d/1uX7sZn2idpQOqHwcLFhEvCmHhTJJlfPZ/view?usp=drive_link (3gb download)
code snippet: import tflite_runtime.interpreter as tflite armnn_delegate = tf.lite.experimental.load_delegate( library="/home/federico/Documents/code/ARM/aarch64_build/delegate/libarmnnDelegate.so", options={"backends": "CpuAcc,GpuAcc,CpuRef", "logging-severity":"trace"}) try: model = tf.lite.Interpreter(model_path="../models/stablelm16.tflite", experimental_delegates=[armnn_delegate]) except Exception as e: print(f"An error occurred: {e}")
Report:
Info: ArmNN v33.1.0
arm_release_ver: g13p0-01eac0, rk_so_ver: 3
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '7'.
Info: Initialization time: 17.17 ms.
INFO: TfLiteArmnnDelegate: Requested unknown backend CpuAcc
INFO: TfLiteArmnnDelegate: Added backend GpuAcc
INFO: TfLiteArmnnDelegate: Requested unknown backend CpuRef
INFO: TfLiteArmnnDelegate: Created TfLite ArmNN delegate.
WARNING: ADD: not supported by armnn: in validate_arguments_with_arithmetic_rules src/gpu/cl/kernels/ClElementwiseKernel.cpp:160: ITensor data type S64 not supported by this kernel
WARNING: MINIMUM: not supported by armnn: in validate_arguments_with_arithmetic_rules src/gpu/cl/kernels/ClElementwiseKernel.cpp:160: ITensor data type S64 not supported by this kernel
WARNING: MAXIMUM: not supported by armnn: in validate_arguments_with_arithmetic_rules src/gpu/cl/kernels/ClElementwiseKernel.cpp:160: ITensor data type S64 not supported by this kernel
WARNING: BROADCAST_TO: not supported by armnn
WARNING: GATHER: not supported by armnn: in validate_arguments src/core/CL/kernels/CLGatherKernel.cpp:58: ITensor data type S64 not supported by this kernel
WARNING: GATHER: not supported by armnn: in validate_arguments src/core/CL/kernels/CLGatherKernel.cpp:58: ITensor data type S64 not supported by this kernel
WARNING: GATHER: not supported by armnn: in validate_arguments src/core/CL/kernels/CLGatherKernel.cpp:58: ITensor data type S64 not supported by this kernel
Info: ArmnnSubgraph creation
WARNING: CONSTANT: not supported by armnn: Unsupported DataType
An error occurred:
Exception ignored in: <function Delegate.del at 0xffff2c7dc360>
Traceback (most recent call last):
File "/home/federico/miniconda3/envs/mlc-chat-venv/lib/python3.11/site-packages/tensorflow/lite/python/interpreter.py", line 110, in del
AttributeError: 'NoneType' object has no attribute 'c_void_p'
Info: Shutdown time: 2.70 ms.