Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.52k stars 4.18k forks source link

amlogic a311d andorid armv7 编译出错 #3534

Open 2050airobert opened 2 years ago

2050airobert commented 2 years ago

error log | 日志或报错信息 | ログ

为了在我的平台上跑ncnn的网络模型,首先我想在编译andorid armv7 版本的benchncnn 二进制可执行程序。 我得到了 build-android-armv7文件夹下的CMakeCache.txt,通过build.sh脚本生成,但是不知道怎么生成ncnn的可执行程序benchncnn 问题: 1、ncnn是否可以在 amlogic a311d 平台 android 9 (linux 4.9) 平台上正常运行 cnn model,是否有一个比较完整清晰的例子 ,有的话麻烦发一下链接 2、是否有教程或者简单的网页介绍,如何生成benchncnn 二进制可执行程序

context | 编译/运行环境 | バックグラウンド

amlogic a311d 平台 android 9 (linux 4.9)

how to reproduce | 复现步骤 | 再現方法

1.ncnn源码目录下的 build.sh 以及cmake相关文件 2.参考https://blog.csdn.net/jmu201521121021/article/details/103827760/ 编译andorid armv7 版本

2050airobert commented 2 years ago

Is there any docker image in which related compiling process will pass easily?

nihui commented 2 years ago

see how-to-build doc https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-android

2050airobert commented 2 years ago

1,however,when running “ncnn/build-android-aarch64# cmake -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK/build/cmake/android.toolchain.cmake"  -DANDROID_ABI="arm64-v8a"   -DANDROID_PLATFORM=android-21 ..” ,error ocurs as below: “CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.”  2,After compiling the ncnn with the config of "andorid armv7" ,  when running the benchncnn program on my amlogic a331d platform,error ocurs as below "1|w400:/data/local/tmp/ncnn_test # ./benchncnn /system/bin/sh: ./benchncnn: not executable: 64-bit ELF file" what is wrong with that?     

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年1月27日(星期四) 晚上6:38 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Tencent/ncnn] amlogic a311d andorid armv7 编译出错 (Issue #3534)

see how-to-build doc https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-android

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

2050airobert commented 2 years ago

3,the third question is, how to generate the program on the amlogic a311d NPU?

nihui commented 2 years ago

If your system is 32bit, you have to build armv7 version instead of aarch64

2050airobert commented 2 years ago

In fact, I have got the compiled result of the config  armv7 version But still error show with the above question. Please check my question one by one , tks

------------------ 原始邮件 ------------------ 发件人: "Tencent/ncnn" @.>; 发送时间: 2022年1月27日(星期四) 晚上7:11 @.>; @.**@.>; 主题: Re: [Tencent/ncnn] amlogic a311d andorid armv7 编译出错 (Issue #3534)

If your system is 32bit, you have to build armv7 version instead of aarch64

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

2050airobert commented 2 years ago

For example, with the configuration of amlogic a311d andorid armv7,I do not know if TNN could suppport the cnn model running on the platform of amlogic a311d? Is there any NPU driver for this platform?

wzyforgit commented 2 years ago

For example, with the configuration of amlogic a311d andorid armv7,I do not know if TNN could suppport the cnn model running on the platform of amlogic a311d? Is there any NPU driver for this platform?

我记得NCNN是不支持NPU的,唯一的硬件加速手段就是vulkan

2050airobert commented 2 years ago

As you say, TNN is just the upgrade version of ncnn with the same underlying principle and method? "NCNN could not work with NPU" means TNN could not also, right?

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年1月28日(星期五) 上午8:28 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Tencent/ncnn] amlogic a311d andorid armv7 编译出错 (Issue #3534)

For example, with the configuration of amlogic a311d andorid armv7,I do not know if TNN could suppport the cnn model running on the platform of amlogic a311d? Is there any NPU driver for this platform?

我记得NCNN是不支持NPU的,唯一的硬件加速手段就是vulkan

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

wzyforgit commented 2 years ago

As you say, TNN is just the upgrade version of ncnn with the same underlying principle and method? "NCNN could not work with NPU" means TNN could not also, right? ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年1月28日(星期五) 上午8:28 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Tencent/ncnn] amlogic a311d andorid armv7 编译出错 (Issue #3534) For example, with the configuration of amlogic a311d andorid armv7,I do not know if TNN could suppport the cnn model running on the platform of amlogic a311d? Is there any NPU driver for this platform? 我记得NCNN是不支持NPU的,唯一的硬件加速手段就是vulkan — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

NCNN and TNN is two diffrent project, for example, NCNN support Loongson with MSA128, but TNN not. so I think you should check and ask this question in TNN project : https://github.com/Tencent/TNN