I’m trying to optimize a HAR model (net_4denoise_fixed.har) for Hailo8L using the Hailo AI Suite on my laptop. My goal is to run the model on a Hailo RPi5 board.
Contents of model_script.alls:
set_layer_precision net_4denoise/resBlock7/conv3/Conv uint8
The parser throws a BackendScriptParserException at the first character, even though the format looks correct.
Without model_script
If I run the same optimize command without --model-script, I get a CON70 error:
[CON70] Model contains unsupported layers or operations for the selected hardware (hailo8l).
This seems to indicate that some layers (like resBlock7/conv3) cannot be directly quantized or run on Hailo8L without specifying precision manually.
Environment:
Hailo AI Suite in Docker on Ubuntu laptop
CPU fallback (no GPU)
HailoRT version: 4.22.0
DFC version: 3.32.0
Target hardware: Hailo8L
Has anyone encountered these issues? Is there a specific formatting or spacing requirement for model_script.alls? Or any known workaround for the CON70 error?
Sure I took reference from the user guide and now I’m stuck here:
Model received quantization params from the hn
[info] MatmulDecompose skipped
[info] Starting Mixed Precision
[info] Model Optimization Algorithm Mixed Precision is done (completion time is 00:00:00.03)
[info] LayerNorm Decomposition skipped
[info] Starting Statistics Collector
[info] Using dataset with 64 entries for calibration
Calibration: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 64/64 [00:04<00:00, 15.00entries/s]
[info] Model Optimization Algorithm Statistics Collector is done (completion time is 00:00:04.35)
[info] Starting Fix zp_comp Encoding
[info] Model Optimization Algorithm Fix zp_comp Encoding is done (completion time is 00:00:00.00)
[info] Matmul Equalization skipped
[info] Starting MatmulDecomposeFix
[info] Model Optimization Algorithm MatmulDecomposeFix is done (completion time is 00:00:00.00)
[info] No shifts available for layer sunnynet/conv4/conv_op, using max shift instead. delta=0.6587 Optimization failed: Shift delta in sunnynet/avgpool1/avgpool_op is larger than 2 (5.86), cannot quantize. A possible solution is to use a pre-quantization model script command to reduce global average-pool spatial dimensions, please refer to the user guide for more info.
I added model alls as given on the user guide but I get this error:
Parsing failed at:
!<add_avgpool(name=‘pre_avgpool’,kernel=4,stride=4,input=‘sunnynet/conv4’,output=‘sunnynet/pre_avgpool’). Model script file not found in location:
Add a new average pooling layer to reduce spatial dimensions before global avgpool
I dont have access to this link.. I managed to compile the model into .hef file.. Currently struggling to run it on Rpi5 with hailo8 module.. I’m using hailort v4.23