- I was unable to use asserts as in the code given, however when I printed out the contents of all of the arguments of the erroring hailo function, they all had values except for
network_group
which was null as expected:
vDevice: cimport.struct__hailo_vdevice@1126e50
hef: cimport.struct__hailo_hef@11271f0
network_group_size: 1
network_group: null
config_params: cimport.hailo_configure_params_t{ .network_group_params_count = 1, .network_group_params = { cimport.hailo_configure_network_group_params_t{ .name = { ... }, .batch_size = 0, .power_mode = 0, .latency = 0, .stream_params_by_name_count = 4, .stream_params_by_name = { ... }, .network_params_by_name_count = 1, .network_params_by_name = { ... } }, cimport.hailo_configure_network_group_params_t{ .name = { ... }, .batch_size = 43690, .power_mode = 2863311530, .latency = 2863311530, .stream_params_by_name_count = 12297829382473034410, .stream_params_by_name = { ... }, .network_params_by_name_count = 12297829382473034410, .network_params_by_name = { ... } }, cimport.hailo_configure_network_group_params_t{ .name = { ... }, .batch_size = 43690, .power_mode = 2863311530, .latency = 2863311530, .stream_params_by_name_count = 12297829382473034410, .stream_params_by_name = { ... }, .network_params_by_name_count = 12297829382473034410, .network_params_by_name = { ... } }, cimport.hailo_configure_network_group_params_t{ .name = { ... }, .batch_size = 43690, .power_mode = 2863311530, .latency = 2863311530, .stream_params_by_name_count = 12297829382473034410, .stream_params_by_name = { ... }, .network_params_by_name_count = 12297829382473034410, .network_params_by_name = { ... } }, cimport.hailo_configure_network_group_params_t{ .name = { ... }, .batch_size = 43690, .power_mode = 2863311530, .latency = 2863311530, .stream_params_by_name_count = 12297829382473034410, .stream_params_by_name = { ... }, .network_params_by_name_count = 12297829382473034410, .network_params_by_name = { ... } }, cimport.hailo_configure_network_group_params_t{ .name = { ... }, .batch_size = 43690, .power_mode = 2863311530, .latency = 2863311530, .stream_params_by_name_count = 12297829382473034410, .stream_params_by_name = { ... }, .network_params_by_name_count = 12297829382473034410, .network_params_by_name = { ... } }, cimport.hailo_configure_network_group_params_t{ .name = { ... }, .batch_size = 43690, .power_mode = 2863311530, .latency = 2863311530, .stream_params_by_name_count = 12297829382473034410, .stream_params_by_name = { ... }, .network_params_by_name_count = 12297829382473034410, .network_params_by_name = { ... } }, cimport.hailo_configure_network_group_params_t{ .name = { ... }, .batch_size = 43690, .power_mode = 2863311530, .latency = 2863311530, .stream_params_by_name_count = 12297829382473034410, .stream_params_by_name = { ... }, .network_params_by_name_count = 12297829382473034410, .network_params_by_name = { ... } } } }
-
I tried performing an @alignCast on the config_params that were passed into the function, however that did not change any of the output or logs.
-
I looked at the API docs, and everything I saw matched what I had written
-
I tried exporting the env var you specified, but it did not change the level of output. I checked the HailoRT environment vars, and it said that the most verbose setting is to set HAILORT_CONSOLE_LOGGER_LEVEL
to info
, which it already was set to in the output I gave above.
-
When I inspected the valgrind output as you suggested, the 27 bytes lots were in this context:
2929 │ ==7332== 27 bytes in 1 blocks are definitely lost in loss record 209 of 850
2930 │ ==7332== at 0x4885CDC: malloc (in /nix/store/84599gzafh8c0xayd0glm9r3dn899dpf-valgrind-3.23.0/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
2931 │ ==7332== by 0x4C1CB9F: hailort::TempFile::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/li
│ bhailort.so.4.18.0)
2932 │ ==7332== by 0x49C8553: hailort::MonitorHandler::open_temp_mon_file() (in /usr/lib/libhailort.so.4.18.0)
2933 │ ==7332== by 0x49C8B33: hailort::MonitorHandler::start_mon(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libhailort.so.4.18.0)
2934 │ ==7332== by 0x4A056DB: hailort::VDeviceBase::create(hailo_vdevice_params_t const&) (in /usr/lib/libhailort.so.4.18.0)
2935 │ ==7332== by 0x4A0B2A3: hailort::VDeviceHandle::create(hailo_vdevice_params_t const&) (in /usr/lib/libhailort.so.4.18.0)
2936 │ ==7332== by 0x4A0C4DF: hailort::VDevice::create(hailo_vdevice_params_t const&) (in /usr/lib/libhailort.so.4.18.0)
2937 │ ==7332== by 0x4A0C6A7: hailort::VDevice::create() (in /usr/lib/libhailort.so.4.18.0)
2938 │ ==7332== by 0x4985FDB: hailo_create_vdevice (in /usr/lib/libhailort.so.4.18.0)
2939 │ ==7332== by 0x104619F: main.main (main.zig:43)
2940 │ ==7332== by 0x1045873: callMain (start.zig:612)
2941 │ ==7332== by 0x1045873: callMainWithArgs (start.zig:581)
2942 │ ==7332== by 0x1045873: main (start.zig:596)
-
I am performing an assert that status == hlo.HAILO_SUCCESS
after every call, and I am not tripping any of the asserts during runtime.
-
According to everything that I could find, it looks like I am using the correct firmware and kernel versions.
I ran hailortcli fw-control identify
and got this output
[HailoRT] [info] OS Version: Linux 6.6.47+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.47-1+rpt1 (2024-09-02) aarch64
[HailoRT] [info] firmware_version is: 4.18.0
Executing on device: 0000:01:00.0
[HailoRT] [info] firmware_version is: 4.18.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.18.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L
I also ran hailortcli parse-hef
on the file I downloaded from hailo.ai:
Architecture HEF was compiled for: HAILO8L
Network group name: yolov7, Multi Context - Number of contexts: 7
Network name: yolov7/yolov7
VStream infos:
Input yolov7/input_layer1 UINT8, NHWC(640x640x3)
Output yolov7/yolov5_nms_postprocess FLOAT32, HAILO NMS(number of classes: 80, maximum bounding boxes per class: 80, maximum frame size: 128320)
Operation:
-
When I tried to use gdb, I was unable to get a stack trace from the libhailort.so because it was compiled without stack traces and debug information.
-
I looked through the diff on the example (which had been updated for 4.19) and there was no change between the 4.18 example and the 4.19 example code, and it should have worked fine.