YOLOv8 Custom Model Compilation Fails: Mapping Failed - concat17 Agent infeasible

Hi everyone,

I’m trying to compile a custom-trained YOLOv8 model to the .hef format for a Hailo-8 accelerator, but I’m running into a persistent Mapping Failed error. I would appreciate any guidance you could offer.

Here is a summary of my environment and the steps I’ve taken so far:

My Environment:

Host OS: Windows 11

Development Environment: Ubuntu 22.04 running on WSL2

Hailo SDK Version: 2025-07, installed via the Docker method.

Troubleshooting Steps Taken:

Initial Attempt (Native Installer): I first tried using the .run installer directly on Ubuntu. The installation failed due to a missing dependency: linux-headers-6.6.87.2-microsoft-standard-WSL2. Even after running wsl --update and installing other dependencies, this specific header package could not be found via apt.

Switching to Docker: I then switched to the Docker-based installation. I successfully installed Docker on Ubuntu and used the hailo_ai_sw_suite_docker_run.sh script to build and enter the Hailo SDK container. This part of the process now works perfectly.

Model Export: I exported my trained best.pt model to ONNX using the ultralytics library. My final attempt included the simplify=True flag as recommended for better hardware compatibility:

Bash

yolo export model=best.pt format=onnx simplify=True
Hailo Toolchain Process: Inside the Docker container, I followed this sequence:

Parse: I ran hailo parser onnx best.onnx. The tool prompted me with a recommendation for end node names, which I accepted (y). It then asked to add an NMS postprocess command, which I declined (n) to avoid potential automatic configuration errors. This successfully created the best.har file.

Optimize: I then quantized the model using a random calibration set, as using a local image folder was causing a StopIteration error. This step completed successfully and created the best_optimized.har file. The command used was:

Bash

hailo optimize best.har --use-random-calib-set
Compile: This is where the process fails. When I run the final compile command, I get the Mapping Failed error.

Bash

hailo compiler best_optimized.har
The Final Error:

Even after using a simplified ONNX model, the compilation fails with the exact same error, pointing to the concat17 layer.

(hailo_virtualenv) hailo@DESKTOP-0GFAUHP:/local/shared_with_docker$ hailo compiler best_optimized.har
[info] No GPU chosen and no suitable GPU found, falling back to CPU.
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1756836784.321588 5364 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1756836784.325058 5364 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
[info] Current Time: 21:13:06, 09/02/25
[info] CPU: Architecture: x86_64, Model: Intel(R) Core™ i9-10850K CPU @ 3.60GHz, Number Of Cores: 20, Utilization: 0.0%
[info] Memory: Total: 15GB, Available: 14GB
[info] System info: OS: Linux, Kernel: 6.6.87.2-microsoft-standard-WSL2
[info] Hailo DFC Version: 3.32.0
[info] HailoRT Version: 4.22.0
[info] PCIe: No Hailo PCIe device was found
[info] Running hailo compiler best_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
[info] Building optimization options for network layers…
[info] Successfully built optimization options - 4s 453ms
[info] Trying to compile the network in a single context
[info] Single context flow failed: Recoverable single context error
[info] Building optimization options for network layers…
[info] Successfully built optimization options - 3s 990ms
[error] Mapping Failed (allocation time: 4s)
No successful assignments: concat17 errors:
Agent infeasible

[error] Failed to produce compiled graph
[error] BackendAllocatorException: Compilation failed: No successful assignments: concat17 errors:
Agent infeasible
———————————————————
My Question:

Could you please provide some guidance on what might be causing this Agent infeasible error for the concat17 layer, especially after using the simplify=True export option? Are there other parsing or compilation flags I should try, or is this indicative of a deeper architectural incompatibility with my specific YOLOv8 model?

Thank you for your time and help!

Hi @Mustafa_Ali_ARIKAN

At DeGirum (a SW partner of Hailo), we built a cloud compiler to help users compile YOLO models to Hailo. You can see if it is useful: Early Access to DeGirum Cloud Compiler

Hello, @shashi

Thank you so much for sharing this! This is fantastic news, and I would love to be included in the early access program.

I have been working on a project and have been stuck precisely at this model compilation stage. If the Degirum platform provides a path forward as you’ve described, it would mean my significant efforts on this project won’t be in vain.

I have just registered for early access on your website. My email address is: dtmali54+hailo@gmail.com

Thank you again for the help.

1 Like

Hi @Mustafa_Ali_ARIKAN

We received your request and once approved, we will reach out to you with instructions.