【编译】NCNN编译安装

ncnn 是一个为手机端极致优化的高性能神经网络前向计算框架。

测试设备:OrangePi 5

参考资料

  • https://github.com/Tencent/ncnn
  • https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-linux

编译安装过程

拉取源码

git clone https://github.com/Tencent/ncnn.git

进入源码目录

cd ncnn/

更新子模块

git submodule update --init

更新软件源

sudo apt update

安装现关工具

sudo apt install build-essential git cmake libprotobuf-dev protobuf-compiler libvulkan-dev vulkan-utils libopencv-dev
sudo apt install mesa-vulkan-drivers

创建编译文件夹

mkdir -p build

进入编译文件夹

cd build

cmake编译

cmake -DCMAKE_BUILD_TYPE=Release -DNCNN_BUILD_EXAMPLES=ON ..

编译

make -j$(nproc)

完成!

测试,执行基准测试

cd ../benchmark
../build/benchmark/benchncnn 10 $(nproc) 0 0

在OPI 5上测试的结果为

 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值