Performance Flow requires automatic resource utilization

Hi, team

Im trying the latest hailo dfc (3.29.0) and faced this message when i compile an quantized har file;

[info] Compiling network
[info] Loading network parameters
[info] Starting Hailo allocation and compilation flow
[error] Mapping Failed (allocation time: 0s)
Performance Flow requires automatic resource utilization

[error] Failed to produce compiled graph
[error] BackendAllocatorException: Compilation failed: Performance Flow requires automatic resource utilization

i figured out this happens when i set compiler_optimization_level=2 or max and any resources_param directives at the same time like below;

resources_param(max_control_utilization=0.9, max_compute_utilization=0.9, max_memory_utilization=0.9)
performance_param(compiler_optimization_level=2)

I succeed to compile by just discarding the resources_param directives;

performance_param(compiler_optimization_level=2)

My question is, is this intended? (seems not documented in the doc.)

I remember the first model script works without problems with the past hailo dfc versions (<= 3.28.0).

Hey @mineto_tsukada

Welcome to the Hailo Community!


The issue you’re facing with the Performance Flow requires automatic resource utilization error seems to stem from a conflict between using the compiler_optimization_level=2 (or max) and specifying manual resources_param constraints.

Explanation:

When you set compiler_optimization_level=2, the Hailo compiler tries to fully optimize the allocation of compute, control, and memory resources automatically. This automatic optimization conflicts with the manual resource constraints specified by resources_param (e.g., max_control_utilization=0.9, max_compute_utilization=0.9, max_memory_utilization=0.9).

In the latest Hailo DFC version (3.29.0), it seems that automatic resource allocation is enforced more strictly when using the highest optimization levels, causing the compilation to fail if manual resource constraints are also set.

Workaround:

As you’ve already found, removing the resources_param directives allows the compilation to succeed because the compiler can then handle resource allocation automatically.

Is this intended?

This behavior seems intentional, though it may not be clearly documented. It would be useful for the documentation to reflect this behavior, especially since the previous DFC versions (<= 3.28.0) did not enforce this limitation as strictly.

Recommendations:

  1. If you want to keep manual control over resources via resources_param, use a lower optimization level (e.g., compiler_optimization_level=1).
  2. Alternatively, discard resources_param when using compiler_optimization_level=2 to allow the compiler to manage resources automatically.

I hope this helps clarify the situation!

Best regards,
Omri