Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在rv1126上连板测试yolo11量化后模型报错Exception: RKNN init failed. error code: RKNN_ERR_MODEL_INVALID,量化前模型没有问题。 #485

Open
BITfanyu opened this issue Nov 15, 2024 · 1 comment

Comments

@BITfanyu
Copy link

W rknn-toolkit version: 1.7.5
--> Init runtime environment
I NPUTransfer: Starting NPU Transfer Client, Transfer version 2.1.0 (b5861e7@2020-11-23T11:50:36)
E RKNNAPI: rknn_init, msg_load_ack fail, ack = 1(ACK_FAIL), expect 0(ACK_SUCC)!
E RKNNAPI: ==============================================
E RKNNAPI: RKNN VERSION:
E RKNNAPI: API: 1.7.5 (bb79b30 build: 2023-06-20 09:54:19)
E RKNNAPI: DRV: 1.7.5 (bb79b30 build: 2023-07-18 10:56:54)
E RKNNAPI: ==============================================
E Catch exception when init runtime!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 1008, in rknn.api.rknn_base.RKNNBase.init_runtime
E File "rknn/api/rknn_runtime.py", line 340, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
E Exception: RKNN init failed. error code: RKNN_ERR_MODEL_INVALID
E Please feedback the detailed log file <log_feedback_to_the_rknn_toolkit_dev_team.log> to the RKNN Toolkit development team.
E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues
E Current device id is: None
E Devices connected:
Init runtime environment failed
E ['192.168.0.100:5555']

export RKNN_LOG_LEVEL=5以后打印的日志如下

D [setup_node:441]Setup node id[70] uid[172] op[CONV2D] name[Conv_/model.10/m/m.0/attn/qkv/conv/Conv_172]
E [rknn_QuantCheck:405]input_scale[0.045956630260] * weight_scale[0.004918673541] != bias_scale[0.000353557582]
E [setup_node:456]Check node[70] CONV2D fail
Create rknn graph fail!
I [remove_client_ops:5760]remove_client_ops num=0
I [remove_client_ops:5771]remove_client_ops finish
Create RKNN model fail, error=-6
16894 NNService process_msg_init(203): Client 0 init model fail!

应该是yolo11注意力层的卷积量化出了问题

@BITfanyu
Copy link
Author

通过混合量化,对注意力qkv层的conv不做量化保留float32暂时解决该问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant