Hailo Support
It's currently possible to convert Teachable Machine models to the Hailo-ONNX format on the cloud.
Other generic ONNX models need to be locally compiled by the user using the Hailo dataflow compiler, and then the generated file needs to be uploaded to the Nx AI Cloud. This is due to the nature of compiling ONNX models in Hailo format. For this the user needs to upload calibration images and specify the subgraph that the Hailo chips can accelerate. This is not possible in the available cloud conversion.
Deploying on x86_64 machine with Hailo-8
The first step is to verify that you have a compatible HailoRT driver installed. Please check out this table to determine if your driver version is supported.
Next, install the Nx AI plugin by following these instructions.
If all is well, you should be able to select the Hailo runtime when enabling the Nx plugin as shown below:
After the installation is finished, the plugin interface will look something like this:
To manually verify that the Hailo runtime is downloaded and set up, feel free to check out the content of the
bin
folder of the AI Manager and make sure it contains these files: - libhailort.so.4.xx.0 - libonnxruntime_providers_hailo.so -libonnxruntime_providers_shared.so - libRuntimeLibrary.so
Finally, to deploy a model that can be accelerated on the Hailo chip, make sure that it has a
application/x-onnx; device=hailo
model file in the Nx AI Cloud:
If that is not the case, you'll need to manually compile the ONNX model and upload the generated model to the cloud. Please refer to this page for a quick start guide.
Common issues
Sometimes, after compiling an ONNX model to a Hailo-ONNX, the input names and shapes are not kept intact. Hence, the model might not work correctly within the Nx AI Manager. So, please make sure that the generated ONNX conforms to our specifications.
Monitoring
How to Enable Hailo Monitoring with hailortcli monitor
To monitor Hailo usage with the hailortcli monitor
command, you need to set a specific environment variable. Follow these steps:
Edit the Media Server Service Configuration:
Add the following line to the
/etc/systemd/system/networkoptix-metavms-mediaserver.service
file to set the necessary environment variable:The updated configuration file should look like this:
Restart the NX Media Server:
After updating the configuration file, restart the Network Optix Media Server for the changes to take effect. You can do this by running one of the following commands:
or
Run hailortcli
HAILO_MONITOR=1 hailortcli monitor
Experimental .ini
setting
.ini
settingExplicitly setting multiple Nx AI runtime engines is controlled by an .ini
file. This .ini
file does not exist by default and must be created by the user.
Create an empty file by running:
Then restart the mediaserver:
Once the mediaserver is restarted, the .ini file should be filled with defaults. Each setting should have a description in the .ini file.
Now, you can set multiple runtimes through:
Last updated