ubuntu22.04 使用 make 编译失败,提示大量 `/usr/bin/ld: ../../../libphi_core.so: undefined reference`
envgap__PaddlePaddle__Paddle-65250
01 / FAILURE SIGNATURE
As reported upstream
这两天的版本没法通过编译,提示大量的 `/usr/bin/ld: ../../../libphi_core.so: undefined reference`,每次都在 60% 左右就出错了,删除 build 目录里面的东西重新编译,问题同样存在 ~
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
33100c76981e45974c8cf05717252b5c3cc8a40c- Manifest
paddle/phi/kernels/funcs/jit/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
PaddlePaddle/Paddle #65250 · read the original issue
### 问题描述 Issue Description `commit 7725a4d2d497dabc8e8ff6a387111b0def95a328` 这两天的版本没法通过编译,提示大量的 `/usr/bin/ld: ../../../libphi_core.so: undefined reference`,每次都在 60% 左右就出错了,删除 build 目录里面的东西重新编译,问题同样存在 ~ ``` shell > time cmake .. -DPY_VERSION=3.8 -DWITH_GPU=ON -DWITH_TESTING=OFF -DWITH_CUSTOM_DEVICE=OFF -DWITH_NCCL=OFF > time make -j6 2>&1 ``` ``` shell [ 59%] Linking CXX static library libplace.a [ 59%] Built target place [ 59%] Building CXX object paddle/fluid/platform/profiler/CMakeFiles/cpu_utilization.dir/cpu_utilization.cc.o [ 59%] Building CXX object paddle/fluid/distributed/fleet_executor/CMakeFiles/task_loop_thread_pool.dir/task_loop_thread_pool.cc.o [ 59%] Building CXX object paddle/fluid/platform/dynload/CMakeFiles/dynload_cuda.dir/nvrtc.cc.o [ 59%] Linking CXX static library libcpu_utilization.a [ 59%] Built target cpu_utilization [ 59%] Building CXX object paddle/fluid/distributed/fleet_executor/CMakeFiles/task_loop_thread_pool.dir/task_loop_thread.cc.o [ 59%] Building CXX object paddle/fluid/platform/dynload/CMakeFiles/dynload_cuda.dir/cuda_driver.cc.o [ 59%] Building CXX object paddle/fluid/platform/dynload/CMakeFiles/dynload_cuda.dir/cupti.cc.o [ 59%] Linking CXX static library libdynload_cuda.a [ 59%] Built target dynload_cuda [ 59%] Building CXX object paddle/fluid/distributed/collective/CMakeFiles/processgroup_comm_utils.dir/processgroup_comm_utils.cc.o [ 59%] Building CXX object paddle/fluid/operators/generator/CMakeFiles/op_compat_infos.dir/__/ops_signature/fused_bn_activation_sig.cc.o [ 59%] Linking CXX executable jit_kernel_benchmark /usr/bin/ld: ../../../libphi_core.so: undefined reference to `void phi::PowGradKernel<phi::dtype::float16, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, paddle::experimental::ScalarBase<phi::DenseTensor> const&, phi::DenseTensor*)' /usr/bin/ld: ../../../libphi_core.so: undefined reference to `void phi::PNormGradKernel<float, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor const&, float, int, float, bool, bool, phi::DenseTensor*)' /usr/bin/ld: ../../../libphi_core.so: undefined reference to `void phi::UniformKernel<phi::dtype::float16, phi::GPUContext>(phi::GPUContext const&, paddle::experimental::IntArrayBase<phi::DenseTensor> const&, phi::DataType, paddle::experimental::ScalarBase<phi::DenseTensor> const&, paddle::experimental::ScalarBase<phi::DenseTensor> const&, int, phi::DenseTensor*)' /usr/bin/ld: ../../../libphi_core.so: undefined reference to `void phi::AtanGradKernel<double, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor*)' ... /usr/bin/ld: ../../../libphi_core.so: undefined reference to `void phi::BatchNormKernel<phi::dtype::float16, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor const&, paddle::optional<phi::DenseTensor> const&, paddle::optional<phi::DenseTensor> const&, bool, float, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, phi::DenseTensor*, phi::DenseTensor*, phi::DenseTensor*, phi::DenseTensor*, phi::DenseTensor*, phi::DenseTensor*)' /usr/bin/ld: ../../../libphi_core.so: undefined reference to `void phi::ReluGradKernel<double, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor*)' /usr/bin/ld: ../../../libphi_core.so: undefined reference to `void phi::TanhGradKernel<phi::dtype::float16, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor*)' collect2: error: ld returned 1 exit status make[2]: *** [paddle/phi/kernels/funcs/jit/CMakeFiles/jit_kernel_benchmark.dir/build.make:115: paddle/phi/kernels/funcs/jit/jit_kernel_benchmark] Error 1 make[1]: *** [CMakeFiles/Makefile2:4973: paddle/phi/kernels/funcs/jit/CMakeFiles/jit_kernel_benchmark.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 59%] Building CXX object paddle/fluid/operators/generator/CMakeFiles/op_compat_infos.dir/__/ops_signature/fused_bn_add_activation_sig.cc.o [ 59%] Linking CXX static library libstream_callback_manager.a [ 59%] Built target stream_callback_manager [ 59%] Building CXX object paddle/fluid/operators/generator/CMakeFiles/op_compat_infos.dir/__/ops_signature/fused_conv_sig.cc.o [ 59%] Linking CXX static library libprocessgroup_comm_utils.a [ 59%] Built target processgroup_comm_utils ``` 尝试只编译 CPU 版本,可以正常编译: ``` shell > time cmake .. -DPY_VERSION=3.8 -DWITH_GPU=OFF -DWITH_TESTING=OFF -DWITH_CUSTOM_DEVICE=OFF -DWITH_NCCL=OFF ``` ### 版本&环境信息 Version & Environment Information **************************************** Paddle version: 0.0.0 Paddle With CUDA: True OS: ubuntu 22.04 GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Clang version: 14.0.0-1ubuntu1.1 CMake version: version 3.28.1 Libc version: glibc 2.35 Python version: 3.8.17 CUDA version: 11.7.99 Build cuda_11.7.r11.7/compiler.31442593_0 cuDNN version: 8.5.0 Nvidia driver version: 535.54.03 Nvidia driver List: GPU 0: NVIDIA P106-100
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]