IMX 8M Plus, Runtime Error on making tflite-runtime interpreter with delegate (libvx_delegate.so)
Platform = NXP-imx8mp-lpddr4-evk
Linux Kernel Release = 5.15.32-lts-next+gfa6c3168595c
made an efficientnet model using:
from tensorflow.keras.applications import EfficientNetB0
model = EfficientNetB0(weights='imagenet')
- Then converted the same to int8-tflite format to be able to run it on the NPU, while trying to run the same model on npu I got this strange runtime error with no details :
Traceback (most recent call last):
File "/home/root/xyz/tflite_detection_live.py", line 143, in <module>
main()
File "/home/root/xyz/tflite_detection_live.py", line 78, in main
c_interpreter = make_interpreter(args.classifier_model, args.use_npu)
File "/home/root/xyz/tflite_detection_live.py", line 22, in make_interpreter
return Interpreter(
File "/usr/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 496, in __init__
self._interpreter.ModifyGraphWithDelegate(
RuntimeError
Note : This same model runs fine on the CPU.
- To check if there was something wrong in the conversion process, I tried to do the same with keras.applications.mobilenet_v2 and that model ran fine on NPU as well as the CPU.
- Looks like there can be some issues with the "libvx_delegate.so" being used.
- Any pointers as to how to run this efficientnet model on the NPU?
- yes, tried to run the same on a variscite imx8mplus evk with kernel = 5.15.60-imx8mp+g15e390fe9060.
- But, got the same runtime error.
Hello,
Please try the latest bsp 5.15.71, since your kernel version is not supported, you may try the latest one.
Regards