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:
If you want to keep manual control over resources via resources_param, use a lower optimization level (e.g., compiler_optimization_level=1).
Alternatively, discard resources_param when using compiler_optimization_level=2 to allow the compiler to manage resources automatically.