Skip to content

Commit

Permalink
solve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
zoooo0820 committed Jul 19, 2022
2 parents a5488b7 + 130c108 commit bdf6a92
Show file tree
Hide file tree
Showing 1,651 changed files with 55,381 additions and 26,263 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Expand Up @@ -5,6 +5,7 @@ paddle/fluid/API_PR.spec
paddle/fluid/eager/api/generated/*
paddle/fluid/op_use_default_grad_maker_DEV.spec
paddle/fluid/op_use_default_grad_maker_PR.spec
paddle/fluid/operators/ops_extra_info.h
paddle/phi/api/backward/backward_api.h
paddle/phi/api/backward/sparse_bw_api.h
paddle/phi/api/include/api.h
Expand Down Expand Up @@ -64,10 +65,9 @@ paddle/infrt/dialect/pd/common/pd_ops_info.h
paddle/infrt/tests/dialect/Output
paddle/infrt/tests/lit.cfg.py
paddle/infrt/kernel/phi/infershaped/infershaped_kernel_launchers.cc
paddle/fluid/pybind/eager_final_state_op_function_impl.h
paddle/fluid/pybind/tmp_eager_final_state_op_function_impl.h
paddle/fluid/pybind/eager_final_state_op_function.cc

# these files (directories) are generated before build system generation
paddle/fluid/operators/generated_op.cc
paddle/phi/ops/compat/generated_sig.cc
python/paddle/utils/code_gen/parsed_apis/
paddle/phi/api/yaml/parsed_apis/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -24,7 +24,7 @@ repos:
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
- id: end-of-file-fixer
- id: sort-simple-yaml
files: (api|backward)\.yaml$
files: (api|backward|api_[a-z_]+)\.yaml$
- repo: local
hooks:
- id: clang-format
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Expand Up @@ -336,7 +336,12 @@ endif()
if(LINUX
AND NOT WITH_CUSTOM_DEVICE
AND NOT ON_INFER)
set(WITH_CUSTOM_DEVICE ON)
set(WITH_CUSTOM_DEVICE
ON
CACHE BOOL "Enable Custom Device when compiling for Linux" FORCE)
message(
"Enable Custom Device when compiling for Linux. Force WITH_CUSTOM_DEVICE=ON."
)
endif()

if(WIN32)
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Expand Up @@ -24,7 +24,7 @@ PaddlePaddle security team attaches great importance to the security of the fram

### Reporting vulnerabilities

We encourage responsible disclosure of security issues to PaddlePaddle and please email reports about any security issues you find to security@paddlepaddle.org.
We encourage responsible disclosure of security issues to PaddlePaddle and please email reports about any security issues you find to paddle-security@baidu.com.



Expand Down
2 changes: 1 addition & 1 deletion SECURITY_cn.md
Expand Up @@ -20,7 +20,7 @@

### 报告安全问题

我们鼓励向飞桨负责任地披露安全问题,请将所发现的安全问题发送电子邮件到 security@paddlepaddle.org
我们鼓励向飞桨负责任地披露安全问题,请将所发现的安全问题发送电子邮件到 paddle-security@baidu.com

在安全团队收到邮件后将会及时与您沟通并反馈问题修复进度。

Expand Down
10 changes: 5 additions & 5 deletions cmake/experiments/cuda_module_loading_lazy.cmake
Expand Up @@ -13,8 +13,8 @@
# limitations under the License.

# this file contains experimental build options for lazy cuda module loading
# cuda moduel lazy loading is supported by CUDA 11.6+
# this experiment option makes Paddle supports lazy loading before CUDA 11.6.
# cuda moduel lazy loading is supported by CUDA 11.7+
# this experiment option makes Paddle supports lazy loading before CUDA 11.7.

option(EXP_CUDA_MODULE_LOADING_LAZY "enable lazy cuda module loading" OFF)
if(${EXP_CUDA_MODULE_LOADING_LAZY})
Expand All @@ -28,13 +28,13 @@ if(${EXP_CUDA_MODULE_LOADING_LAZY})
message("EXP_CUDA_MODULE_LOADING_LAZY only works with CUDA")
return()
endif()
if(${CUDA_VERSION} VERSION_GREATER_EQUAL "11.6")
message("cuda 11.6+ already support lazy module loading")
if(${CUDA_VERSION} VERSION_GREATER_EQUAL "11.7")
message("cuda 11.7+ already support lazy module loading")
return()
endif()

message(
"for cuda before 11.6, libcudart.so must be used for the lazy module loading trick to work, instead of libcudart_static.a"
"for cuda before 11.7, libcudart.so must be used for the lazy module loading trick to work, instead of libcudart_static.a"
)
set(CUDA_USE_STATIC_CUDA_RUNTIME
OFF
Expand Down
64 changes: 0 additions & 64 deletions cmake/external/boost.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/external/cub.cmake
Expand Up @@ -24,7 +24,7 @@ set(CUB_PREFIX_DIR ${CUB_PATH})

set(CUB_REPOSITORY ${GIT_URL}/NVlabs/cub.git)

if(WIN32 AND ${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6)
if(${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6)
# cuda_11.6.2_511.65‘s own cub is 1.15.0, which will cause compiling error in windows.
set(CUB_TAG 1.16.0)
# cub 1.16.0 is not compitable with current thrust version
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/glog.cmake
Expand Up @@ -45,7 +45,7 @@ if(WITH_ARM_BRPC)
file(
WRITE ${GLOG_SOURCE_DIR}/CMakeLists.txt
"PROJECT(ARM_GLOGS)\n" "cmake_minimum_required(VERSION 3.0)\n"
"install(DIRECTORY arm_glog/include arm_glog/lib \n"
"install(DIRECTORY arm_glog/include arm_glog/lib\n"
" DESTINATION . USE_SOURCE_PERMISSIONS)\n")
ExternalProject_Add(
extern_glog
Expand Down
12 changes: 12 additions & 0 deletions cmake/external/onnxruntime.cmake
Expand Up @@ -134,3 +134,15 @@ endif()
add_library(onnxruntime STATIC IMPORTED GLOBAL)
set_property(TARGET onnxruntime PROPERTY IMPORTED_LOCATION ${ONNXRUNTIME_LIB})
add_dependencies(onnxruntime ${ONNXRUNTIME_PROJECT})

function(copy_onnx TARGET_NAME)
# If error of Exitcode0xc000007b happened when a .exe running, copy onnxruntime.dll
# to the .exe folder.
if(TARGET ${TARGET_NAME})
add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${ONNXRUNTIME_SHARED_LIB}
${CMAKE_CURRENT_BINARY_DIR} DEPENDS onnxruntime)
endif()
endfunction()
2 changes: 1 addition & 1 deletion cmake/external/paddle2onnx.cmake
Expand Up @@ -24,7 +24,7 @@ endif()
include(ExternalProject)

set(PADDLE2ONNX_PROJECT "extern_paddle2onnx")
set(PADDLE2ONNX_VERSION "0.9.9")
set(PADDLE2ONNX_VERSION "1.0.0rc")
set(PADDLE2ONNX_PREFIX_DIR ${THIRD_PARTY_PATH}/paddle2onnx)
set(PADDLE2ONNX_SOURCE_DIR
${THIRD_PARTY_PATH}/paddle2onnx/src/${PADDLE2ONNX_PROJECT})
Expand Down
19 changes: 11 additions & 8 deletions cmake/external/xpu.cmake
Expand Up @@ -10,7 +10,7 @@ set(XPU_RT_LIB_NAME "libxpurt.so")
if(NOT DEFINED XPU_BASE_URL)
set(XPU_BASE_URL_WITHOUT_DATE
"https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev")
set(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20220601")
set(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20220718")
else()
set(XPU_BASE_URL "${XPU_BASE_URL}")
endif()
Expand All @@ -19,14 +19,17 @@ endif()
if(NOT DEFINED XPU_XDNN_BASE_URL)
set(XPU_XDNN_BASE_URL_WITHOUT_DATE
"https://klx-sdk-release-public.su.bcebos.com/xdnn/dev")
set(XPU_XDNN_BASE_URL "${XPU_XDNN_BASE_URL_WITHOUT_DATE}/20220601")
set(XPU_XDNN_BASE_URL "${XPU_XDNN_BASE_URL_WITHOUT_DATE}/20220718")
else()
set(XPU_XDNN_BASE_URL "${XPU_XDNN_BASE_URL}")
endif()

set(XPU_XCCL_BASE_URL
"https://klx-sdk-release-public.su.bcebos.com/xccl/release/1.0.0")

if(WITH_AARCH64)
set(XPU_XRE_DIR_NAME "xre-kylin_aarch64")
set(XPU_XDNN_DIR_NAME "XDNN-kylin_aarch64")
set(XPU_XDNN_DIR_NAME "xdnn-kylin_aarch64")
set(XPU_XCCL_DIR_NAME "xccl-kylin_aarch64")
set(XPU_XDNN_URL
"${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
Expand All @@ -40,31 +43,31 @@ elseif(WITH_SUNWAY)
CACHE STRING "" FORCE)
elseif(WITH_BDCENTOS)
set(XPU_XRE_DIR_NAME "xre-bdcentos_x86_64")
set(XPU_XDNN_DIR_NAME "XDNN-bdcentos_x86_64")
set(XPU_XDNN_DIR_NAME "xdnn-bdcentos_x86_64")
set(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
# ubuntu and centos: use output by XDNN API team
set(XPU_XDNN_URL
"${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
CACHE STRING "" FORCE)
elseif(WITH_UBUNTU)
set(XPU_XRE_DIR_NAME "xre-ubuntu_x86_64")
set(XPU_XDNN_DIR_NAME "XDNN-ubuntu_x86_64")
set(XPU_XDNN_DIR_NAME "xdnn-ubuntu_x86_64")
set(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
# ubuntu and centos: use output by XDNN API team
set(XPU_XDNN_URL
"${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
CACHE STRING "" FORCE)
elseif(WITH_CENTOS)
set(XPU_XRE_DIR_NAME "xre-centos7_x86_64")
set(XPU_XDNN_DIR_NAME "XDNN-bdcentos_x86_64")
set(XPU_XDNN_DIR_NAME "xdnn-bdcentos_x86_64")
set(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
# ubuntu and centos: use output by XDNN API team
set(XPU_XDNN_URL
"${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
CACHE STRING "" FORCE)
else()
set(XPU_XRE_DIR_NAME "xre-ubuntu_x86_64")
set(XPU_XDNN_DIR_NAME "XDNN-ubuntu_x86_64")
set(XPU_XDNN_DIR_NAME "xdnn-ubuntu_x86_64")
set(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
# default: use output by XDNN API team
set(XPU_XDNN_URL
Expand All @@ -76,7 +79,7 @@ set(XPU_XRE_URL
"${XPU_BASE_URL}/${XPU_XRE_DIR_NAME}.tar.gz"
CACHE STRING "" FORCE)
set(XPU_XCCL_URL
"${XPU_BASE_URL_WITHOUT_DATE}/20220411/${XPU_XCCL_DIR_NAME}.tar.gz"
"${XPU_XCCL_BASE_URL}/${XPU_XCCL_DIR_NAME}.tar.gz"
CACHE STRING "" FORCE)
set(XPU_PACK_DEPENCE_URL
"https://baidu-kunlun-public.su.bcebos.com/paddle_depence/pack_paddle_depence.sh"
Expand Down
12 changes: 2 additions & 10 deletions cmake/inference_lib.cmake
Expand Up @@ -427,10 +427,8 @@ copy(
set(module "memory")
copy(
fluid_lib_dist
SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/detail/*.h
${src_dir}/${module}/allocation/*.h
DSTS ${dst_dir}/${module} ${dst_dir}/${module}/detail
${dst_dir}/${module}/allocation)
SRCS ${src_dir}/${module}/allocation/*.h
DSTS ${dst_dir}/${module}/allocation)

set(module "platform")
set(platform_lib_deps profiler_proto errors)
Expand Down Expand Up @@ -473,12 +471,6 @@ copy(
${EIGEN_INCLUDE_DIR}/unsupported/Eigen
DSTS ${dst_dir}/Eigen ${dst_dir}/Eigen ${dst_dir}/unsupported)

set(dst_dir "${PADDLE_INSTALL_DIR}/third_party/boost")
copy(
inference_lib_dist
SRCS ${BOOST_INCLUDE_DIR}/boost
DSTS ${dst_dir})

set(dst_dir "${PADDLE_INSTALL_DIR}/third_party/dlpack")
copy(
inference_lib_dist
Expand Down
3 changes: 3 additions & 0 deletions cmake/phi.cmake
Expand Up @@ -103,6 +103,9 @@ function(kernel_declare TARGET_LIST)
elseif(${kernel_path} MATCHES "./kps\/")
file(APPEND ${kernel_declare_file}
"PD_DECLARE_KERNEL(${kernel_name}, KPS, ALL_LAYOUT);\n")
elseif(${kernel_path} MATCHES "./onednn\/")
file(APPEND ${kernel_declare_file}
"PD_DECLARE_KERNEL(${kernel_name}, OneDNN, ALL_LAYOUT);\n")
else()
# deal with device independent kernel, now we use CPU temporaary
file(APPEND ${kernel_declare_file}
Expand Down
23 changes: 5 additions & 18 deletions cmake/third_party.cmake
Expand Up @@ -225,7 +225,7 @@ if(NOT DEFINED WITH_MKLDNN)
if(WITH_MKL AND AVX2_FOUND)
set(WITH_MKLDNN ON)
else()
message(STATUS "Do not have AVX2 intrinsics and disabled MKL-DNN")
message(STATUS "Do not have AVX2 intrinsics and disabled MKL-DNN.")
set(WITH_MKLDNN OFF)
endif()
endif()
Expand All @@ -246,22 +246,15 @@ endif()
include(external/zlib) # download, build, install zlib
include(external/gflags) # download, build, install gflags
include(external/glog) # download, build, install glog
include(external/boost) # download boost
include(external/eigen) # download eigen3
include(external/threadpool) # download threadpool
include(external/dlpack) # download dlpack
include(external/xxhash) # download, build, install xxhash
include(external/warpctc) # download, build, install warpctc
include(external/utf8proc) # download, build, install utf8proc

list(
APPEND
third_party_deps
extern_eigen3
extern_gflags
extern_glog
extern_boost
extern_xxhash)
list(APPEND third_party_deps extern_eigen3 extern_gflags extern_glog
extern_xxhash)
list(
APPEND
third_party_deps
Expand All @@ -272,14 +265,8 @@ list(
extern_utf8proc)
include(external/lapack) # download, build, install lapack

list(
APPEND
third_party_deps
extern_eigen3
extern_gflags
extern_glog
extern_boost
extern_xxhash)
list(APPEND third_party_deps extern_eigen3 extern_gflags extern_glog
extern_xxhash)
list(
APPEND
third_party_deps
Expand Down
5 changes: 0 additions & 5 deletions paddle/fluid/distributed/CMakeLists.txt
Expand Up @@ -33,11 +33,6 @@ if(NOT WITH_PSCORE)
endif()

proto_library(ps_framework_proto SRCS the_one_ps.proto)
add_custom_command(
TARGET ps_framework_proto
POST_BUILD
COMMAND mv the_one_ps.pb.h ps.pb.h
COMMAND mv the_one_ps.pb.cc ps.pb.cc)

set(DISTRIBUTE_COMPILE_FLAGS
"-Wno-error=unused-value -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=unused-variable -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=unknown-pragmas -Wno-error=parentheses -Wno-error=unused-result"
Expand Down

0 comments on commit bdf6a92

Please sign in to comment.