Skip to content

Commit

Permalink
Merge branch 'develop' into dy2st/hold-bwd-prog-in-grad-node
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Apr 3, 2024
2 parents 15f30cb + a1f5cdb commit 4965a83
Show file tree
Hide file tree
Showing 1,219 changed files with 30,140 additions and 11,030 deletions.
12 changes: 8 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE -->
<!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 -->
### PR types
<!-- One of [ New features | Bug fixes | Function optimization | Performance optimization | Breaking changes | Others ] -->

### PR changes
<!-- One of [ OPs | APIs | Docs | Others ] -->
### PR Category
<!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | Distributed Strategy | Parameter Server | Communication Library | Auto Parallel | Inference | Environment Adaptation | Others ] -->


### PR Types
<!-- One of [ New features | Bug fixes | Improvements | Performance | BC Breaking | Deprecations | Docs | Devs | Not User Facing | Security | Deprecations | Others ] -->


### Description
<!-- Describe what you’ve done -->
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ endif()
if(WIN32)
option(MSVC_STATIC_CRT "use static C Runtime library by default" ON)
message("Build static library of PHI")
set(CMAKE_SUPPRESS_REGENERATION ON)
# (Note xuxinyi04): If CMAKE_SUPPRESS_REGENERATION is OFF, which is default, then CMake adds a
# special target on which all other targets depend that checks the build system and optionally
# re-runs CMake to regenerate the build system when the target specification source changes.
set(CMAKE_SUPPRESS_REGENERATION OFF)
set(CMAKE_STATIC_LIBRARY_PREFIX lib)
set(WITH_SHARED_PHI
OFF
Expand Down Expand Up @@ -240,6 +243,8 @@ if(WIN32)
"${${flag_var}} /ignore:4049 /ignore:4217 /ignore:4006 /ignore:4221")
if(MSVC_STATIC_CRT)
set(${flag_var} "${${flag_var}} /NODEFAULTLIB:MSVCRT.LIB")
else()
set(${flag_var} "${${flag_var}} /NODEFAULTLIB:LIBCMT.LIB")
endif()
endforeach()

Expand Down
4 changes: 2 additions & 2 deletions cmake/coveralls.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ endfunction()

if(WITH_COVERAGE)
if(WITH_INCREMENTAL_COVERAGE)
# if *.h changed, generate coverage report totaly.
# if pybind.cc changed, generate coverage report totaly.
# if *.h changed, generate coverage report totally.
# if pybind.cc changed, generate coverage report totally.
# Because if pybind.cc add '-g -O0 -fprofile-arcs -ftest-coverage' only, some testcase will fail.
if((NOT ("$ENV{PADDLE_GIT_DIFF_H_FILE}" STREQUAL ""))
OR ("$ENV{PADDLE_GIT_DIFF_CC_FILE}" MATCHES "pybind.cc"))
Expand Down
2 changes: 1 addition & 1 deletion cmake/coverallsGcovJsons.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ foreach(GCOV_FILE ${GCOV_FILES})
# Instead of trying to parse the source from the
# gcov file, simply read the file contents from the source file.
# (Parsing it from the gcov is hard because C-code uses ; in many places
# which also happens to be the same as the CMake list delimeter).
# which also happens to be the same as the CMake list delimiter).
file(READ ${GCOV_SRC_PATH} GCOV_FILE_SOURCE)

string(REPLACE "\\" "\\\\" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/experiments/cuda_module_loading_lazy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

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

if(LINUX)
Expand Down
6 changes: 6 additions & 0 deletions cmake/external/cccl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ set(CCCL_INCLUDE_DIR ${CCCL_SOURCE_DIR})
message("CCCL_INCLUDE_DIR is ${CCCL_INCLUDE_DIR}")
include_directories(${CCCL_INCLUDE_DIR})

file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/cccl/util_device.cuh.patch
native_src)
set(CCCL_PATCH_COMMAND git checkout -- . && git checkout ${CCCL_TAG} && patch
-p1 -Nd ${CCCL_SOURCE_DIR} < ${native_src})

ExternalProject_Add(
extern_cccl
${EXTERNAL_PROJECT_LOG_ARGS}
SOURCE_DIR ${CCCL_SOURCE_DIR}
PREFIX ${CCCL_PREFIX_DIR}
UPDATE_COMMAND ""
PATCH_COMMAND ${CCCL_PATCH_COMMAND}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
Expand Down
4 changes: 3 additions & 1 deletion cmake/external/dirent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ if((NOT DEFINED DIRENT_NAME) OR (NOT DEFINED DIRENT_URL))
set(DIRENT_URL
"${GIT_URL}/tronkko/dirent/archive/refs/tags/1.23.2.tar.gz"
CACHE STRING "" FORCE)
set(DIRENT_CACHE_FILENAME "1.23.2.tar.gz")
set(DIRENT_CACHE_FILENAME
"1.23.2.tar.gz"
CACHE STRING "" FORCE)
endif()

message(STATUS "DIRENT_NAME: ${DIRENT_NAME}, DIRENT_URL: ${DIRENT_URL}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/eigen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if(WIN32)
elseif(LINUX)
if(WITH_ROCM)
# For HIPCC Eigen::internal::device::numeric_limits is not EIGEN_DEVICE_FUNC
# which will cause compiler error of using __host__ funciont
# which will cause compiler error of using __host__ function
# in __host__ __device__
file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/eigen/Meta.h native_src)
file(TO_NATIVE_PATH ${SOURCE_DIR}/Eigen/src/Core/util/Meta.h native_dst)
Expand Down
41 changes: 28 additions & 13 deletions cmake/external/lapack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,34 @@ elseif(WIN32)
set(GFORTRAN_LIB "${LAPACK_LIB_DIR}/libgfortran-3.dll")
set(BLAS_LIB "${LAPACK_LIB_DIR}/libblas.dll")
set(LAPACK_LIB "${LAPACK_LIB_DIR}/liblapack.dll")
else()
set(LAPACK_FILE
"lapack_mac_v3.10.0.20210628.tar.gz"
CACHE STRING "" FORCE)
set(LAPACK_URL
"https://paddlepaddledeps.bj.bcebos.com/${LAPACK_FILE}"
CACHE STRING "" FORCE)
set(LAPACK_URL_MD5 427aecf8dee8523de3566ca8e47944d7)
set(GNU_RT_LIB_1 "${LAPACK_LIB_DIR}/libquadmath.0.dylib")
set(GNU_RT_LIB_2 "${LAPACK_LIB_DIR}/libgcc_s.1.dylib")
set(GFORTRAN_LIB "${LAPACK_LIB_DIR}/libgfortran.5.dylib")
set(BLAS_LIB "${LAPACK_LIB_DIR}/libblas.3.dylib")
set(LAPACK_LIB "${LAPACK_LIB_DIR}/liblapack.3.dylib")
else() # MacOS
if(APPLE AND WITH_ARM)
set(LAPACK_FILE
"lapack_mac_arm64_v0.3.26.tar.gz"
CACHE STRING "" FORCE)
set(LAPACK_URL
"https://paddlepaddledeps.bj.bcebos.com/${LAPACK_FILE}"
CACHE STRING "" FORCE)
set(LAPACK_URL_MD5 3f6412105ae2b7465e5ee90c8673e6d4)
set(GNU_RT_LIB_1 "${LAPACK_LIB_DIR}/libquadmath.0.dylib")
set(GNU_RT_LIB_2 "${LAPACK_LIB_DIR}/libgcc_s.1.dylib")
set(GFORTRAN_LIB "${LAPACK_LIB_DIR}/libgfortran.5.dylib")
set(BLAS_LIB "${LAPACK_LIB_DIR}/libblas.dylib")
set(LAPACK_LIB "${LAPACK_LIB_DIR}/liblapack.dylib")
else()
set(LAPACK_FILE
"lapack_mac_v3.10.0.20210628.tar.gz"
CACHE STRING "" FORCE)
set(LAPACK_URL
"https://paddlepaddledeps.bj.bcebos.com/${LAPACK_FILE}"
CACHE STRING "" FORCE)
set(LAPACK_URL_MD5 427aecf8dee8523de3566ca8e47944d7)
set(GNU_RT_LIB_1 "${LAPACK_LIB_DIR}/libquadmath.0.dylib")
set(GNU_RT_LIB_2 "${LAPACK_LIB_DIR}/libgcc_s.1.dylib")
set(GFORTRAN_LIB "${LAPACK_LIB_DIR}/libgfortran.5.dylib")
set(BLAS_LIB "${LAPACK_LIB_DIR}/libblas.3.dylib")
set(LAPACK_LIB "${LAPACK_LIB_DIR}/liblapack.3.dylib")
endif()
endif()

function(download_lapack)
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ include(python_module)

check_py_version(${PY_VERSION})

# Find Python with mnimum PY_VERSION specified or will raise error!
# Find Python with minimum PY_VERSION specified or will raise error!
find_package(PythonInterp ${PY_VERSION} REQUIRED)
find_package(PythonLibs ${PY_VERSION} REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion cmake/external/xpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(NOT DEFINED XPU_BASE_DATE)
set(XPU_BASE_DATE "20240104")
endif()
if(NOT DEFINED XPU_XHPC_BASE_DATE)
set(XPU_XHPC_BASE_DATE "20240315")
set(XPU_XHPC_BASE_DATE "20240328")
endif()
set(XPU_XCCL_BASE_VERSION "1.1.8.1")
if(NOT DEFINED XPU_XFT_BASE_VERSION)
Expand Down
1 change: 1 addition & 0 deletions cmake/flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ if(NOT WIN32)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(COMMON_FLAGS
${COMMON_FLAGS}
-Wno-error=unknown-warning-option # For some unknown warning options in lower version clang
-Wno-error=unused-private-field
-Wno-error=unused-const-variable
-Wno-error=deprecated-copy-with-user-provided-copy # For three/five/zeros rule, clang
Expand Down
Loading

0 comments on commit 4965a83

Please sign in to comment.