To run a custom Torch model on the Hailo8L hardware I performed the following steps.
- Convert Torch model to ONNX
- Convert ONNX model to HAR
- Quantize HAR model
- Compile HAR model to HEF
The HEF model has 1 input and 3 outputs as shown below.
(hailo) C:\Users\LattePanda\Desktop\hailo>hailo parse-hef model.hef
(hailo) Running command 'parse-hef' with 'hailortcli'
Architecture HEF was compiled for: HAILO8L
Network group name: model, Multi Context - Number of contexts: 4
Network name: model/model
VStream infos:
Input model/input_layer1 UINT8, NHWC(320x320x1)
Output model/fc2 UINT8, NC(320)
Output model/fc1 UINT8, NC(320)
Output model/resize3 UINT8, F8CR(320x320x1)
When benchmarking the model I do however get the following error.
(hailo) C:\Users\LattePanda\Desktop\hailo>hailo benchmark model.hef
(hailo) Running command 'benchmark' with 'hailortcli'
Starting Measurements...
Measuring FPS in HW-only mode
[HailoRT] [error] Got HAILO_TIMEOUT while waiting for output stream buffer model/fc2
[HailoRT] [error] Got HAILO_TIMEOUT while waiting for output stream buffer model/resize3
[HailoRT] [error] CHECK_SUCCESS failed with status=0000:03:00.0 - Failed read from stream (device: HAILO_TIMEOUT(4))
[HailoRT] [error] CHECK_SUCCESS failed with status=0000:03:00.0 - Failed read from stream (device: HAILO_TIMEOUT(4))
[HailoRT] [error] Got HAILO_TIMEOUT while waiting for input stream buffer model/input_layer1
[HailoRT] [error] CHECK_SUCCESS failed with status=0000:03:00.0 - Failed write to stream (device: HAILO_TIMEOUT(4))
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_TIMEOUT(4) -
[HailoRT] [error] Got HAILO_TIMEOUT while waiting for output stream buffer model/fc1
[HailoRT] [error] CHECK_SUCCESS failed with status=0000:03:00.0 - Failed read from stream (device: HAILO_TIMEOUT(4))
[HailoRT CLI] [error] Failed waiting for threads with status HAILO_TIMEOUT(4)
[HailoRT CLI] [error] Failed waiting for threads with status HAILO_TIMEOUT(4)
[HailoRT CLI] [error] Failed waiting for threads with status HAILO_TIMEOUT(4)
[HailoRT CLI] [error] Failed waiting for threads with status HAILO_TIMEOUT(4)
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_TIMEOUT(4) -
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_TIMEOUT(4) -
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_TIMEOUT(4) - Error failed running inference
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_TIMEOUT(4) - Error while running inference
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_TIMEOUT(4) - Measuring FPS in HW-only mode failed
The compilation to HEF was successful, what could be the reason the HEF file now fails to run on the Hailo8L?