airockchip / rknn-toolkit2

Other
762 stars 78 forks source link

RKNN failed to submit!, op id: 1, op name: Conv:MobilenetV1/MobilenetV1/Conv2d_0/Relu6_prequant #38

Closed swdee closed 4 months ago

swdee commented 4 months ago

Testing on the Radxa Rock 5B, their Debian Bulleye (Linux 5.10) image has the following version of RKNN driver and Toolkit installed.

driver version: 0.8.2, API version: 1.6.0 (9a7b5d24c@2023-12-13T17:31:11)

When running the MobileNet demo it completes successfully.

While testing the Debian Bookworm (Linux 6.1) image it has the following version of RKNN driver and Toolkit installed.

driver version: 0.9.3, API version: 1.6.0 (9a7b5d24c@2023-12-13T17:31:11)

When running the above MobileNet demo it fails with the following error;

model input num: 1, output num: 1
input tensors:
  index=0, name=input, n_dims=4, dims=[1, 224, 224, 3], n_elems=150528, size=150528, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=0, scale=0.007812
output tensors:
  index=0, name=MobilenetV1/Predictions/Reshape_1, n_dims=2, dims=[1, 1001, 0, 0], n_elems=1001, size=1001, fmt=UNDEFINED, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003906
rknn_run
E RKNN: [05:03:32.244] failed to submit!, op id: 1, op name: Conv:MobilenetV1/MobilenetV1/Conv2d_0/Relu6_prequant, flags: 0x5, task start: 0, task number: 38, run task counter: 0, int status: 0, please try updating to the latest version of the toolkit2 and runtime from: https://console.zbox.filez.com/l/I00fc3 (PWD: rknn)
rknn_run fail! ret=-1

This must mean there is a bug in the new driver version 0.9.3?

swdee commented 4 months ago

I upgraded to driver version 0.9.6 available here and patched the build errors on vm_flags_set and vm_flags_clear as referenced in the issue here.

This now fixes the problem with the MobileNet demo code and runs with expected output below.

model input num: 1, output num: 1
input tensors:
  index=0, name=input, n_dims=4, dims=[1, 224, 224, 3], n_elems=150528, size=150528, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=0, scale=0.007812
output tensors:
  index=0, name=MobilenetV1/Predictions/Reshape_1, n_dims=2, dims=[1, 1001, 0, 0], n_elems=1001, size=1001, fmt=UNDEFINED, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003906
rknn_run
 --- Top5 ---
283: 0.468750
282: 0.242188
286: 0.105469
464: 0.089844
264: 0.019531
Huirong-Huang commented 1 month ago

Hello, how to upgrade the driver version from 0.9.3 to 0.9.6

swdee commented 1 month ago

Hello, how to upgrade the driver version from 0.9.3 to 0.9.6

It would depend on what SBC and OS your using. You can either compile your own kernel and OS image with it in, or use a release of the vendor's OS image that has the newer version applied.

Huirong-Huang commented 1 month ago

Hello, how to upgrade the driver version from 0.9.3 to 0.9.6

It would depend on what SBC and OS your using. You can either compile your own kernel and OS image with it in, or use a release of the vendor's OS image that has the newer version applied.

I am sorry! I am a linux novice and just started learning. I mean what files need to be replaced to upgrade?