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

[Bug]:编译paddlenlp_ops报错 #9206

Open
1 task done
Jakin-huang opened this issue Sep 26, 2024 · 3 comments
Open
1 task done

[Bug]:编译paddlenlp_ops报错 #9206

Jakin-huang opened this issue Sep 26, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Jakin-huang
Copy link

软件环境

paddle2onnx               1.2.3
paddlefsl                 1.1.0
paddlenlp                 3.0.0b1
paddleocr                 2.8.1
paddlepaddle              2.6.2
paddlepaddle-gpu          2.6.2

重复问题

  • I have searched the existing issues

错误描述

self.initialize_options()
[2024-09-26 17:32:48,516] [    INFO] dist.py:985 - running bdist_egg
[2024-09-26 17:32:48,549] [    INFO] dist.py:985 - running egg_info
[2024-09-26 17:32:48,558] [    INFO] egg_info.py:668 - writing paddlenlp_ops.egg-info/PKG-INFO
[2024-09-26 17:32:48,559] [    INFO] egg_info.py:292 - writing dependency_links to paddlenlp_ops.egg-info/dependency_links.txt
[2024-09-26 17:32:48,559] [    INFO] egg_info.py:292 - writing top-level names to paddlenlp_ops.egg-info/top_level.txt
[2024-09-26 17:32:48,569] [    INFO] sdist.py:190 - reading manifest file 'paddlenlp_ops.egg-info/SOURCES.txt'
[2024-09-26 17:32:48,571] [    INFO] util.py:328 - writing manifest file 'paddlenlp_ops.egg-info/SOURCES.txt'
[2024-09-26 17:32:48,571] [    INFO] bdist_egg.py:161 - installing library code to build/paddlenlp_ops/bdist.linux-x86_64/egg
[2024-09-26 17:32:48,571] [    INFO] dist.py:985 - running install_lib
[2024-09-26 17:32:48,571] [    INFO] dist.py:985 - running build_ext
Compiling user custom op, it will cost a few seconds.....
[2024-09-26 17:32:48,733] [    INFO] build_ext.py:533 - building 'paddlenlp_ops' extension
[2024-09-26 17:32:48,734] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/dequant_int8.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/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 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
[2024-09-26 17:33:09,976] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/encode_rotary_qk.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/encode_rotary_qk.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -gencode arch=compute_80,code=sm_80 -O3 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
[2024-09-26 17:33:31,497] [    INFO] spawn.py:38 - gcc -pthread -B /root/anaconda3/envs/paddle-nlp/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /root/anaconda3/envs/paddle-nlp/include -fPIC -O2 -isystem /root/anaconda3/envs/paddle-nlp/include -fPIC -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/flash_attn_bwd.cc -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/flash_attn_bwd.o -O3 -w -DPADDLE_WITH_CUSTOM_KERNEL -D_GLIBCXX_USE_CXX11_ABI=1 -DPADDLE_WITH_CUDA -std=c++14
[2024-09-26 17:33:39,460] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/fused_get_rope.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/fused_get_rope.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -gencode arch=compute_80,code=sm_80 -O3 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
[2024-09-26 17:33:58,618] [    INFO] spawn.py:38 - gcc -pthread -B /root/anaconda3/envs/paddle-nlp/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /root/anaconda3/envs/paddle-nlp/include -fPIC -O2 -isystem /root/anaconda3/envs/paddle-nlp/include -fPIC -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/get_output.cc -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/get_output.o -O3 -w -DPADDLE_WITH_CUSTOM_KERNEL -D_GLIBCXX_USE_CXX11_ABI=1 -DPADDLE_WITH_CUDA -std=c++14
[2024-09-26 17:34:05,474] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/get_padding_offset.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/get_padding_offset.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -gencode arch=compute_80,code=sm_80 -O3 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
[2024-09-26 17:34:25,606] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/get_padding_offset_v2.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/get_padding_offset_v2.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -gencode arch=compute_80,code=sm_80 -O3 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
[2024-09-26 17:34:39,265] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/qkv_transpose_split.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/qkv_transpose_split.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -gencode arch=compute_80,code=sm_80 -O3 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
[2024-09-26 17:35:00,601] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/quant_int8.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/quant_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 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
[2024-09-26 17:35:24,001] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/rebuild_padding.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/rebuild_padding.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -gencode arch=compute_80,code=sm_80 -O3 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
[2024-09-26 17:35:44,299] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/rebuild_padding_v2.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/rebuild_padding_v2.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -gencode arch=compute_80,code=sm_80 -O3 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
[2024-09-26 17:36:05,960] [    INFO] spawn.py:38 - /usr/local/cuda/bin/nvcc -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include -I/root/anaconda3/envs/paddle-nlp/lib/python3.10/site-packages/paddle/include/third_party -I/usr/local/cuda/include -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -I/root/anaconda3/envs/paddle-nlp/include/python3.10 -c /data01/hyq/PaddleNLP/csrc/gpu/sample_kernels/top_p_sampling_reject.cu -o /data01/hyq/PaddleNLP/csrc/build/paddlenlp_ops/lib.linux-x86_64-cpython-310/top_p_sampling_reject.cu.o -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -ccbin cc -Xcompiler -fPIC --expt-relaxed-constexpr -DNVCC -gencode arch=compute_80,code=sm_80 -O3 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_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++14
gpu/sample_kernels/sampling.cuh(392): error: namespace "std" has no member "gcd"
    const uint32_t vec_size = std::gcd(16 / sizeof(T), d);
                                   ^

稳定复现步骤 & 代码

编译按照readme步骤进行。

@Jakin-huang Jakin-huang added the bug Something isn't working label Sep 26, 2024
@DrownFish19
Copy link
Collaborator

辛苦提供编译环境下的具体gcc和cmake版本或者采用Paddle docker镜像进行编译安装。

@Jakin-huang
Copy link
Author

辛苦提供编译环境下的具体gcc和cmake版本或者采用Paddle docker镜像进行编译安装。

gcc (GCC) 10.1.0
cmake version 3.22.2

@DrownFish19
Copy link
Collaborator

辛苦提供编译环境下的具体gcc和cmake版本或者采用Paddle docker镜像进行编译安装。

gcc (GCC) 10.1.0 cmake version 3.22.2

这个版本应该是能正常编译的,是否是因为使用anaconda或者系统中存在多个版本gcc的原因,编译时未使用高版本的gcc。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants