Jetson Nano安装MNN深度学习框架

文章讲述了在NVIDIAJetsonNano设备上安装阿里巴巴MNN深度学习框架时遇到的编译错误,涉及`Vec.hpp`文件中的类型转换问题,并提供了可能的解决方法,如检查并启用`-flax-vector-conversions`编译选项。
摘要由CSDN通过智能技术生成

Jetson Orin Nano安装MNN深度学习框架

安装阿里巴巴的MNN框架

请参阅这里的文档: 在Jetson Nano上安装MNN深度学习框架

MNN 编译错误

1. question

In file included from /root/mnn-llm/MNN/source/backend/cpu/CPUBinary.cpp:18:
/root/mnn-llm/MNN/source/math/Vec.hpp: In member function ‘MNN::Math::Vec<float, 4>::VecType MNN::Math::Vec<float, 4>::operator<(const VecType&) const:
/root/mnn-llm/MNN/source/math/Vec.hpp:508:51: error: could not convert ‘{vbslq_s32(res, ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::one), ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::zero))}’ from ‘<brace-enclosed initializer list>’ to ‘MNN::Math::Vec<float, 4>::VecType’ {aka ‘MNN::Math::Vec<float, 4>}
  508 |         VecType dst = { vbslq_s32(res, one, zero) };
      |                                                   ^
      |                                                   |
      |                                                   <brace-enclosed initializer list>
/root/mnn-llm/MNN/source/math/Vec.hpp: In member function ‘MNN::Math::Vec<float, 4>::VecType MNN::Math::Vec<float, 4>::operator>(const VecType&) const:
/root/mnn-llm/MNN/source/math/Vec.hpp:513:51: error: could not convert ‘{vbslq_s32(res, ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::one), ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::zero))}’ from ‘<brace-enclosed initializer list>’ to ‘MNN::Math::Vec<float, 4>::VecType’ {aka ‘MNN::Math::Vec<float, 4>}
  513 |         VecType dst = { vbslq_s32(res, one, zero) };
      |                                                   ^
      |                                                   |
      |                                                   <brace-enclosed initializer list>
/root/mnn-llm/MNN/source/math/Vec.hpp: In member function ‘MNN::Math::Vec<float, 4>::VecType MNN::Math::Vec<float, 4>::operator<=(const VecType&) const:
/root/mnn-llm/MNN/source/math/Vec.hpp:518:51: error: could not convert ‘{vbslq_s32(res, ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::one), ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::zero))}’ from ‘<brace-enclosed initializer list>’ to ‘MNN::Math::Vec<float, 4>::VecType’ {aka ‘MNN::Math::Vec<float, 4>}
  518 |         VecType dst = { vbslq_s32(res, one, zero) };
      |                                                   ^
      |                                                   |
      |                                                   <brace-enclosed initializer list>
/root/mnn-llm/MNN/source/math/Vec.hpp: In member function ‘MNN::Math::Vec<float, 4>::VecType MNN::Math::Vec<float, 4>::operator>=(const VecType&) const:
/root/mnn-llm/MNN/source/math/Vec.hpp:523:51: error: could not convert ‘{vbslq_s32(res, ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::one), ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::zero))}’ from ‘<brace-enclosed initializer list>’ to ‘MNN::Math::Vec<float, 4>::VecType’ {aka ‘MNN::Math::Vec<float, 4>}
  523 |         VecType dst = { vbslq_s32(res, one, zero) };
      |                                                   ^
      |                                                   |
      |                                                   <brace-enclosed initializer list>
/root/mnn-llm/MNN/source/math/Vec.hpp: In member function ‘MNN::Math::Vec<float, 4>::VecType MNN::Math::Vec<float, 4>::operator==(const VecType&) const:
/root/mnn-llm/MNN/source/math/Vec.hpp:528:51: error: could not convert ‘{vbslq_s32(res, ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::one), ((int32x4_t)((const MNN::Math::Vec<float, 4>*)this)->MNN::Math::Vec<float, 4>::zero))}’ from ‘<brace-enclosed initializer list>’ to ‘MNN::Math::Vec<float, 4>::VecType’ {aka ‘MNN::Math::Vec<float, 4>}
  528 |         VecType dst = { vbslq_s32(res, one, zero) };
      |                                                   ^
      |                                                   |
      |                                                   <brace-enclosed initializer list>

参阅这里: NVIDIA Jetson编译报错
安装 MNN 2.7.1 编译不会报错
版本号 2.7.1

2. question

In file included from /home/orangepi/MNN/source/backend/cpu/CPUBinary.cpp:18:
/home/orangepi/MNN/source/math/Vec.hpp: In static member function ‘static void MNN::Math::Vec<int, 4>::transpose4(MNN::Math::Vec<int, 4>::VecType&, MNN::Math::Vec<int, 4>::VecType&, MNN::Math::Vec<int, 4>::VecType&, MNN::Math::Vec<int, 4>::VecType&):
/home/orangepi/MNN/source/math/Vec.hpp:300:66: note: use ‘-flax-vector-conversions’ to permit conversions between vectors with differing element types or numbers of subparts
300 | vec0.value = vsetq_lane_s64(vgetq_lane_s64(m2m3.val[0], 0), vec0.value, 1);
| ^
/home/orangepi/MNN/source/math/Vec.hpp:300:62: error: cannot convert ‘int32x4_t’ {aka ‘__vector(4) int} to ‘int64x2_t’ {aka ‘__vector(2) long long int}
300 | vec0.value = vsetq_lane_s64(vgetq_lane_s64(m2m3.val[0], 0), vec0.value, 1);
| ~~~~~~~~~~^
| |
| int32x4_t {aka __vector(4) int}
In file included from /home/orangepi/MNN/source/math/Vec.hpp:16,
from /home/orangepi/MNN/source/backend/cpu/CPUBinary.cpp:18:
/usr/lib/gcc/arm-linux-gnueabihf/9/include/arm_neon.h:6307:27: note: initializing argument 1 of ‘int64_t vgetq_lane_s64(int64x2_t, int)6307 | vgetq_lane_s64 (int64x2_t __a, const int __b)
| ~~~~~~~~~~^~~
In file included from /home/orangepi/MNN/source/backend/cpu/CPUBinary.cpp:18:
/home/orangepi/MNN/source/math/Vec.hpp:301:62: error: cannot convert ‘int32x4_t’ {aka ‘__vector(4) int} to ‘int64x2_t’ {aka ‘__vector(2) long long int}
301 | vec1.value = vsetq_lane_s64(vgetq_lane_s64(m2m3.val[1], 0), vec1.value, 1);
| ~~~~~~~~~~^
| |
| int32x4_t {aka __vector(4) int}
In file included from /home/orangepi/MNN/source/math/Vec.hpp:16,
from /home/orangepi/MNN/source/backend/cpu/CPUBinary.cpp:18:
/usr/lib/gcc/arm-linux-gnueabihf/9/include/arm_neon.h:6307:27: note: initializing argument 1 of ‘int64_t vgetq_lane_s64(int64x2_t, int)6307 | vgetq_lane_s64 (int64x2_t __a, const int __b)
| ~~~~~~~~~~^~~
In file included from /home/orangepi/MNN/source/backend/cpu/CPUBinary.cpp:18:
/home/orangepi/MNN/source/math/Vec.hpp:302:62: error: cannot convert ‘int32x4_t’ {aka ‘__vector(4) int} to ‘int64x2_t’ {aka ‘__vector(2) long long int}
302 | vec2.value = vsetq_lane_s64(vgetq_lane_s64(m0m1.val[0], 1), vec2.value, 0);
| ~~~~~~~~~~^
| |
| int32x4_t {aka __vector(4) int}

参阅这里: 求助!MNN编译错误

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值