Common Failure Resolutions
The following failures are grouped by stage along the ONNX model quantization and compilation pipeline. If you already know the exact log keyword, you can search for it directly. Otherwise, first identify which stage the issue falls into by the stage descriptions below.
General failure — Segmentation fault: core dumped
This error may be caused by insufficient memory on the physical machine, an old tool version, an invalid model, or a tool bug. Please troubleshoot it in the following ways:
-
Verify that there are no other tasks on the current physical machine that are taking up memory (or switch to a development machine with more memory).
-
Upgrade the toolchain version to the latest and reconvert the model.
-
Verify that the original model itself is valid, e.g. that the onnx model runs correctly in the ONNX Runtime.
-
If the above checks do not resolve the issue, please contact the Horizon team.
When to contact Horizon technical support: if the issue still cannot be located after completing steps 1-3 above.
Artifacts to provide:
-
Original ONNX model (or Caffe prototxt and caffemodel).
-
hb_compile.log. -
Shell output or core dump information at the time of error.
-
The yaml configuration file used.
Model parsing / optimization stage failure — ERROR The input model is invalid
The model parsing stage handles the Caffe-to-ONNX conversion and operator naming, and the model optimization stage performs equivalent optimizations such as constant folding, operator replacement, and operator fusion.
This error is caused by the model itself being invalid, i.e. it does not satisfy the checking logic of the public ONNX Runtime. Please check the model by yourself.
When to contact Horizon technical support: the model runs correctly in ONNX Runtime but the tool still reports this error.
Artifacts to provide:
-
Original ONNX model.
-
hb_compile.log. -
ONNX Runtime inference result description.
Calibration / quantization stage failure
The calibration stage applies fake quantization to operators and computes quantization thresholds according to quant_config, and the quantization stage applies fixed-point processing to lookup-table operators and produces quantized.bc.
For a detailed analysis of NaN appearing in the Calibrated Cosine / Quantized Cosine columns (including scenarios such as where -Inf and concat / equal propagate an all-zero tensor), refer to the ONNX Model Quantization FAQ section — Cases where Calibrated Cosine shows NaN.
For analysis of the case where quant_config is set but does not take effect, refer to the ONNX Model Quantization FAQ section — quant_config configuration not taking effect.
Compilation stage failure — ERROR Wrong mean_value num received
The compilation stage compiles the fixed-point HBIR model into an hbm instruction file that can be loaded and executed on the board.
This error is caused by the number of mean_value parameter in the yaml file not matching the number of model input nodes. Please check accordingly.
The mean_value of different input nodes need to be separated by ";" signs.
If the model is a hybrid multi-input model (i.e. contains both image and featuremap input nodes), the mean_value parameter of the featuremap node needs to be given a placeholder with "None" corresponding to input_name.
When to contact Horizon technical support: the error persists after correcting according to the rules above.
Artifacts to provide:
-
The yaml configuration file used.
-
hb_compile.log.
On-board / deployment stage failure
The on-board / deployment stage covers hbm loading on the board, on-board inference, and pre/post-processing adaptation. For consistency-issue investigation at this stage, refer to the ONNX Model Deployment Consistency Analysis section.
For investigation directions when on-board performance is below expectation, refer to the ONNX Model Quantization FAQ section — On-board performance below expectation.
For investigation directions when quantized.bc accuracy is fine but hbm accuracy drops, refer to the ONNX Model Quantization FAQ section — quantized.bc is fine but hbm accuracy drops.
