问题描述 Issue Description
我想在标题所示的配置下安装Paddle的XPU版本,一开始用了release/2.5分支的源码进行编译,编译成功了,但是在运行代码的时候卡住,详见 https://github.com/PaddlePaddle/Paddle/issues/56661 ,社区人员解答说2.3以后的版本不再支持K200,所以我就尝试用之前的版本重新编译,但是中间遇到很多错误,其中大部分每次都会卡在xpu依赖下载的地方。
下面是我用release/2.2分支cmake的输出:
(paddle) [root@localhost Paddle]# git checkout release/2.2
已经位于 'release/2.2'
您的分支与上游分支 'origin/release/2.2' 一致。
(paddle) [root@localhost Paddle]# cd build
(paddle) [root@localhost build]# ulimit -n 4096
(paddle) [root@localhost build]# python_exe="/usr/bin/python3.7"
(paddle) [root@localhost build]# export XPU_SDK_ROOT=/root/xpu_sdk
(paddle) [root@localhost build]# cmake .. -DPY_VERSION=3.7 -DPYTHON_EXECUTABLE=$python_exe -DWITH_ARM=ON -DWITH_AARCH64=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_XBYAK=OFF -DWITH_XPU=ON -DWITH_GPU=OFF -DWITH_LITE=OFF -DLITE_GIT_TAG=release/v2.9 -DXPU_SDK_ROOT=${XPU_SDK_ROOT} -DCMAKE_CXX_FLAGS="-Wno-error -w"
-- Found Paddle host system: , version:
-- Found Paddle host system's CPU: 128 cores
-- The CXX compiler identification is GNU 7.3.0
-- The C compiler identification is GNU 7.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- CXX compiler: /usr/bin/c++, version: GNU 7.3.0
-- C compiler: /usr/bin/cc, version: GNU 7.3.0
-- AR tools: /usr/bin/ar
-- Found Git: /usr/bin/git (found version "2.23.0")
-- Performing Test MMX_FOUND
-- Performing Test MMX_FOUND - Failed
-- Performing Test SSE2_FOUND
-- Performing Test SSE2_FOUND - Failed
-- Performing Test SSE3_FOUND
-- Performing Test SSE3_FOUND - Failed
-- Performing Test AVX_FOUND
-- Performing Test AVX_FOUND - Failed
-- Performing Test AVX2_FOUND
-- Performing Test AVX2_FOUND - Failed
-- Performing Test AVX512F_FOUND
-- Performing Test AVX512F_FOUND - Failed
CMake Warning at CMakeLists.txt:261 (MESSAGE):
Disable NCCL when compiling without GPU. Force WITH_NCCL=OFF.
CMake Warning at CMakeLists.txt:308 (MESSAGE):
Disable RCCL when compiling without ROCM. Force WITH_RCCL=OFF.
-- Do not have AVX2 intrinsics and disabled MKL-DNN
-- BOOST_VERSION: 1.41.0, BOOST_URL: http://paddlepaddledeps.bj.bcebos.com/boost_1_41_0.tar.gz
-- warp-ctc library: /root/Paddle/build/third_party/install/warpctc/lib/libwarpctc.so
-- Build OpenBLAS by External Project (include: /root/Paddle/build/third_party/install/openblas/include, library: /root/Paddle/build/third_party/install/openblas/lib/libopenblas.a)
-- CBLAS_PROVIDER: EXTERN_OPENBLAS
-- Protobuf protoc executable: /root/Paddle/build/third_party/install/protobuf/bin/protoc
-- Protobuf-lite library: /root/Paddle/build/third_party/install/protobuf/lib/libprotobuf-lite.a
-- Protobuf library: /root/Paddle/build/third_party/install/protobuf/lib/libprotobuf.a
-- Protoc library: /root/Paddle/build/third_party/install/protobuf/lib/libprotoc.a
-- Protobuf version: 3.1.0
-- Found PythonInterp: /usr/bin/python3.7 (found suitable version "3.7.4", minimum required is "3.7")
-- Found PythonLibs: /usr/lib64/libpython3.7m.so (found suitable version "3.7.4", minimum required is "3.7")
-- Found PY_pip: /usr/local/lib/python3.7/site-packages/pip
-- Found PY_numpy: /usr/local/lib64/python3.7/site-packages/numpy
-- Found PY_wheel: /usr/local/lib/python3.7/site-packages/wheel
-- Found PY_google.protobuf: /usr/local/lib64/python3.7/site-packages/google/protobuf
-- Found NumPy: /usr/local/lib64/python3.7/site-packages/numpy/core/include
POCKETFFT_INCLUDE_DIR is /root/Paddle/build/third_party/pocketfft/src
-- Looking for UINT64_MAX
-- Looking for UINT64_MAX - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of pthread_spinlock_t
-- Check size of pthread_spinlock_t - done
-- Check size of pthread_barrier_t
-- Check size of pthread_barrier_t - done
-- Performing Test C_COMPILER_SUPPORT_FLAG__fPIC
-- Performing Test C_COMPILER_SUPPORT_FLAG__fPIC - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__fPIC
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__fPIC - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer
-- Performing Test C_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Werror
-- Performing Test C_COMPILER_SUPPORT_FLAG__Werror - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Werror
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Werror - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wall
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wall - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wall
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wall - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wextra
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wextra - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wextra
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wextra - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor - Failed
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor - Failed
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_parameter
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_parameter - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_parameter
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_parameter - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_function
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_function - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_function
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_function - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality - Failed
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality - Failed
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_terminate
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_terminate - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_terminate
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_terminate - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_int_in_bool_context
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_int_in_bool_context - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_int_in_bool_context
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_int_in_bool_context - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wimplicit_fallthrough_0
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wimplicit_fallthrough_0 - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wimplicit_fallthrough_0
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wimplicit_fallthrough_0 - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_maybe_uninitialized
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_maybe_uninitialized - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_maybe_uninitialized
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_maybe_uninitialized - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_function
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_function - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_array_bounds
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_array_bounds - Success
-- Paddle version is 0.0.0
-- Compile with XPU!
-- On inference mode, will take place some specific optimization.
-- commit: 0ee230a7d3
-- branch: release/2.2
WITH_DLNNE:
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
LITE_GIT_TAG
XPU_SDK_ROOT
-- Build files have been written to: /root/Paddle/build
(paddle) [root@localhost build]#
中间会有几次因为仓库克隆失败中断,重新尝试可以继续编译,但是最后还是会卡在同一个地方:
已发出 Proxy 请求,正在等待回应... 200 OK
长度:676 [text/x-sh]
正在保存至: “pack_paddle_depence.sh.2”
pack_paddle_depence.sh.2 100%[====================================================================================================================>] 676 --.-KB/s 用时 0s
2023-08-30 09:03:33 (17.2 MB/s) - 已保存 “pack_paddle_depence.sh.2” [676/676])
+ XRE_URL=https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev/20210921/xre-kylin_aarch64.tar.gz
+ XRE_DIR_NAME=xre-kylin_aarch64
+ XDNN_URL=https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev/20210921/xdnn-kylin_aarch64.tar.gz
+ XDNN_DIR_NAME=xdnn-kylin_aarch64
+ XCCL_URL=https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev/20210623/xccl-kylin_aarch64.tar.gz
+ XCCL_DIR_NAME=xccl-kylin_aarch64
+ wget --no-check-certificate https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev/20210921/xre-kylin_aarch64.tar.gz -c -q -O xre.tar.gz
make[2]: *** [CMakeFiles/extern_xpu.dir/build.make:93:third_party/xpu/src/extern_xpu-stamp/extern_xpu-download] 错误 4
make[2]: 离开目录“/root/Paddle/build”
make[1]: *** [CMakeFiles/Makefile2:2825:CMakeFiles/extern_xpu.dir/all] 错误 2
make[1]: 离开目录“/root/Paddle/build”
make: *** [Makefile:133:all] 错误 2
(paddle) [root@localhost build]#
上面显示的几个URL手动输入的话显示已经失效了,而在之前编译release/2.5的过程中我注意到链接中的日期是2023xxxx,所以不知道是不是链接的问题。
我尝试过联系贵团队的 Paddle-better@baidu.com 申请预编译的whl包,但是没有得到回复,不知道有没有合适的解决方案。
版本&环境信息 Version & Environment Information
Paddle version: 0.0.0
Paddle With CUDA: False
OS: kylin V10
GCC version: (GCC) 7.3.0
Clang version: 7.0.0 (kylin 7.0.0-6.1.ky10)
CMake version: version 3.16.8
Libc version: glibc 2.17
Python version: 3.7.12
CUDA version: N/A
cuDNN version: N/A
Nvidia driver version: N/A
Nvidia driver List: N/A
6条答案
按热度按时间ne5o7dgx1#
似乎我们遇到的问题是一样的
bogh5gae2#
似乎我们遇到的问题是一样的
应该是一样的,你可以试着手动输一下这几个链接,其实已经失效了。可能老版本的资源都没有被维护了,得用最新的版本编才行。我这边换了个R200的卡然后用release/2.5分支编译成功了。
gupuwyp23#
谢谢,我也已经更换为develop版本了,但是还是没有成功
cmake命令使用的是
我的环境是 飞腾2500+r200 麒麟系统
你有遇到这个问题吗
iezvtpos4#
这个报错我确实看到过,但是感觉说的不知道是啥意思,直接重新编译了hhh
我个人观感就是感觉没有修改什么,但是每次cmake报错都不太一样。
要是你可以用python3.7的话我这里有编好的whl包直接给你。
kyks70gy5#
我也感觉,每次报错都不太一样,我有一个2.5.0的wheel包了,但是老师要自己编一个,我再试试吧
yrdbyhpb6#
可以给我下whl包吗,多谢