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
Android手机上shell仿真测试,.so可以调起vulkan但.a失败 #2823
Comments
应该还是 faq 里面说的那个问题,没有链接注册函数:
|
请问中间这个MNN是指什么呢? |
就是原先你的程序是 -l MNN 改成 -Wl,--whole-archive MNN -Wl,--no-whole-archive |
1 similar comment
就是原先你的程序是 -l MNN 改成 -Wl,--whole-archive MNN -Wl,--no-whole-archive |
我原先程序中没有-l MNN 🤣 LOCAL_CFLAGS += -pie -fPIE |
不了解 Android.mk 怎么实现 .a 符号的全链接,可以网上搜搜看 |
已解决🆗 |
平台(如果交叉编译请再附上交叉编译目标平台):
Platform(Include target platform as well if cross-compiling):
在ubuntu上编译,跑在Android手机shell,64位
Github版本:
Github Version:
MNN-2.8.1.zip 24/1/3
直接下载ZIP包请提供下载日期以及压缩包注释里的git版本(可通过
7z l zip包路径
命令并在输出信息中搜索Comment
获得,形如Comment = bc80b11110cd440aacdabbf59658d630527a7f2b
)。 git clone请提供git commit
第一行的commit idProvide date (or better yet, git revision from the comment section of the zip. Obtainable using
7z l PATH/TO/ZIP
and search forComment
in the output) if downloading source as zip,otherwise provide the first commit id from the output ofgit commit
编译方式:
Compiling Method
编译日志:
Build Log:
编译静态库和动态库均没有报错,在Android shell下,.so库可使用openCL和Vulkan,.a库可使用OpenCL但使用不了Vulkan,提示如下:
如果在ScheduleConfig中添加:.backupType = MNN_FORWARD_VULKAN,则提示无法创建Runtime,如下:
此前类似问题中提出的解决方法:
~ 编译添加完全链接:GCC: -Wl,--whole-archive MNN -Wl,--no-whole-archive
~ 编译关闭 MNN_SEP_BUILD
均有尝试,但仍不解决问题
已检查手机平台GPU是支持Vulkan接口的,是否和Android手机权限有关?但为什么libMNN_Vulkan.so却可以调起Vulkan呢?
谢谢😛
The text was updated successfully, but these errors were encountered: