VDevice initialisation inside a class

Hi!

I am trying to create a VDevice inside the initialisation of a class so that I do not have to remake it for every forward iteration, and only have to use the infer function.

However, when I do this I get the following error.

hailo_platform.pyhailort._pyhailort.HailoRTStatusException: 8.

What does this mean? I have tried to look through the documentation but there is no clear explanation of this exception. Could it be that the VDevice times out?

Thanks in advance!

Hey @Dylan_Durand,

For reference on handling VDevice properly, please check these example implementations:

Regarding your HailoRTStatusException: 8 error, this typically indicates a timeout issue. The most common causes are:

  1. VDevice resource contention - The VDevice wasn’t properly released before reuse
  2. Timeout during initialization - Delays in HEF model loading or processing
  3. Multi-process conflicts - VDevice access across different processes

We recommend:

  • Verify the hailort_service is running properly
  • Ensure proper release of VDevice instances before creating new ones
  • Consider extending timeout parameters if your workload requires it

For more details, refer to the HailoRT User Guide sections on VDevice API (p.116-117), Error Codes (p.105), and Multi-Process Environments (p.106).

Let me know if you need anything else!