PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12.18k stars 2.95k forks source link

[Question]: 集成测试代码出现ModuleNotFoundError. 安装失败,如何解决? #9375

Closed WhuanY closed 2 weeks ago

WhuanY commented 3 weeks ago

请提出你的问题

!! self.initialize_options() /home/wuyuhuan/anaconda3/envs/PaddleLoKr/lib/python3.8/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() running bdist_egg running egg_info writing paddlenlp_ops.egg-info/PKG-INFO writing dependency_links to paddlenlp_ops.egg-info/dependency_links.txt writing top-level names to paddlenlp_ops.egg-info/top_level.txt reading manifest file 'paddlenlp_ops.egg-info/SOURCES.txt' writing manifest file 'paddlenlp_ops.egg-info/SOURCES.txt' installing library code to build/paddlenlp_ops/bdist.linux-x86_64/egg running install_lib running build_ext Compiling user custom op, it will cost a few seconds..... building 'paddlenlp_ops' extension /usr/local/cuda/bin/nvcc -I/home/wuyuhuan/anaconda3/envs/PaddleLoKr/lib/python3.8/site-packages/paddle/include -I/home/wuyuhuan/anaconda3/envs/PaddleLoKr/lib/python3.8/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/home/wuyuhuan/anaconda3/envs/PaddleLoKr/include/python3.8 -I/home/wuyuhuan/anaconda3/envs/PaddleLoKr/include/python3.8 -c /home/wuyuhuan/PaddleNLP/csrc/gpu/dequant_int8.cu -o /home/wuyuhuan/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-38/dequant_int8.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -gencode arch=compute_80,code=sm_80 -O3 -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_BFLOAT16_OPERATORS -UCUDA_NO_BFLOAT16_CONVERSIONS -UCUDA_NO_BFLOAT162_OPERATORS -UCUDA_NO_BFLOAT162_CONVERSIONS -Igpu -Igpu/cutlass_kernels -Igpu/fp8_gemm_with_cutlass -Igpu/cutlass_kernels/fp8_gemm_fused/autogen -Ithird_party/cutlass/include -Ithird_party/nlohmann_json/single_include -Igpu/sample_kernels -w -DPADDLE_WITH_CUSTOM_KERNEL -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++17 In file included from /home/wuyuhuan/PaddleNLP/csrc/gpu/dequant_int8.cu:15: /home/wuyuhuan/PaddleNLP/csrc/gpu/helper.h:40:10: fatal error: nlohmann/json.hpp: No such file or directory 40 | #include "nlohmann/json.hpp"

的问题。
既然没有fetch成功,我猜想可能是版本问题,于是自己到对应的nlohmann仓库去fetch,放到指定工作目录下:
![image](https://github.com/user-attachments/assets/ad0cccbe-3ff4-4008-9547-61f4442134da)
再次运行:

python setup_cuda.py install

出现了我不知道如何解决的问题:

/usr/lib/gcc/x86_64-linux-gnu/13/include/amxtileintrin.h(42): error: identifier "builtin_ia32_ldtilecfg" is undefined builtin_ia32_ldtilecfg (__config); ^

/usr/lib/gcc/x86_64-linux-gnu/13/include/amxtileintrin.h(49): error: identifier "builtin_ia32_sttilecfg" is undefined builtin_ia32_sttilecfg (__config); ^

2 errors detected in the compilation of "/home/wuyuhuan/PaddleNLP/csrc/gpu/dequant_int8.cu". error: command '/usr/local/cuda/bin/nvcc' failed with exit code 2


有没有其他办法解决该算子问题?或者说原本的.md文档需要更新?多谢😊
ZHUI commented 3 weeks ago

你好

  1. 如果你的测试,不需要跑预测。可以直接注释掉相关推理测试的运行代码
  2. 编译问题可能是版本问题,你本地的cuda 和 gcc 是什么版本?
WhuanY commented 2 weeks ago

不需要跑预测