Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

昇腾910B源码编译安装失败 #64180

Closed
fallbernana123456 opened this issue May 10, 2024 · 3 comments
Closed

昇腾910B源码编译安装失败 #64180

fallbernana123456 opened this issue May 10, 2024 · 3 comments
Assignees
Labels
status/close 已关闭 type/build 编译/安装问题

Comments

@fallbernana123456
Copy link

问题描述 Issue Description

安装https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/hardware_support/npu/install_cn.html#wheel文档说明,安装完paddlepaddle==2.6.1 的CPU版,再cd PaddleCustomDevice/backends/npu;bash tools/compile.sh;
报错:
In file included from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/npu_funcs.h:19,
from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/conv_util.h:16,
from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/conv2d_kernel.cc:15:
/opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/npu_enforce.h: In function ‘typename std::conditional<std::is_pointer<_Dp>::value, const OutputType*, const OutputType&>::type custom_kernel::details::SafeBoostGetConst(const InputType&, const char*, const char*, int)’:
/opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/npu_enforce.h:52:32: error: ‘EnforceNotMet’ is not a member of ‘common::enforce’; did you mean ‘phi::enforce::EnforceNotMet’?
52 | throw ::common::enforce::EnforceNotMet(
| ^~~~~~~~~~~~~
/opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/npu_enforce.h:65:1: note: in expansion of macro ‘DEFINE_SAFE_BOOST_GET’
65 | DEFINE_SAFE_BOOST_GET(const InputType&,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/npu_enforce.h:21,
from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/npu_funcs.h:19,
from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/conv_util.h:16,
from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/conv2d_kernel.cc:15:
/root/exit/envs/sunzhiyuan/lib/python3.10/site-packages/paddle/include/paddle/phi/core/enforce.h:233:8: note: ‘phi::enforce::EnforceNotMet’ declared here
233 | struct EnforceNotMet : public std::exception {
| ^~~~~~~~~~~~~
In file included from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/npu_funcs.h:19,
from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/conv_util.h:16,
from /opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/conv2d_kernel.cc:15:
/opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/npu_enforce.h:57:23: error: ‘demangle’ is not a member of ‘common’; did you mean ‘phi::enforce::demangle’?
57 | common::demangle(typeid(OutputType).name()),
| ^~~~~~~~
/opt/sunzhiyuan/ocr/PaddleCustomDevice/backends/npu/kernels/funcs/npu_enforce.h:65:1: note: in expansion of macro ‘DEFINE_SAFE_BOOST_GET’
65 | DEFINE_SAFE_BOOST_GET(const InputType&,
| ^~~~~~~~~~~~~~~~~~~~~
.................................................................
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:76: CMakeFiles/paddle-custom-npu.dir/runtime/runtime.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:258: CMakeFiles/paddle-custom-npu.dir/kernels/argsort_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:244: CMakeFiles/paddle-custom-npu.dir/kernels/argsort_grad_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:384: CMakeFiles/paddle-custom-npu.dir/kernels/clip_by_norm_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:356: CMakeFiles/paddle-custom-npu.dir/kernels/c_identity_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:440: CMakeFiles/paddle-custom-npu.dir/kernels/concat_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:300: CMakeFiles/paddle-custom-npu.dir/kernels/bce_loss_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:314: CMakeFiles/paddle-custom-npu.dir/kernels/bitwise_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:160: CMakeFiles/paddle-custom-npu.dir/kernels/adam_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:202: CMakeFiles/paddle-custom-npu.dir/kernels/amp/update_loss_scaling_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:132: CMakeFiles/paddle-custom-npu.dir/kernels/adadelta_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:216: CMakeFiles/paddle-custom-npu.dir/kernels/arange_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:272: CMakeFiles/paddle-custom-npu.dir/kernels/assign_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:90: CMakeFiles/paddle-custom-npu.dir/kernels/abs_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:146: CMakeFiles/paddle-custom-npu.dir/kernels/adagrad_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:104: CMakeFiles/paddle-custom-npu.dir/kernels/accuracy_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:230: CMakeFiles/paddle-custom-npu.dir/kernels/arg_min_max_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:370: CMakeFiles/paddle-custom-npu.dir/kernels/cast_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:328: CMakeFiles/paddle-custom-npu.dir/kernels/bmm_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:342: CMakeFiles/paddle-custom-npu.dir/kernels/box_coder_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:286: CMakeFiles/paddle-custom-npu.dir/kernels/batch_norm_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:482: CMakeFiles/paddle-custom-npu.dir/kernels/conv_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:398: CMakeFiles/paddle-custom-npu.dir/kernels/clip_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:174: CMakeFiles/paddle-custom-npu.dir/kernels/add_n_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:412: CMakeFiles/paddle-custom-npu.dir/kernels/coalesce_tensor_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:188: CMakeFiles/paddle-custom-npu.dir/kernels/amp/check_finite_and_unscale_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:468: CMakeFiles/paddle-custom-npu.dir/kernels/conv2d_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:454: CMakeFiles/paddle-custom-npu.dir/kernels/contiguous_kernel.cc.o] Error 1
make[2]: *** [CMakeFiles/paddle-custom-npu.dir/build.make:118: CMakeFiles/paddle-custom-npu.dir/kernels/activation_kernel.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:160: CMakeFiles/paddle-custom-npu.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

  • make_error=2
  • '[' 2 '!=' 0 ']'
  • echo 'Make Error Found !!!'
    Make Error Found !!!
  • exit 7

版本&环境信息 Version & Environment Information

cpu : 鲲鹏920
npu:昇腾910B
cmake: 3.22.1
安装方式: 源码编译 https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/hardware_support/npu/install_cn.html#wheel
系统版本:Ubuntu 22.04
PaddlePaddle版本:2.6.1

@fallbernana123456
Copy link
Author

本想按# 先安装飞桨 CPU 安装包
pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html

再安装飞桨 NPU 插件包

wget https://paddle-device.bj.bcebos.com/0.0.0/npu/paddle_custom_npu-0.0.0-cp310-cp310-linux_x86_64.whl
pip install -U paddle_custom_npu-0.0.0-cp310-cp310-linux_x86_64.whl
但是这个方式里的whl包的链接已经失效。请问还有什么方法能安装NPU版本的paddlepaddle吗?

@zhiboniu
Copy link
Contributor

你好,请问你的编译环境是在paddle 提供的docker中吗?

@qili93
Copy link
Contributor

qili93 commented May 14, 2024

您好,对昇腾910B的支持,建议升级到最新的Paddle develop分支的版本,可以参考如下文档 https://github.com/PaddlePaddle/PaddleCustomDevice/blob/develop/backends/npu/README_cn.md 进行编译安装。

如果您需要最新的develop分支的安装包,可以直接从这个链接下载

CPU:https://www.paddlepaddle.org.cn/packages/nightly/cpu/paddlepaddle/
NPU:https://www.paddlepaddle.org.cn/packages/nightly/npu/paddle-custom-npu/

请尽量选择同一日期的安装包进行安装即可。

@paddle-bot paddle-bot bot added status/close 已关闭 and removed status/new-issue 新建 labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/close 已关闭 type/build 编译/安装问题
Projects
None yet
Development

No branches or pull requests

3 participants