It dies inside yolov8_postprocess.cpp, inside get_boxes_and_scores(), because it assumes that tensors.size() is a multiple of 2. But on my machine, I’m getting tensors.size() = 1.
Despite this example being labelled RockChip, it does seem to detect the PCIe attached Hailo8L.
And when I compile it with:
g++ -o yolohailo -lhailort yolov8.cpp
I get a linker error:
/usr/bin/ld: /tmp/ccbsStTd.o: in function main': yolov8.cpp:(.text+0x18): undefined reference to hailo_create_vdevice’
collect2: error: ld returned 1 exit status
Using nm to inspect the symbols inside /usr/lib/libhailort.so, I get:
nm -C --defined-only libhailort.so | rg hailo_create_vdevice
00000000000bc2d8 T hailo_create_vdevice
So all the symbols seem present in libhailort.so, and there is only one libhailort.so on my system.
OKAY!! My linker problem was that I specified the library “-lhailort” BEFORE my source files. If I instead do “g++ -o yolohailo yolov8.cpp -lhailort”, then it compiles.