PaddleNLP [Bug]: 安装paddle_ops算子时出现报错

vptzau2j  于 2个月前  发布在  其他
关注(0)|答案(4)|浏览(21)

软件环境

- paddlepaddle:
- paddlepaddle-gpu: 
- paddlenlp:

重复问题

  • 我已搜索了现有的问题

错误描述

/home/aistudio/PaddleNLP/csrc/generation/quant_int8.cu(68): error: no suitable user-defined conversion from "__nv_bfloat16" to "__half" exists

1 error detected in the compilation of "/home/aistudio/PaddleNLP/csrc/generation/quant_int8.cu".
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1

这段错误是我在用文档上写的代码安装算子时出现的:!cd /home/aistudio/PaddleNLP/csrc && python setup_cuda.py install
这样我之后也没法用block_attn
我的基础环境就是飞桨notebook的基础环境

稳定复现步骤 & 代码

%cd /home/aistudio/work
!git clone [https://github.com/PaddlePaddle/PaddleNLP](https://github.com/PaddlePaddle/PaddleNLP)
!cd ./PaddleNLP/csrc && python setup_cuda.py install
s2j5cfk0

s2j5cfk01#

我完全按照你们提供的文档进行操作,为了确保依赖库存在,我还使用了以下命令:

pip install --pre --upgrade paddlenlp -f [https://www.paddlepaddle.org.cn/whl/paddlenlp.html](https://www.paddlepaddle.org.cn/whl/paddlenlp.html)
pip install cupy-cuda116 pybind11
sshcrbum

sshcrbum2#

如果不使用block_attn,我倒是可以推理起来大语言模型。

ki0zmccv

ki0zmccv3#

值得一提的是,在开始安装这个算子时,它还给出了提醒:

[2024-08-09 19:45:04,878] [INFO] dist.py:985 - running install
/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!!
self.initialize_options()
/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

********************************************************************************
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!!
self.initialize_options()
认为该安装用的是即将被遗弃的命令

bweufnob

bweufnob4#

当前算子仅支持在支持bf16环境上编译安装,当前星河社区可使用A100 40G进行安装,V100环境暂无法安装

相关问题