Hi @RadxaYuntian. As per discussions yesterday I have installed the rockchip RKNPU2 and the toolkit2 on the latest debian provided by Radxa, both are version 1.5.2 so the latest versions however I've noted some warnings with the rockchip examples. When I init the NPU, it tells me that the driver is not the latest version. I'm assuming the driver is included in your debian package as I can see no sign of it in either of the rockchip github pages and I've noted Radxa support with the driver for other devices (N10). Are you able to assist with updating that to the latest version?
This is the output from init and when the image is passed to the npu.
I RKNN: [22:53:59.286] RKNN Runtime Information: librknnrt version: 1.5.2 (c6b7b351a@2023-08-23T15:28:22) I RKNN: [22:53:59.286] RKNN Driver Information: version: 0.8.2 W RKNN: [22:53:59.286] Current driver version: 0.8.2, recommend to upgrade the driver to the new version: >= 0.8.8 I RKNN: [22:53:59.286] RKNN Model Information: version: 6, toolkit version: 1.5.2-source_code(compiler version: 1.5.2 (71720f3fc@2023-08-21T01:31:57)), target: RKNPU v2, target platform: rk3588, framework name: ONNX, framework layout: NCHW, model inference type: static_shape W RKNN: [22:53:59.326] Output(output): size_with_stride larger than model origin size, if need run OutputOperator in NPU, please call rknn_create_memory using size_with_stride. W RKNN: [22:53:59.326] Output(283): size_with_stride larger than model origin size, if need run OutputOperator in NPU, please call rknn_create_memory using size_with_stride. W RKNN: [22:53:59.326] Output(285): size_with_stride larger than model origin size, if need run OutputOperator in NPU, please call rknn_create_memory using size_with_stride.
The yolov5s model calls for 640 x 640 images, which I have provided it with (the example image and others), but the stride warnings are given regardless, polluting the terminal with messages.
From dmesg I'm getting this with grep npu:
[ 8.683496] vdd_npu_s0: supplied by vcc5v0_sys
[ 8.687571] vdd_npu_s0: 550 <--> 950 mV at 800 mV, enabled
[ 8.826334] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu-supply from device tree
[ 8.826342] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu-supply property in node /power-management@fd8d8000/power-controller failed
[ 8.827288] RKNPU fdab0000.npu: Adding to iommu group 0
[ 8.827371] RKNPU fdab0000.npu: RKNPU: rknpu iommu is enabled, using iommu mode
[ 8.827413] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree
[ 8.827980] RKNPU fdab0000.npu: Looking up mem-supply from device tree
[ 8.828450] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdab0000-0xfdabffff]
[ 8.828507] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdac0000-0xfdacffff]
[ 8.828545] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdad0000-0xfdadffff]
[ 8.828800] [drm] Initialized rknpu 0.8.2 20220829 for fdab0000.npu on minor 1
[ 8.834193] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up nputop-supply from device tree
[ 8.834215] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up nputop-supply property in node /power-management@fd8d8000/power-controller failed
[ 8.834280] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu1-supply from device tree
[ 8.834296] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu1-supply property in node /power-management@fd8d8000/power-controller failed
[ 8.834351] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu2-supply from device tree
[ 8.834367] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu2-supply property in node /power-management@fd8d8000/power-controller failed
[ 8.834468] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree
[ 8.834483] vdd_npu_s0: could not add device link fdab0000.npu: -EEXIST
[ 8.834485] vdd_npu_s0: Failed to create debugfs directory
[ 8.835045] RKNPU fdab0000.npu: Looking up mem-supply from device tree
[ 8.835065] vdd_npu_s0: could not add device link fdab0000.npu: -EEXIST
[ 8.835067] vdd_npu_s0: Failed to create debugfs directory
[ 8.835768] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree
[ 8.835785] vdd_npu_s0: could not add device link fdab0000.npu: -EEXIST
[ 8.835787] vdd_npu_s0: Failed to create debugfs directory
[ 8.837826] RKNPU fdab0000.npu: leakage=9
[ 8.837850] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree
[ 8.837865] debugfs: Directory 'fdab0000.npu-rknpu' with parent 'vdd_npu_s0' already present!
[ 8.845673] RKNPU fdab0000.npu: pvtm=869
[ 8.851289] RKNPU fdab0000.npu: pvtm-volt-sel=3
[ 8.853370] RKNPU fdab0000.npu: avs=0
[ 8.853574] RKNPU fdab0000.npu: l=10000 h=85000 hyst=5000 l_limit=0 h_limit=800000000 h_table=0
[ 8.865226] RKNPU fdab0000.npu: failed to find power_model node
[ 8.865504] RKNPU fdab0000.npu: RKNPU: failed to initialize power model
[ 8.865760] RKNPU fdab0000.npu: RKNPU: failed to get dynamic-coefficient
And I've also noted when it performs inference with verbose=True it shows the npu is failing to perform dumps, which may or may not be an issue.
e.g. :
D RKNN: [23:08:14.712] dump npy tensor to: dumps/084_ConvSigmoid_output_shape_1_255_80_80_float.npy
E RKNN: [23:08:14.712] failed open dump path: dumps/084_ConvSigmoid_output_shape_1_255_80_80_float.npy
Thank you for whatever assistance you can provide.
Hi @RadxaYuntian. As per discussions yesterday I have installed the rockchip RKNPU2 and the toolkit2 on the latest debian provided by Radxa, both are version 1.5.2 so the latest versions however I've noted some warnings with the rockchip examples. When I init the NPU, it tells me that the driver is not the latest version. I'm assuming the driver is included in your debian package as I can see no sign of it in either of the rockchip github pages and I've noted Radxa support with the driver for other devices (N10). Are you able to assist with updating that to the latest version?
This is the output from init and when the image is passed to the npu.
I RKNN: [22:53:59.286] RKNN Runtime Information: librknnrt version: 1.5.2 (c6b7b351a@2023-08-23T15:28:22) I RKNN: [22:53:59.286] RKNN Driver Information: version: 0.8.2 W RKNN: [22:53:59.286] Current driver version: 0.8.2, recommend to upgrade the driver to the new version: >= 0.8.8 I RKNN: [22:53:59.286] RKNN Model Information: version: 6, toolkit version: 1.5.2-source_code(compiler version: 1.5.2 (71720f3fc@2023-08-21T01:31:57)), target: RKNPU v2, target platform: rk3588, framework name: ONNX, framework layout: NCHW, model inference type: static_shape W RKNN: [22:53:59.326] Output(output): size_with_stride larger than model origin size, if need run OutputOperator in NPU, please call rknn_create_memory using size_with_stride. W RKNN: [22:53:59.326] Output(283): size_with_stride larger than model origin size, if need run OutputOperator in NPU, please call rknn_create_memory using size_with_stride. W RKNN: [22:53:59.326] Output(285): size_with_stride larger than model origin size, if need run OutputOperator in NPU, please call rknn_create_memory using size_with_stride.
The yolov5s model calls for 640 x 640 images, which I have provided it with (the example image and others), but the stride warnings are given regardless, polluting the terminal with messages.From dmesg I'm getting this with grep npu: [ 8.683496] vdd_npu_s0: supplied by vcc5v0_sys [ 8.687571] vdd_npu_s0: 550 <--> 950 mV at 800 mV, enabled [ 8.826334] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu-supply from device tree [ 8.826342] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu-supply property in node /power-management@fd8d8000/power-controller failed [ 8.827288] RKNPU fdab0000.npu: Adding to iommu group 0 [ 8.827371] RKNPU fdab0000.npu: RKNPU: rknpu iommu is enabled, using iommu mode [ 8.827413] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree [ 8.827980] RKNPU fdab0000.npu: Looking up mem-supply from device tree [ 8.828450] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdab0000-0xfdabffff] [ 8.828507] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdac0000-0xfdacffff] [ 8.828545] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdad0000-0xfdadffff] [ 8.828800] [drm] Initialized rknpu 0.8.2 20220829 for fdab0000.npu on minor 1 [ 8.834193] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up nputop-supply from device tree [ 8.834215] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up nputop-supply property in node /power-management@fd8d8000/power-controller failed [ 8.834280] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu1-supply from device tree [ 8.834296] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu1-supply property in node /power-management@fd8d8000/power-controller failed [ 8.834351] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu2-supply from device tree [ 8.834367] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu2-supply property in node /power-management@fd8d8000/power-controller failed [ 8.834468] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree [ 8.834483] vdd_npu_s0: could not add device link fdab0000.npu: -EEXIST [ 8.834485] vdd_npu_s0: Failed to create debugfs directory [ 8.835045] RKNPU fdab0000.npu: Looking up mem-supply from device tree [ 8.835065] vdd_npu_s0: could not add device link fdab0000.npu: -EEXIST [ 8.835067] vdd_npu_s0: Failed to create debugfs directory [ 8.835768] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree [ 8.835785] vdd_npu_s0: could not add device link fdab0000.npu: -EEXIST [ 8.835787] vdd_npu_s0: Failed to create debugfs directory [ 8.837826] RKNPU fdab0000.npu: leakage=9 [ 8.837850] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree [ 8.837865] debugfs: Directory 'fdab0000.npu-rknpu' with parent 'vdd_npu_s0' already present! [ 8.845673] RKNPU fdab0000.npu: pvtm=869 [ 8.851289] RKNPU fdab0000.npu: pvtm-volt-sel=3 [ 8.853370] RKNPU fdab0000.npu: avs=0 [ 8.853574] RKNPU fdab0000.npu: l=10000 h=85000 hyst=5000 l_limit=0 h_limit=800000000 h_table=0 [ 8.865226] RKNPU fdab0000.npu: failed to find power_model node [ 8.865504] RKNPU fdab0000.npu: RKNPU: failed to initialize power model [ 8.865760] RKNPU fdab0000.npu: RKNPU: failed to get dynamic-coefficient
And I've also noted when it performs inference with verbose=True it shows the npu is failing to perform dumps, which may or may not be an issue. e.g. : D RKNN: [23:08:14.712] dump npy tensor to: dumps/084_ConvSigmoid_output_shape_1_255_80_80_float.npy E RKNN: [23:08:14.712] failed open dump path: dumps/084_ConvSigmoid_output_shape_1_255_80_80_float.npy
Thank you for whatever assistance you can provide.