当前位置: 首页 > news >正文

jetson orin nane 编译 paddle

参考:https://github.com/paddlepaddle/paddle/issues/74126

一、下载与编译

git clone https://github.com/PaddlePaddle/Paddle.git
cd Paddlemkdir -p build && cd ./buildcmake .. -DPY_VERSION=3.10 \-DWITH_MKL=OFF \-DWITH_TESTING=OFF \-DCMAKE_BUILD_TYPE=Release \-DON_INFER=ON \-DWITH_PYTHON=ON \-DWITH_XBYAK=OFF \-DWITH_NV_JETSON=ON \-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \-DWITH_NCCL=OFF \-DWITH_RCCL=OFF \-DWITH_DISTRIBUTE=OFF \-DWITH_GPU=ON \-DWITH_TENSORRT=ON \-DWITH_ARM=ON \-DCMAKE_CXX_FLAGS="-Wno-error=class-memaccess"ulimit -n 65535 && make TARGET=ARMV8 -j3pip install python/dist/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_aarch64.whl

二、报错处理

1、backends::gpu::ChangeThreadNum(dev_ctx, &threads, 256);

解决

176   int64_t output_size = out->numel();
177   uint32_t blocks = NumBlocks(output_size);
178   uint32_t threads = kNumCUDAThreads;
179 #ifdef WITH_NV_JETSON
180   backends::gpu::ChangeThreadNum(dev_ctx, &threads, 256);
181 #endif26 static constexpr int kNumCUDAThreads = 512;27 static constexpr int kNumMaximumNumBlocks = 4096;28 static constexpr int kROISize = 4;180   backends::gpu::ChangeThreadNum(dev_ctx, (int*)(&threads), 256);

2、sh: 1: patchelf: not found

[100%] Packing whl packages------>>>
fatal: Not a valid object name 2>/dev/null
sh: 1: patchelf: not found

Traceback (most recent call last):
  File "/mnt/ssd2/Paddle/build/python/setup.py", line 1312, in <module>
    raise Exception("patch libpaddle.%s failed, command: %s" % (ext_name, command))
Exception: patch libpaddle..so failed, command: patchelf --set-rpath '$ORIGIN/../../nvidia/cuda_runtime/lib:$ORIGIN/../../nvidia/cuda_nvrtc/lib:$ORIGIN/../../nvidia/cublas/lib:$ORIGIN/../../nvidia/cudnn/lib:$ORIGIN/../../nvidia/curand/lib:$ORIGIN/../../nvidia/cusparse/lib:$ORIGIN/../../nvidia/nvjitlink/lib:$ORIGIN/../../nvidia/cuda_cupti/lib:$ORIGIN/../../nvidia/cuda_runtime/lib:$ORIGIN/../../nvidia/cufft/lib:$ORIGIN/../../nvidia/cufft/lib:$ORIGIN/../../nvidia/cusolver/lib:$ORIGIN/../../nvidia/nccl/lib:$ORIGIN/../../nvidia/nvtx/lib:$ORIGIN/../libs/' /home/nvidia/ssd2/Paddle/build/python/paddle/base/libpaddle.so
make[2]: *** [python/CMakeFiles/paddle_copy.dir/build.make:73: python/build/.timestamp_wheel] Error 1
make[1]: *** [CMakeFiles/Makefile2:40696: python/CMakeFiles/paddle_copy.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

解决

sudo apt install patchelf

3、RuntimeError: Missing build dependency: httpx

[100%] Built target inference_lib_dist
Traceback (most recent call last):
  File "/mnt/ssd2/Paddle/build/python/setup.py", line 1610, in <module>
    check_build_dependency()
  File "/mnt/ssd2/Paddle/build/python/setup.py", line 1565, in check_build_dependency
    raise RuntimeError(missing_modules.format(dependency=dependency))
RuntimeError: Missing build dependency: httpx
Please run 'pip install -r python/requirements.txt' to make sure you have all the
dependencies installed.
make[2]: *** [python/CMakeFiles/paddle_copy.dir/build.make:73: python/build/.timestamp_wheel] Error 1
make[1]: *** [CMakeFiles/Makefile2:40696: python/CMakeFiles/paddle_copy.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

解决

python3 -m venv paddle_env
source paddle_env/bin/activate
pip install -r ../python/requirements.txt

4、[100%] Built target inference_lib_dist

解决

# You are in the Paddle/build directory.
cd python
python setup.py bdist_wheel# Now you find out that there are still missing libraries time after time after each launch.
# Here is the installation of all the libs that I was missing
pip install pyyaml
pip install pybind11-stubgen
pip install wheel
# You can probably install those packages and run make again 
http://www.dtcms.com/a/470018.html

相关文章:

  • 兰州网站卡法百度网页收录
  • [1-02-05].第04章:Win工具
  • 软件需求规格说明书(SRS)标准模板与编写指南——含功能需求、非功能需求、接口设计与验收标准
  • VS 2022 中创建一个最小的 Django 项目
  • 建设网站的功能定位是什么原因网站建设模版
  • 网站建设教程书籍免费下载网站是公司域名是个人可以吗
  • 编译原理机测客观题(3)自顶向下语法分析练习题
  • [学习日记][springboot 1-7][leetcode 6道]
  • 双榜加冕!赛博威入选第一新声AI Agent厂商图谱与AI产业创新先锋榜单
  • YOLO 目标检测算法全解析:原理、分类与性能指标
  • 华为5736交换机 dhcp静态绑定方法
  • 网站建设要求 优帮云合肥seo网站管理
  • LeetCode 3186.施咒的最大总伤害:动态规划+双指针——O(1)空间(暂未发现其他O(1)空间的题解)
  • LeetCode 热题 100(持续更新版)
  • 网站开发 jsp开发工具网页设计介绍说明
  • 沈阳网站建站推广湖南网站建设效果
  • 会员体系搭建攻略讲解:从分层运营到提升用户忠诚度
  • Merkle Tree(默克尔树)原理分析
  • Vue3 学习笔记 8:其它 API
  • 库早报|15999元!先临三维发布口袋式3D扫描仪;激光制造与增材制造大会延期;拓竹双项入选《时代》年度发明榜
  • 流量网站建设教程电子商务网站建设php
  • React中Element、Fiber、createElement和Component关系
  • 大语言模型(LLM)是“预制菜”? 从应用到底层原理,在到中央厨房的深度解析
  • 做的好的商城网站南昌网站搭建公司 赣ICP
  • 软件测试资源笔记(4万字,持续更新中)
  • 做外贸网站做成哪种形式好WordPress购物个人中心
  • LeetCode 395 - 至少有 K 个重复字符的最长子串
  • 科技有限公司可以做网站建设吗成都网站网络建设
  • Qt绘制折线图
  • Idea中新建package包,变成了Directory