RKNN_ERR_TARGET_PLATFORM_UNMATCH (-13): Model Built for Another SoC
RKNN_ERR_TARGET_PLATFORM_UNMATCH (-13)
The .rknn model was compiled for a different NPU than the one it is running on. RKNN models are not portable across SoC families.
Applies to: RK3588 RK3588S RK3576 RK3568 RK3566 RK3562 RV1106 RV1103
Symptoms
- rknn_init returns -13
- Model converted on a PC "works" in simulation but not on the board
Common causes
- target_platform in rknn.config() does not match the board (rk3588 / rk3576 / rk3568 / rk3566 / rv1106 …)
- Using a model from a demo repo built for another board
How to fix it
- Check which SoC you are on
cat /proc/device-tree/compatible | tr '\0' '\n' | tail -1 - Rebuild for that platform
rknn.config(mean_values=[[0,0,0]], std_values=[[255,255,255]], target_platform='rk3576') rknn.load_onnx(model='model.onnx') rknn.build(do_quantization=True, dataset='./dataset.txt') rknn.export_rknn('model_rk3576.rknn')
Go deeper
FAQ
What does "RKNN_ERR_TARGET_PLATFORM_UNMATCH (-13)" mean?
The .rknn model was compiled for a different NPU than the one it is running on. RKNN models are not portable across SoC families.
What causes "RKNN_ERR_TARGET_PLATFORM_UNMATCH (-13)"?
target_platform in rknn.config() does not match the board (rk3588 / rk3576 / rk3568 / rk3566 / rv1106 …); Using a model from a demo repo built for another board.
How do I fix "RKNN_ERR_TARGET_PLATFORM_UNMATCH (-13)"?
1. Check which SoC you are on 2. Rebuild for that platform
Related issues
PCIe Link FailRockchip "PCIe Link Fail" / "Phy link never came up": NVMe Not Detectedstmmac_open: Cannot attach to PHY (error: -19)Rockchip Ethernet "Cannot attach to PHY (error: -19)": FixLink is Up - 1Gbps/Full but no DHCP / no trafficRockchip Ethernet Link Up but No Traffic (RGMII tx_delay / rx_delay)rknn_init fail! ret=-6 (RKNN_ERR_MODEL_INVALID)RKNN "rknn_init fail! ret=-6" RKNN_ERR_MODEL_INVALID: FixVIDIOC_STREAMON returned -1 (Broken pipe)Rockchip Camera "VIDIOC_STREAMON returned -1 (Broken pipe)": Fix[drm] Cannot find any crtc or sizesRockchip HDMI No Display: "[drm] Cannot find any crtc or sizes"