软件环境
paddle-bfloat 0.1.7
paddle2onnx 1.2.6
paddlefsl 1.1.0
paddlemix 0.1.0
paddlenlp 3.0.0b0.post20240728
paddlepaddle-gpu 2.6.1.post112
重复问题
- 我已搜索了现有的问题
错误描述
按照https://github.com/PaddlePaddle/PaddleNLP/blob/develop/csrc/README.md
教程安装编译 Cuda 算子报错:no type named ‘hash_policy’
'''
!!
self.initialize_options()
[2024-07-30 22:04:02,198] [ INFO] dist.py:985 - running bdist_egg
[2024-07-30 22:04:03,177] [ INFO] dist.py:985 - running egg_info
[2024-07-30 22:04:03,618] [ INFO] egg_info.py:668 - writing paddlenlp_ops.egg-info/PKG-INFO
[2024-07-30 22:04:03,623] [ INFO] egg_info.py:292 - writing dependency_links to paddlenlp_ops.egg-info/dependency_links.txt
[2024-07-30 22:04:03,626] [ INFO] egg_info.py:292 - writing top-level names to paddlenlp_ops.egg-info/top_level.txt
[2024-07-30 22:04:03,918] [ INFO] sdist.py:190 - reading manifest file 'paddlenlp_ops.egg-info/SOURCES.txt'
[2024-07-30 22:04:03,928] [ INFO] util.py:328 - writing manifest file 'paddlenlp_ops.egg-info/SOURCES.txt'
[2024-07-30 22:04:03,929] [ INFO] bdist_egg.py:161 - installing library code to build/paddlenlp_ops/bdist.linux-x86_64/egg
[2024-07-30 22:04:03,930] [ INFO] dist.py:985 - running install_lib
[2024-07-30 22:04:03,930] [ INFO] dist.py:985 - running build_ext
Compiling user custom op, it will cost a few seconds.....
[2024-07-30 22:04:04,628] [ INFO] build_ext.py:533 - building 'paddlenlp_ops' extension
[2024-07-30 22:04:04,628] [ INFO] spawn.py:38 - /mnt/petrelfs/share/cuda-11.2/bin/nvcc -I/mnt/petrelfs/taitan/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/in
clude -I/mnt/petrelfs/taitan/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/include/third_party -I/mnt/petrelfs/share/cuda-11.2/include -I/mnt/petrelfs/taitan/mi
niconda3/envs/paddle/include/python3.9 -I/mnt/petrelfs/taitan/miniconda3/envs/paddle/include/python3.9 -c /mnt/petrelfs/taitan/projects/PaddleMIX/PaddleNLP/csrc/generation/
dequant_int8.cu -o /mnt/petrelfs/taitan/projects/PaddleMIX/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-39/dequant_int8.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GP
U -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -O3 -std=c++11 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__C
UDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_NO_BFLOAT162_CONVERSIONS__ -gencode arch=compute_80,code=sm_80 -w -DPADDLE_WITH_CUSTOM_KERNEL -D_GLIB
CXX_USE_CXX11_ABI=1
/mnt/petrelfs/taitan/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/include/paddle/utils/flat_hash_map.h: In instantiation of ‘struct paddle::detailv3::HashPolicy
Selector<phi::Place::Hash, void>’:
/mnt/petrelfs/taitan/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/include/paddle/utils/flat_hash_map.h:664:51: required from ‘class paddle::detailv3::sherwood
_v3_table<std::pair<phi::Place, const phi::DeviceContext*>, phi::Place, phi::Place::Hash, paddle::detailv3::KeyOrValueHasher<phi::Place, std::pair<phi::Place, const phi::Devi
ceContext*>, phi::Place::Hash>, std::equal_to<phi::Place>, paddle::detailv3::KeyOrValueEquality<phi::Place, std::pair<phi::Place, const phi::DeviceContext*>, std::equal_to<ph
i::Place> >, std::allocator<std::pair<phi::Place, const phi::DeviceContext*> >, std::allocator<paddle::detailv3::sherwood_v3_entry<std::pair<phi::Place, const phi::DeviceCont
ext*> > > >’
/mnt/petrelfs/taitan/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/include/paddle/utils/flat_hash_map.h:1578:7: required from ‘class paddle::flat_hash_map<phi:
:Place, const phi::DeviceContext*, phi::Place::Hash>’
/mnt/petrelfs/taitan/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/include/paddle/phi/api/include/context_pool.h:86:75: required from here
/mnt/petrelfs/taitan/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/include/paddle/utils/flat_hash_map.h:198:33: error: no type named ‘hash_policy’ in ‘struct phi
::Place::Hash’
typedef typename T::hash_policy type;
^
error: command '/mnt/petrelfs/share/cuda-11.2/bin/nvcc' failed with exit code 1
稳定复现步骤 & 代码
A100 80G
CDUA 11.2, V11.2.152
gcc version 11.2.0 (GCC)
Python 3.9.19
1条答案
按热度按时间gkl3eglg1#
这里的gcc版本是否是conda的gcc版本,而不是系统的gcc版本?应该是系统gcc-4.6,切换到高版本gcc可以解决问题。