BackendAllocatorException: Compilation failed: Not enough resize units.

I’m trying to use a model called HybridNet on the Hailo-8. I converted it to ONNX, then generated a HAR file, and finally attempted to compile it into a HEF file. However, I encountered the following error. What could be the issue?

(hailo) jimin@jimin-Blade-15-RZ09-0485:~/hybridnets_mobinn$ hailo compiler --hw-arch hailo8 hybridnets_384x640_sim_optimized.har
[info] Current Time: 15:02:16, 02/20/25
[info] CPU: Architecture: x86_64, Model: 13th Gen Intel(R) Core™ i7-13800H, Number Of Cores: 20, Utilization: 2.3%
[info] Memory: Total: 30GB, Available: 24GB
[info] System info: OS: Linux, Kernel: 5.15.0-131-generic
[info] Hailo DFC Version: 3.30.0
[info] HailoRT Version: Not Installed
[info] PCIe: No Hailo PCIe device was found
[info] Running hailo compiler --hw-arch hailo8 hybridnets_384x640_sim_optimized.har
[info] Compiling network
[info] To achieve optimal performance, set the compiler_optimization_level to “max” by adding performance_param(compiler_optimization_level=max) to the model script. Note that this may increase compilation time.
[info] Loading network parameters
[info] Starting Hailo allocation and compilation flow
[error] Mapping Failed (allocation time: 0s)
Not enough resize units. Streaming: 16 Non-Streaming: 0 in chip: 14

[error] Failed to produce compiled graph
[error] BackendAllocatorException: Compilation failed: Not enough resize units. Streaming: 16 Non-Streaming: 0 in chip: 14

Hey @Park_Ji-Min ,

Welcome to the Hailo Community!

The error “Not enough resize units. Streaming: 16 Non-Streaming: 0 in chip: 14” occurs when the model requires more resize units than are available on the Hailo-8 chip.

Possible Solutions:

1. Optimize Model Preprocessing

  • If your model includes multiple resizing operations, consider resizing the input images before feeding them into the model.
  • On-chip resizing should be used efficiently. Use a single resize operation where possible.

2. Modify the Model Script

  • Add the following command to your model script:
    resize: { streaming: false }
    
    This forces the compiler to use non-streaming resize units, which may free up hardware resources.