PaddlePaddle(全称飞桨)是一个基于深度学习技术的开源平台,由百度推出。它可以帮助用户高效地完成模型训练、优化和部署等任务,并且具有很好的可扩展性和灵活性。PaddlePaddle支持多种深度学习算法,如卷积神经网络(CNN)、循环神经网络(RNN)、生成对抗网络(GAN)等,同时还提供了丰富的预训练模型和工具库。
PaddlePaddle包含多个不同github仓库,子仓库Paddle是主要c++库,这里介绍子仓库Paddle的编译
打开文心大模型网站 https://wenxin.baidu.com/
选择PaddleFleetX打开https://www.paddlepaddle.org.cn/paddle/paddlefleetx
点右上角GitHub进入github页面
github地址 https://github.com/PaddlePaddle/Paddle
拉取代码进入目录
git clone https://github.com/PaddlePaddle/Paddle
cd Paddle
环境操作系统使用CentOS Stream 9
安装依赖库
yum groupinstall -y "Development tools"
yum install -y cmake
yum install -y python3-devel
yum install -y patchelf
pip install -r python/requirements.txt
pip install wheel
编译时会编译第三方库,建议CPU核心数配置在16以上
python setup.py build
编译输出信息
[root@instance-1ujef1u3 Paddle]# python setup.py build
export PY_VERSION = 3.9.16
Start executing python setup.py build
------- Building start ------
build_dir: /root/Paddle/build
args: ['-DPY_VERSION=3.9.16']
cmake_args: ['/usr/bin/cmake3', '-DPY_VERSION=3.9.16', '-DWITH_SETUP_INSTALL=ON', '/root/Paddle']
CMake Deprecation Warning at CMakeLists.txt:25 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Found Paddle host system: centos, version:
-- Found Paddle host system's CPU: 32 cores
-- The CXX compiler identification is GNU 11.3.1
-- The C compiler identification is GNU 11.3.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- 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 - Success
-- Found Threads: TRUE
EXP_CUDA_MODULE_LOADING_LAZY only works with ON_INFER=ON on Linux platforms
-- CXX compiler: /usr/bin/c++, version: GNU 11.3.1
-- C compiler: /usr/bin/cc, version: GNU 11.3.1
-- AR tools: /usr/bin/ar
-- Found Git: /usr/bin/git (found version "2.39.1")
-- Performing Test MMX_FOUND
-- Performing Test MMX_FOUND - Success
-- Performing Test SSE2_FOUND
-- Performing Test SSE2_FOUND - Success
-- Performing Test SSE3_FOUND
-- Performing Test SSE3_FOUND - Success
-- Performing Test AVX_FOUND
-- Performing Test AVX_FOUND - Success
-- Performing Test AVX2_FOUND
-- Performing Test AVX2_FOUND - Success
-- Performing Test AVX512F_FOUND
-- Performing Test AVX512F_FOUND - Success
Enable Custom Device when compiling for Linux. Force WITH_CUSTOM_DEVICE=ON.
CMake Warning at CMakeLists.txt:395 (message):
Disable NCCL when compiling without GPU. Force WITH_NCCL=OFF.
CMake Warning at CMakeLists.txt:484 (message):
Disable RCCL when compiling without ROCM. Force WITH_RCCL=OFF.
-- warp-ctc library: /root/Paddle/build/third_party/install/warpctc/lib/libwarpctc.so
-- warp-rnnt library: /root/Paddle/build/third_party/install/warprnnt/lib/libwarprnnt.so
-- MKLML_VER: csrmm_mklml_lnx_2019.0.5, MKLML_URL: http://paddlepaddledeps.bj.bcebos.com/csrmm_mklml_lnx_2019.0.5.tgz
-- Found cblas and lapack in MKLML (include: /root/Paddle/build/third_party/install/mklml/include, library: /root/Paddle/build/third_party/install/mklml/lib/libmklml_intel.so)
-- CBLAS_PROVIDER: MKLML
-- Set /root/Paddle/build/third_party/install/mkldnn/lib64 to runtime path
-- MKLDNN library: /root/Paddle/build/third_party/install/mkldnn/lib64/libdnnl.so
-- 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: 21.12
-- Found PythonInterp: /usr/bin/python3.9 (found suitable version "3.9.16", minimum required is "3.9.16")
-- Found PythonLibs: /usr/lib64/libpython3.9.so (found suitable version "3.9.16", minimum required is "3.9.16")
-- Found PY_pip: /usr/lib/python3.9/site-packages/pip
-- Found PY_numpy: /usr/local/lib64/python3.9/site-packages/numpy
-- Found PY_wheel: /usr/local/lib/python3.9/site-packages/wheel
-- Found PY_google.protobuf: /usr/local/lib64/python3.9/site-packages/google/protobuf
CMake Deprecation Warning at cmake/FindNumPy.cmake:6 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
cmake/external/python.cmake:76 (find_package)
cmake/third_party.cmake:305 (include)
CMakeLists.txt:589 (include)
-- Found NumPy: /usr/local/lib64/python3.9/site-packages/numpy/core/include
CMake Warning at /usr/share/cmake/Modules/ExternalProject.cmake:1769 (message):
Line 'CMAKE_BUILD_TYPE=Release' does not match regex. Ignoring.
Call Stack (most recent call first):
/usr/share/cmake/Modules/ExternalProject.cmake:3208 (_ep_command_line_to_initial_cache)
/usr/share/cmake/Modules/ExternalProject.cmake:3239 (_ep_extract_configure_command)
/usr/share/cmake/Modules/ExternalProject.cmake:3684 (_ep_add_configure_command)
cmake/external/xbyak.cmake:33 (ExternalProject_Add)
cmake/third_party.cmake:459 (include)
CMakeLists.txt:589 (include)
POCKETFFT_INCLUDE_DIR is /root/Paddle/build/third_party/pocketfft/src
CMake Warning at cmake/flags.cmake:12 (message):
Found GCC 11.3.1 which is too high, recommended to use GCC 8.2
Call Stack (most recent call first):
cmake/flags.cmake:36 (checkcompilercxx14flag)
CMakeLists.txt:592 (include)
-- 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_array_bounds
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_array_bounds - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_array_bounds
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_array_bounds - Success
-- 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_ignored_qualifiers
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_ignored_qualifiers - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_ignored_qualifiers
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_ignored_qualifiers - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_ignored_attributes
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_ignored_attributes - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_ignored_attributes
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_ignored_attributes - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_parentheses
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_parentheses - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_parentheses
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_parentheses - 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 C_COMPILER_SUPPORT_FLAG__Wno_error_unused_function
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_function - Success
-- Paddle version is 0.0.0
-- Enable Intel OpenMP with /root/Paddle/build/third_party/install/mklml/lib/libiomp5.so
-- On inference mode, will take place some specific optimization.
create or copy auto-geneated tensor files
Looking in indexes: http://mirrors.baidubce.com/pypi/simple/
Requirement already satisfied: pyyaml in /usr/local/lib64/python3.9/site-packages (6.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
copy if different /root/Paddle/paddle/phi/api/include/operants_base.h.tmp /root/Paddle/paddle/phi/api/include/operants_base.h
copy if different /root/Paddle/paddle/phi/api/lib/tensor_api.cc.tmp /root/Paddle/paddle/phi/api/lib/tensor_api.cc
copy if different /root/Paddle/paddle/phi/api/include/tensor_operants.h.tmp /root/Paddle/paddle/phi/api/include/tensor_operants.h
copy if different /root/Paddle/paddle/phi/api/lib/tensor_operants.cc.tmp /root/Paddle/paddle/phi/api/lib/tensor_operants.cc
copy if different /root/Paddle/paddle/phi/api/include/operants_manager.h.tmp /root/Paddle/paddle/phi/api/include/operants_manager.h
copy if different /root/Paddle/paddle/phi/api/lib/operants_manager.cc.tmp /root/Paddle/paddle/phi/api/lib/operants_manager.cc
-- Copy generated python ps_pb2.py into directory /root/Paddle/python/paddle/incubate/fleet/parameter_server/pslib/
-- commit: 7c73910ed3
-- branch: develop
Looking in indexes: http://mirrors.baidubce.com/pypi/simple/
Requirement already satisfied: pyyaml in /usr/local/lib64/python3.9/site-packages (6.0)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.9/site-packages (3.1.2)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.9/site-packages (4.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib64/python3.9/site-packages (from jinja2) (2.1.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
parse op yamls:
- /root/Paddle/paddle/phi/api/yaml/ops.yaml
- /root/Paddle/paddle/phi/api/yaml/legacy_ops.yaml
- /root/Paddle/paddle/phi/api/yaml/backward.yaml
- /root/Paddle/paddle/phi/api/yaml/legacy_backward.yaml
validate op yaml:
- /root/Paddle/paddle/fluid/operators/generator/parsed_ops/ops.parsed.yaml
- /root/Paddle/paddle/fluid/operators/generator/parsed_ops/backward_ops.parsed.yaml
create or remove auto-geneated operators: /root/Paddle/paddle/fluid/operators/generated_op.cc.tmp
create or remove auto-geneated argument mappings: /root/Paddle/paddle/phi/ops/compat/generated_sig.cc.tmp
copy if different /root/Paddle/paddle/fluid/operators/generated_op.cc.tmp /root/Paddle/paddle/fluid/operators/generated_op.cc
copy if different /root/Paddle/paddle/fluid/operators/generated_static_op.cc.tmp /root/Paddle/paddle/fluid/operators/generated_static_op.cc
copy if different /root/Paddle/paddle/fluid/operators/generated_sparse_op.cc.tmp /root/Paddle/paddle/fluid/operators/generated_sparse_op.cc
copy if different /root/Paddle/paddle/phi/ops/compat/generated_sig.cc.tmp /root/Paddle/paddle/phi/ops/compat/generated_sig.cc
copy if different /root/Paddle/paddle/phi/ops/compat/generated_static_sig.cc.tmp /root/Paddle/paddle/phi/ops/compat/generated_static_sig.cc
copy if different /root/Paddle/paddle/phi/ops/compat/generated_sparse_sig.cc.tmp /root/Paddle/paddle/phi/ops/compat/generated_sparse_sig.cc
generate /root/Paddle/paddle/fluid/operators/ops_extra_info.cc
Performing Eager Dygraph Auto Code Generation
Final State Eager CodeGen
Generate dygraph file structure at path: /root/Paddle/paddle/fluid/eager/generated
Eager prim api code generator
copy tmp_xxx_prim_api to xxx_prim_api
Static prim api code generator
copy tmp_xxx_prim_api to xxx_prim_api
Prim tensor operants code generator
copy prim xxx_tensor_operants.tmp to xxx_tensor_operants
WITH_DLNNE:
-- Configuring done
-- Generating done
-- Build files have been written to: /root/Paddle/build
/usr/bin/cmake3 --build . --target install --config release -j 32
[ 1%] Creating directories for 'extern_warprnnt'
[ 1%] Creating directories for 'extern_mklml'
[ 1%] Creating directories for 'extern_zlib'
[ 1%] copy_if_different /root/Paddle/build/paddle/fluid/operators/jit/kernels.h
[ 1%] Creating directories for 'extern_cryptopp'
[ 1%] Creating directories for 'extern_gflags'
[ 1%] copy_if_different /root/Paddle/build/paddle/fluid/inference/api/paddle_inference_pass.h
[ 1%] copy_if_different /root/Paddle/build/paddle/phi/kernels/declarations.h
[ 1%] Creating directories for 'extern_pybind'
[ 1%] Creating directories for 'extern_dlpack'
[ 1%] Creating directories for 'extern_threadpool'
[ 1%] copy_if_different /root/Paddle/build/paddle/phi/ops/compat/signatures.h
[ 1%] copy_if_different /root/Paddle/build/paddle/fluid/pybind/pybind.h
[ 1%] Creating directories for 'extern_mkldnn'
[ 1%] Creating directories for 'extern_utf8proc'
[ 1%] Creating directories for 'extern_warpctc'
[ 1%] Creating directories for 'extern_eigen3'
[ 1%] Creating directories for 'extern_pocketfft'
[ 1%] Creating directories for 'extern_lapack'
[ 1%] Creating directories for 'extern_xbyak'
[ 1%] Creating directories for 'extern_gloo'
[ 1%] Built target copy_paddle_inference_pass_command
[ 1%] Built target copy_kernels_command
[ 1%] Built target copy_declarations_command
[ 1%] Built target copy_pybind_command
[ 1%] Built target copy_signatures_command
[ 1%] Performing download step (git clone) for 'extern_zlib'
[ 1%] Performing download step (git clone) for 'extern_dlpack'
[ 1%] Performing download step (git clone) for 'extern_pybind'
[ 1%] Performing download step (git clone) for 'extern_mkldnn'
[ 1%] Performing download step (git clone) for 'extern_warpctc'
[ 2%] Performing download step (download, verify and extract) for 'extern_mklml'
[ 2%] Performing download step (git clone) for 'extern_warprnnt'
[ 2%] Performing download step (git clone) for 'extern_cryptopp'
[ 2%] Performing download step (git clone) for 'extern_gflags'
[ 2%] Performing download step (git clone) for 'extern_eigen3'
[ 2%] Performing download step (git clone) for 'extern_gloo'
[ 2%] Performing download step (git clone) for 'extern_xbyak'
[ 2%] Performing download step (git clone) for 'extern_threadpool'
Cloning into 'extern_zlib'...
[ 2%] Performing download step (git clone) for 'extern_pocketfft'
-- Downloading...
dst='/root/Paddle/build/third_party/mklml/src/csrmm_mklml_lnx_2019.0.5.tgz'
timeout='none'
inactivity timeout='none'
-- Using src='http://paddlepaddledeps.bj.bcebos.com/csrmm_mklml_lnx_2019.0.5.tgz'
Cloning into 'extern_dlpack'...
[ 2%] Performing download step (git clone) for 'extern_utf8proc'
Cloning into 'extern_pybind'...
[ 2%] Performing download step (download, verify and extract) for 'extern_lapack'
Cloning into 'extern_mkldnn'...
Cloning into 'extern_warpctc'...
Cloning into 'extern_gflags'...
Cloning into 'extern_warprnnt'...
-- Downloading...
dst='/root/Paddle/build/third_party/lapack/src/lapack_lnx_v3.10.0.20210628.tar.gz'
timeout='none'
inactivity timeout='none'
Cloning into 'extern_cryptopp'...
-- Using src='https://paddlepaddledeps.bj.bcebos.com/lapack_lnx_v3.10.0.20210628.tar.gz'
Cloning into 'extern_gloo'...
Cloning into 'extern_eigen3'...
Cloning into 'extern_xbyak'...
Cloning into 'extern_threadpool'...
Cloning into 'extern_pocketfft'...
Cloning into 'extern_utf8proc'...
[ 2%] Built target eager_python_c_codegen
-- verifying file...
file='/root/Paddle/build/third_party/lapack/src/lapack_lnx_v3.10.0.20210628.tar.gz'
-- Downloading... done
-- extracting...
src='/root/Paddle/build/third_party/lapack/src/lapack_lnx_v3.10.0.20210628.tar.gz'
dst='/root/Paddle/build/third_party/lapack/src/extern_lapack'
-- extracting... [tar xfz]
[ 2%] Built target op_map_codegen
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 2%] No update step for 'extern_lapack'
[ 2%] No patch step for 'extern_lapack'
[ 2%] No configure step for 'extern_lapack'
[ 2%] No build step for 'extern_lapack'
[ 2%] Performing install step for 'extern_lapack'
[ 2%] Completed 'extern_lapack'
[ 2%] Built target extern_lapack
[ 2%] Built target eager_codegen
HEAD is now at 9a42ec1 changed typedef to using
......
[100%] Linking CXX static library libpaddle_inference_c.a
[100%] Built target paddle_inference_c
[100%] Linking CXX shared library libpaddle_inference_c.so
[100%] Linking CXX shared library libpaddle_inference.so
[100%] Built target paddle_inference_c_shared
[100%] Linking CXX shared library libpaddle.so
[100%] Built target paddle_inference_shared
......
running build_ext
building '_foo' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/root
creating build/temp.linux-x86_64-3.9/root/Paddle
creating build/temp.linux-x86_64-3.9/root/Paddle/build
creating build/temp.linux-x86_64-3.9/root/Paddle/build/python
gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.9 -c /root/Paddle/build/python/stub.cc -o build/temp.linux-x86_64-3.9/root/Paddle/build/python/stub.o
g++ -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g build/temp.linux-x86_64-3.9/root/Paddle/build/python/stub.o -L/usr/lib64 -o build/lib.linux-x86_64-3.9/_foo.cpython-39-x86_64-linux-gnu.so
running build_scripts
creating build/scripts-3.9
copying /root/Paddle/build/paddle/scripts/paddle -> build/scripts-3.9
编译完成目录占用8.8G
[root@instance-1ujef1u3 Paddle]# du -sh .
8.8G
安装
[root@instance-1ujef1u3 Paddle]# python setup.py install
export PY_VERSION = 3.9.16
Start executing python setup.py install
------- Building start ------
build_dir: /root/Paddle/build
Do not need rerun camke, everything is ready, run build now
/usr/bin/cmake3 --build . --target install --config release -j 32
[ 0%] copy_if_different /root/Paddle/build/paddle/fluid/operators/jit/kernels.h
[ 0%] copy_if_different /root/Paddle/build/paddle/phi/kernels/declarations.h
[ 0%] Built target extern_cryptopp
[ 0%] Built target extern_zlib
[ 1%] Built target extern_threadpool
[ 1%] Built target extern_dlpack
[ 2%] Built target extern_warprnnt
[ 2%] copy_if_different /root/Paddle/build/paddle/fluid/inference/api/paddle_inference_pass.h
[ 3%] Built target extern_pybind
[ 3%] copy_if_different /root/Paddle/build/paddle/fluid/pybind/pybind.h
[ 3%] Built target extern_gflags
[ 3%] copy_if_different /root/Paddle/build/paddle/phi/ops/compat/signatures.h
[ 4%] Built target extern_warpctc
[ 4%] Built target extern_mklml
[ 4%] Built target extern_xbyak
[ 4%] Built target extern_utf8proc
[ 4%] Built target extern_lapack
[ 4%] Built target extern_mkldnn
[ 4%] Built target extern_gloo
[ 4%] Built target extern_eigen3
[ 4%] Built target extern_pocketfft
[ 4%] Built target copy_kernels_command
[ 4%] Built target copy_declarations_command
[ 4%] Built target copy_pybind_command
[ 4%] Built target copy_paddle_inference_pass_command
[ 4%] Built target copy_signatures_command
[ 4%] Built target extern_protobuf
[ 4%] Built target mkldnn_cmd
[ 5%] Built target extern_glog
[ 5%] Running Python protocol buffer compiler on the_one_ps.proto
[ 5%] Running Python protocol buffer compiler on ps.proto
......
creating 'dist/paddlepaddle-0.0.0-py3.9-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing paddlepaddle-0.0.0-py3.9-linux-x86_64.egg
removing '/usr/local/lib64/python3.9/site-packages/paddlepaddle-0.0.0-py3.9-linux-x86_64.egg' (and everything under it)
creating /usr/local/lib64/python3.9/site-packages/paddlepaddle-0.0.0-py3.9-linux-x86_64.egg
Extracting paddlepaddle-0.0.0-py3.9-linux-x86_64.egg to /usr/local/lib64/python3.9/site-packages
paddlepaddle 0.0.0 is already the active version in easy-install.pth
Installing paddle script to /usr/local/bin
Installing fleetrun script to /usr/local/bin
Installed /usr/local/lib64/python3.9/site-packages/paddlepaddle-0.0.0-py3.9-linux-x86_64.egg
Processing dependencies for paddlepaddle==0.0.0
Searching for protobuf==4.21.3
Best match: protobuf 4.21.3
Adding protobuf 4.21.3 to easy-install.pth file
Using /usr/local/lib64/python3.9/site-packages
Searching for opt-einsum==3.3.0
Best match: opt-einsum 3.3.0
Adding opt-einsum 3.3.0 to easy-install.pth file
Using /usr/local/lib/python3.9/site-packages
Searching for paddle-bfloat==0.1.7
Best match: paddle-bfloat 0.1.7
Adding paddle-bfloat 0.1.7 to easy-install.pth file
Using /usr/local/lib64/python3.9/site-packages
Searching for astor==0.8.1
Best match: astor 0.8.1
Adding astor 0.8.1 to easy-install.pth file
Using /usr/local/lib/python3.9/site-packages
Searching for decorator==5.1.1
Best match: decorator 5.1.1
Adding decorator 5.1.1 to easy-install.pth file
Using /usr/local/lib/python3.9/site-packages
Searching for Pillow==9.2.0
Best match: Pillow 9.2.0
Adding Pillow 9.2.0 to easy-install.pth file
Using /usr/local/lib64/python3.9/site-packages
Searching for numpy==1.23.1
Best match: numpy 1.23.1
Adding numpy 1.23.1 to easy-install.pth file
Installing f2py script to /usr/local/bin
Installing f2py3 script to /usr/local/bin
Installing f2py3.9 script to /usr/local/bin
Using /usr/local/lib64/python3.9/site-packages
Searching for requests==2.25.1
Best match: requests 2.25.1
Adding requests 2.25.1 to easy-install.pth file
Using /usr/lib/python3.9/site-packages
Searching for urllib3==1.26.5
Best match: urllib3 1.26.5
Adding urllib3 1.26.5 to easy-install.pth file
Using /usr/lib/python3.9/site-packages
Searching for chardet==4.0.0
Best match: chardet 4.0.0
Adding chardet 4.0.0 to easy-install.pth file
Installing chardetect script to /usr/local/bin
Using /usr/lib/python3.9/site-packages
Searching for idna==2.10
Best match: idna 2.10
Adding idna 2.10 to easy-install.pth file
Using /usr/lib/python3.9/site-packages
Finished processing dependencies for paddlepaddle==0.0.0
pip命令查看安装信息
[root@instance-1ujef1u3 Paddle]# pip show paddlepaddle
Name: paddlepaddle
Version: 0.0.0
Summary: Parallel Distributed Deep Learning
Home-page: https://www.paddlepaddle.org.cn/
Author:
Author-email: Paddle-better@baidu.com
License: Apache Software License
Location: /usr/local/lib64/python3.9/site-packages/paddlepaddle-0.0.0-py3.9-linux-x86_64.egg
Requires: requests, numpy, Pillow, decorator, astor, paddle_bfloat, opt_einsum, protobuf
Required-by:
paddle命令
[root@instance-1ujef1u3 Paddle]# which paddle
/usr/local/bin/paddle
[root@instance-1ujef1u3 Paddle]# paddle
PaddlePaddle 0.0.0, compiled with
with_avx: ON
with_gpu: OFF
with_mkl: ON
with_mkldnn: ON
with_python: ON