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

please update the rknpu version to 0.98 #195

Open
kiron111 opened this issue Oct 26, 2024 · 4 comments
Open

please update the rknpu version to 0.98 #195

kiron111 opened this issue Oct 26, 2024 · 4 comments

Comments

@kiron111
Copy link

if the rknpu version is old, all the new rkllm model will not worked
pls update it, thankyou

the rknpu 0.9.8 driver is here
https://github.com/airockchip/rknn-llm/tree/main/rknpu-driver

and pls refer to the offical doc
https://github.com/airockchip/rknn-llm/tree/main/doc
quote from the offiical doc:

补充说明: 若是发现编译内核的过程中,出现如图 2-1 的错误日志: 图 2-1 内核编译错误 用户需要修改内核头文件 kernel/include/linux/mm.h,加入以下代码:
static inline void vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
{ vma->vm_flags |= flags; }
static inline void vm_flags_clear(struct vm_area_struct *vma, vm_flags_t flags)
{ vma->vm_flags &= ~flags; }
@fuzhenxiao
Copy link

I agree, currently the rknpu driver is 0.9.8, while the driver here is not updated yet.

@LuckyMouseLai
Copy link

i agree, 0.9.8 is needed.

@aileen5150
Copy link

aileen5150 commented Dec 26, 2024

编译rknpu 0.9.6 可以正常通过
rknpu 0.9.8 遇到 如下错误,不知道如何解决
[ error ] ERROR in function compile_kernel [ ./build.sh:305 -> scripts/main.sh:638 -> scripts/main.sh:541 -> scripts/compilation.sh:506 -> scripts/general.sh:0 ]
[ error ] Kernel was not built [ @host ]
[ o.k. ] Process terminated

    == kernel ==

drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c:4146:20: 警告: ‘nl80211_tx_power_setting_str’ defined but not used [-Wunused-function]
4146 | static const char nl80211_tx_power_setting_str(int type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/rtl8192eu/hal/hal_hci/hal_usb.c: 在函数‘usb_init_recv_priv’中:
drivers/net/wireless/rtl8192eu/hal/hal_hci/hal_usb.c:28:22: 警告: cast between incompatible function types from ‘void (
)(void )’ to ‘void ()(long unsigned int)’ [-Wcast-function-type]
28 | (void()(unsigned long))usb_recv_tasklet,
| ^
drivers/net/wireless/rtl8192eu/hal/rtl8192e/usb/rtl8192eu_xmit.c: 在函数‘rtl8192eu_init_xmit_priv’中:
drivers/net/wireless/rtl8192eu/hal/rtl8192e/usb/rtl8192eu_xmit.c:28:22: 警告: cast between incompatible function types from ‘void (
)(void )’ to ‘void ()(long unsigned int)’ [-Wcast-function-type]
28 | (void(*)(unsigned long))rtl8192eu_xmit_tasklet,
| ^
drivers/rknpu/rknpu_devfreq.c:237:25: 错误: ‘rockchip_opp_set_low_length’未声明(不在函数内)
237 | .set_soc_info = rockchip_opp_set_low_length,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:250:drivers/rknpu/rknpu_devfreq.o] 错误 1
make[2]: *** [scripts/Makefile.build:500:drivers/rknpu] 错误 2
make[2]: *** 正在等待未完成的任务....
make[1]: *** [scripts/Makefile.build:500:drivers] 错误 2
make: *** [Makefile:2013:.] 错误 2

@aileen5150
Copy link

问题解决了,参考 https://blog.csdn.net/weixin_74253011/article/details/141058714
rknpu_devfreq.c:
static const struct rockchip_opp_data rk3576_npu_opp_data = {
.set_read_margin = rk3576_npu_set_read_margin,
// .set_soc_info = rockchip_opp_set_low_length, 未定义, 需要删除
#if KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE
.config_regulators = npu_opp_config_regulators,
.config_clks = npu_opp_config_clks,
#endif
};

更新后查看板子上的/sys/kernel/debug/rknpu/version
显示 RKNPU driver: v0.9.8

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

4 participants