[info] Model Optimization Algorithm Quantization-Aware Fine-Tuning is done (completion time is 00:00:25.47)
[info] Layer Noise Analysis skipped
[info] Model Optimization is done
[info] Saved HAR to: /local/workspace/direction_classifier.har
[info] Loading model script commands to direction_classifier from /local/workspace/hailo_model_zoo/hailo_model_zoo/cfg/alls/generic/direction_classifier.alls
[info] ParsedPerformanceParam command, setting optimization_level(max=2)
[info] Loading network parameters
[info] Starting Hailo allocation and compilation flow
[error] Mapping Failed (allocation time: 0s)
Can’t find mutual format for fc1_d1 → ew_add0_ew_add_n_fc1_d0
[error] Failed to produce compiled graph
[error] BackendAllocatorException: Compilation failed: Can’t find mutual format for fc1_d1 → ew_add0_ew_add_n_fc1_d0
(hailo_virtualenv) hailo@116af785a8fc:/local/workspace$
That “Can’t find mutual format for fc1_d1 → ew_add0_ew_add_n_fc1_d0” error is a classic layout mismatch. Basically, the allocator can’t figure out how to reconcile the data formats between your dense layer output (fc1_d1) and your elementwise-add input. This typically happens with longer skip connections where the compiler’s balanced multisplit mode gets confused trying to match up the buffer layouts.
Here is two approaches that usually solve this:
Option 1: Turn off balanced output splitting for that connection
You can tell the compiler to relax the buffer matching requirements for that specific branch. Just add this to your model script or in the .alls file:
This basically tells the system “hey, it’s okay if these buffers don’t have identical layouts” and usually clears up the mutual format errors on skip connections.
Option 2: Force a transpose to align the layouts
If you’re dealing with different tensor orderings on each side of the add (like one branch is NHCW while the other is NHWC), you can force them to match by inserting a transpose:
transpose(fc1_d1)
This pushes everything downstream from fc1_d1 into the default Hailo layout, which should match what the ew_add path is expecting.
Let me know if either of these work for you or if you’re still seeing issues!