Hailo compilation fails with BackendAllocatorException / concat14 Agent infeasible on ONNX detection model

Hi,

I am trying to compile an ONNX object detection model with Hailo, and I am stuck at the compilation stage.

Environment

  • Hailo environment: hailodfc

  • ONNX exported from MMDetection / RTMDet-style model

Current status

  • ONNX parsing works

  • DFL optimization also succeeds

  • Failure happens during compilation / mapping

Error

[info] Successfully built optimization options - 7s 239ms
[error] Mapping Failed (allocation time: 7s)
No successful assignments: concat14 errors:
        Agent infeasible

[error] Failed to produce compiled graph
[error] BackendAllocatorException: Compilation failed: No successful assignments: concat14 errors:
        Agent infeasible

Important detail

In my ONNX graph, I do not see a node literally named concat14.

The ONNX concat nodes are named like:

  • /Concat_4

  • /Concat_6

  • etc.

So I assume concat14 is an internal Hailo-translated node name rather than the original ONNX node name.

What I already checked

  • Parsing issue is resolved

  • End nodes were corrected to match the ONNX node names

  • DFL optimization runs successfully

  • The problem only appears at compilation/mapping stage

My question

What does Agent infeasible on concat14 usually mean in practice?

I would like to know:

  1. How to identify which original ONNX concat corresponds to Hailo internal concat14

  2. Whether this usually indicates:

    • too large input resolution

    • too many channels at a concat

    • problematic neck/head structure

    • unsupported topology for mapping

  3. What is the recommended way to fix it:

    • reducing input size

    • changing end nodes

    • simplifying the ONNX graph

    • changing export settings

    • modifying the model architecture

Hi @gje_gje,

“Agent infeasible” means the Hailo compiler couldn’t map that concat layer onto the hardware - typically because the tensor dimensions at that point exceed what the HW can handle in a single operation.

To identify the node: Open the .har file’s model visualization (or run hailo profiler) - concat14 is the internal name assigned during parsing. It usually corresponds to the 14th concat encountered in graph traversal order.

Common causes might be input resolution too high or too many channels at the concat.

Thanks,

hello

I have a same problem

did you find any solution?

In my case, the issue seemed to be related to the post-processing part of the model.

From what I observed, the Hailo compiler failed during the mapping stage, possibly because some operations in the post-processing (especially concat-heavy parts or detection head logic) are harder to map or may become infeasible for allocation.

What worked for me

I tried cutting the model before the post-processing stage, keeping only the network up to the last convolution layers and removing the rest.

After doing this, the compilation succeeded.

In my case the model was YOLO-based, so if you are using a YOLO-like architecture, this issue might very well be related to the post-processing part as well.

1 Like

thank you for your response

yes Im using yolov8s.

coulde you please share your parse and optimize commands?

or tell me in which part you cutted your network?

appreciate your help.

thank you.

Hi,

Thanks for your message.

Just to clarify — I’m using DAMO-YOLO, not YOLOv8.

For parsing, I cut the network at the detection heads (regression + classification branches). Here is my full pipeline:

Parse

import os
import numpy as np
from PIL import Image
from hailo_sdk_client import ClientRunner

onnx_path = './model.onnx'
hailo_model_har_name = './model.har'

runner = ClientRunner(hw_arch="hailo8")

hn, npz = runner.translate_onnx_model(
    onnx_path,
    start_node_names=["images"],
    end_node_names=[
        "/head/gfl_reg.0/Conv",
        "/head/gfl_reg.1/Conv",
        "/head/gfl_reg.2/Conv",
        "/head/gfl_cls.0/Conv",
        "/head/gfl_cls.1/Conv",
        "/head/gfl_cls.2/Conv",
    ],
    net_input_shapes={
        "images": [1, 3, 640, 640],
    }
)

runner.save_har(hailo_model_har_name)

Note: since you’re using YOLOv8s (Hailo Model Zoo) , your cut points should be different.

From the Hailo Zoo version, you likely need to cut at:

end_node_names=[
    "/model.22/cv2.0/cv2.0.2/Conv",
    "/model.22/cv3.0/cv3.0.2/Conv",
    "/model.22/cv2.1/cv2.1.2/Conv",
    "/model.22/cv3.1/cv3.1.2/Conv",
    "/model.22/cv2.2/cv2.2.2/Conv",
    "/model.22/cv3.2/cv3.2.2/Conv",
]

Optimize

model_path = './model.har'
optimize_path = './model_opt.har'

calib_dataset = load_calibration_dataset('./images')

runner = ClientRunner(har=model_path)

alls = (
    "normalization0 = normalization([0, 0, 0],[255, 255, 255])\n"
    "model_optimization_flavor(optimization_level=2, compression_level=0)\n"
)

runner.load_model_script(alls)
runner.optimize(calib_data=calib_dataset)
runner.save_har(optimize_path)

Note: You can use optimization_level=4 for better accuracy, but it requires significantly more time and RAM during optimization.

Compile

optimize_path = './model_opt.har'
compiled_path = './model_opt.hef'

runner = ClientRunner(har=optimize_path)
runner.load_model_script(alls)

hef = runner.compile()

with open(compiled_path, "wb") as f:
    f.write(hef)

So in short:

  • Input: [1, 3, 640, 640]

  • Cut at: 3 regression + 3 classification Conv heads

Thanks.

1 Like

Hi @gje_gje, Thanks for sharing the information.