Hello,
I've tried to run a tflite model with hexagon delegate on Qualcomm RB5. But I am getting the following errors:
INFO: Initialized TensorFlow Lite runtime.
WARNING: Failed to fetch Hexagon NN version. This might be because you're using incompatible versions of libhexagon_interface and libhexagon_nn_skel. You must use compatible versions. Refer to Tensorflow Lite Hexagon Delegate Guide.WARNING: Incompatible versions between interface library and libhexagon_skel 136961 vs -1. You must use compatible versions. Refer to Tensorflow Lite Hexagon Delegate Guide.INFO: Created TensorFlow Lite delegate for Hexagon.INFO: Hexagon delegate: 31 nodes delegated out of 31 nodes.INFO: Replacing 31 node(s) with delegate (TfLiteHexagonDelegate) node, yielding 1 partitions.ERROR: hexagon_nn_config failed. Error: 44ERROR: Hexagon Kernel was not initializedERROR: Node number 31 (TfLiteHexagonDelegate) failed to prepare.ERROR: Restored previous execution plan after delegate application failure.Segmentation fault
Here is commrent from our ML engineer:
Failed to fetch Hexagon NN version. This might be because you're using incompatible versions of libhexagon_interface and libhexagon_nn_skel. You must use compatible versions. Refer to Tensorflow Lite Hexagon Delegate Guide.
Thanks
Kevin
Hi SoDa,
I see that you are trying to run a TFLite app on the Hexagon dsp. If you are trying to get started with using Hexagon dsp on RB5, we have a working sample app here : https://github.com/quic/sample-apps-for-Qualcomm-Robotics-RB5-platform/tree/master/HexgonSDK-Image-classification, that runs a Tensorflow model on dsp.
Can you please execute this app and let us know the result, so we know if the problem is from Hexagon or the TFLite model?
Thank you
Hi,
Thank you for the reply! unfortunately the provided sample didn't work as well.
I've got an error in step 1 when I was trying to retrieve the serial number;
Hi @SoDa,
I see you mentioned you are using TF v2.6. May I know how you got libhexagon_interface.so library?
Usually, RB5 ships with both libhexagon_interface.so and libhexagon_nn_skel.so that are required to offload a network with Hexagon Delegate and you don't need to recompile and download any other libraries (from tensorflow).
Could you share more details on how you got this libhexagon_interface.so?
Hi,
Thanks for the reply! I've used "libhexagon_interface.so" shipped with RB5 OS. However, I've re-installed the RB5 OS again and re-wrote the label_image example from tflite Github repo for linux_aarch64. It works now on CPU, GPU and DSP. Even though the sample app for RB5 still not working. I think my problem was caused by these two reasons:
1. The compiled "libhexgon_nn_skel.so" version mismatch. As you suggested I didn't replaced it with the compiled version from Hexagon SDK
2. I ran everything with root user. After using "strace" I realized that apparently the user doesn't have access permission to HW even though it was a sudoer user.
Thank you again for your replies
Hi,
I am working on hexagon sdk image classification sample app,
https://github.com/quic/sample-apps-for-Qualcomm-Robotics-RB5-platform/tree/master/HexgonSDK-Image-classification
that runs a Tensorflow model on dsp.
Faced checksum issue when building transform graph tool in tensorflow model(step 3), resolved it by modifying the workspace.bzl file. Followed further steps, then faced below error in step 6.
/data/graph_app: /usr/lib/libcdsprpc.so: no version information available (required by /data/graph_app)
ERROR: Could not initialize a new graph
Didn't replace the default libhexagon_nn_skel.so file in RB5. But the issue still remains. Please help me in resolving the issue.
Thanks
Greetings,
Are there any working example (C++) that uses the hexagon dsp via tflite delegates on RB5?
Also compatible interface and skel libraries?
It would be really helpful.
Thanks in advance.
Hi @bmallem,
I tried to use the libhexagon_interface.so and libhexagon_nn_skel.so already present with the RB5.
Got the following error:
Then, I built the libhexagon_interface.so library on the v2.9.1 tensorflow branch and used corresponding libhexagon_nn_skel from https://storage.cloud.google.com/download.tensorflow.org/tflite/hexagon_...Still getting the same error.
How can we make sure that we are using the compatible versions of the libraries?
Hi @cris.thomas.sky...
I am having the same problem. Did you solve the problem?
Thanks