Model_init failing with malloc error -4

working on a CUSTOM RK3568 board and hitting an error on rknn_init. Using the ‘example’ from rknn_tookit2 for yolov5. Same code works on my custom RK3588 board. have ordered the Radxa 3A, but has not yet arrived, so asking this question in general for possible, well-known errors, or other tips to chase down the problem.

The converted, quantized yolov5 model is 10MB, free ram on the board id 1.7GB. I can load the model from file, but then calling rknn_init returns -4 - malloc error.

As noted, this exact same code works on RK 3588. Any tips? Tricks? Things to look at?

FYI - we build linux for this board with a bitbake/yocto project from Rockchip rk-linux. Not all of the source is available (notably the source for librknnrt.so which has the rknn_init code).

Oh! And using CPP not Python…

Using the sample code here: https://github.com/airockchip/rknn_model_zoo/tree/main/examples/yolov5/cpp