PaddlePaddle / PaddleCustomDevice

PaddlePaddle custom device implementaion. (『飞桨』自定义硬件接入实现)
Apache License 2.0
68 stars 142 forks source link

使用昇腾卡910A时编译安装报错,cann7.01-arm镜像 & paddle 2.6.1 #1370

Open CanJie opened 1 month ago

CanJie commented 1 month ago

910A arm,CANN 7.0.1 paddlepaddle和paddle custom device版本是2.6.1 图片 图片 图片 执行编译脚本时报错如下: 企业微信截图_17231209919168 提示的cmake报错行如下:

CanJie commented 1 month ago

企业微信截图_17231197274256

CanJie commented 1 month ago

图片

CanJie commented 1 month ago

python -c "import re, paddle; print(re.compile('/init.py.*').sub('',paddle.file))" pip show paddlepaddle 图片

类似issues没有找到答案: https://github.com/PaddlePaddle/PaddleCustomDevice/issues/1258 https://github.com/PaddlePaddle/PaddleCustomDevice/issues/740

CanJie commented 1 month ago

记录: 910 B2/3/4 设备 paddle-npu的3.0b1版本有完整的包。 1、另paddle官网能下载到的paddlelite最新版本是 inference_lite_lib.ky10.armv8.huawei_ascend_npu.CANN5.1.RC1.alpha001.tar.gz,5.1.RC1属于22Q1的版本。 Linux x86 环境下编译适用于 ARM Linux 的库 https://www.paddlepaddle.org.cn/lite/v2.12/source_compile/linux_x86_compile_arm_linux.html ARM Linux 环境下编译适用于 ARM Linux 的库 https://www.paddlepaddle.org.cn/lite/v2.12/source_compile/arm_linux_compile_arm_linux.html

2、Paddle Inference官网主要提供了x86下cpu、gpu的包,aarch64下cpu、npu的编译也需构建。 飞腾/鲲鹏 CPU 安装说明 https://www.paddlepaddle.org.cn/inference/v2.6/guides/hardware_support/cpu_phytium_cn.html 昇腾 NPU 安装说明 https://www.paddlepaddle.org.cn/inference/v2.6/guides/hardware_support/npu_ascend_cn.html

3、昇腾310p上对PaddlePaddle进行编译 CustomDevice没有支持过昇腾310,但是理论上CustomDevice也可以支持昇腾310的芯片,需要修改2个地方 1).可以先参考 https://github.com/PaddlePaddle/PaddleCustomDevice/tree/develop/backends/npu/tools/dockerfilehttps://github.com/PaddlePaddle/PaddleCustomDevice/blob/release/2.6/backends/npu/tools/dockerfile 目录下的dockerfile文件,将其中昇腾910/910B的安装包替换为310的安装包并构建支持310编译的基础镜像; 2).然后参考 https://github.com/PaddlePaddle/PaddleCustomDevice/blob/develop/backends/npu/README_cn.mdhttps://github.com/PaddlePaddle/PaddleCustomDevice/blob/release/2.6/backends/npu/README_cn.md 这个文档进行编译,CANN版本建议尽量选择和这个文档中910芯片一致的版本。

onecatcn commented 1 week ago

请加一下我微信吧,希望有机会沟通使用反馈 IMG_6863