I run the compilation model from onnx
via the next command:
hailomz compile yolov8l --ckpt yolov8l.onnx --hw-arch hailo8l --calib-path calib_data_images --classes 1 --performance
with modified yolov8l.alls
:
yolov8l/normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
model_optimization_config(calibration, batch_size=4)
model_optimization_config(compression_params, auto_16bit_weights_ratio=1)
post_quantization_optimization(finetune, batch_size=4, epochs=4, loss_factors=[1, 1, 1, 1, 2, 2, 2, 2, 2, 2], loss_layer_names=[yolov8l/conv97, yolov8l/conv82, yolov8l/conv67, yolov8l/conv25, yolov8l/conv100, yolov8l/conv88, yolov8l/conv73, yolov8l/conv103, yolov8l/conv89, yolov8l/conv74], loss_types=[l2rel, l2rel, l2rel, l2rel, l2rel, l2rel, l2rel, ce, ce, ce], policy=enabled)model_optimization_flavor(optimization_level=4,compression_level=0)
change_output_activation(yolov8l/conv74,sigmoid)
change_output_activation(yolov8l/conv89,sigmoid)
change_output_activation(yolov8l/conv103,sigmoid)
nms_postprocess(“{har}”, meta_arch=yolov8, engine=cpu)
Before saving the har
file, it is clear what it does. After the har
file was created and saved successfully, it started Finding the best partition to contexts...
and stuck
[info] Model Optimization Algorithm Layer Noise Analysis is done (completion time is 00:05:16.52)
[info] Model Optimization is done
[info] Saved HAR to: /local/workspace/hailo_model_zoo/yolov8l.har
[info] Using generic alls script found in /local/workspace/hailo_model_zoo/hailo_model_zoo/cfg/alls/generic/yolov8l.alls because there is no specific hardware allse[0m
[info] Loading model script commands to yolov8l from /local/workspace/hailo_model_zoo/hailo_model_zoo/cfg/alls/generic/yolov8l.alls
[info] ParsedPerformanceParam command, setting optimization_level(max=2)
[info] Appending model script commands to yolov8l from string
[info] ParsedPerformanceParam command, setting optimization_level(max=2)
[info] Loading network parameters
[info] Starting Hailo allocation and compilation flow
[info] Adding an output layer after conv73
[info] Adding an output layer after conv74
[info] Adding an output layer after conv88
[info] Adding an output layer after conv89
[info] Adding an output layer after conv100
[info] Adding an output layer after conv103
[info]] Finding the best partition to contexts…
[.<==>…] Elapsed: 00:00:00
…
[…<==>…] Elapsed: 15:31:13
So, I have several questions:
- What does it do?
- Why it takes too long time?
- Can I see more logs about this operation (
Finding the best partition to contexts...
)? - While it was compiling the
har
file, it was usingGPU
, while it was doing thehef
file fromhar
, it was using onlyCPU
. Is compilinghef
fromhar
can be usedGPU
to speed up?
Besides, I investigated a little bit, that while compiling hef
from har
, it was run ../hailo_tools/build/compiler
and it stuck inside this running. I did not find any information about this compiler
and how to verbose more logs or others.