Skip to content

Commit

Permalink
Merge branch 'PaddlePaddle:develop' into fp_16
Browse files Browse the repository at this point in the history
  • Loading branch information
Liyulingyue authored Aug 23, 2023
2 parents 37219e6 + 29a3d2d commit 9ab9dad
Show file tree
Hide file tree
Showing 938 changed files with 39,327 additions and 17,627 deletions.
16 changes: 8 additions & 8 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
Checks: '
-bugprone-argument-comment,
bugprone-argument-comment,
-bugprone-assert-side-effect,
-bugprone-bad-signal-to-kill-thread,
-bugprone-bool-pointer-implicit-conversion,
-bugprone-branch-clone,
-bugprone-copy-constructor-init,
bugprone-copy-constructor-init,
-bugprone-dangling-handle,
-bugprone-dynamic-static-initializers,
-bugprone-exception-escape,
Expand All @@ -14,7 +14,7 @@ Checks: '
-bugprone-inaccurate-erase,
-bugprone-incorrect-roundings,
-bugprone-infinite-loop,
-bugprone-integer-division,
bugprone-integer-division,
-bugprone-macro-repeated-side-effects,
-bugprone-misplaced-operator-in-strlen-in-alloc,
-bugprone-misplaced-widening-cast,
Expand Down Expand Up @@ -137,21 +137,21 @@ bugprone-unused-raii,
-clang-analyzer-security.insecureAPI.mktemp,
-clang-analyzer-security.insecureAPI.rand,
-clang-analyzer-security.insecureAPI.strcpy,
-clang-analyzer-security.insecureAPI.vfork,
clang-analyzer-security.insecureAPI.vfork,
-clang-analyzer-unix.API,
-clang-analyzer-unix.DynamicMemoryModeling,
-clang-analyzer-unix.Malloc,
-clang-analyzer-unix.MallocSizeof,
-clang-analyzer-unix.MismatchedDeallocator,
-clang-analyzer-unix.Vfork,
clang-analyzer-unix.Vfork,
-clang-analyzer-unix.cstring.BadSizeArg,
-clang-analyzer-unix.cstring.CStringModeling,
-clang-analyzer-unix.cstring.NullArg,
-clang-analyzer-valist.CopyToSelf,
-clang-analyzer-valist.Uninitialized,
-clang-analyzer-valist.Unterminated,
-clang-analyzer-valist.ValistBase,
-cppcoreguidelines-avoid-c-arrays,
cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-goto,
-cppcoreguidelines-c-copy-assignment-signature,
-cppcoreguidelines-explicit-virtual-functions,
Expand Down Expand Up @@ -179,7 +179,7 @@ modernize-redundant-void-arg,
-modernize-replace-random-shuffle,
-modernize-shrink-to-fit,
-modernize-unary-static-assert,
-modernize-use-bool-literals,
modernize-use-bool-literals,
modernize-use-emplace,
modernize-use-equals-default,
-modernize-use-equals-delete,
Expand All @@ -188,7 +188,7 @@ modernize-use-nullptr,
modernize-use-override,
-modernize-use-transparent-functors,
-modernize-use-uncaught-exceptions,
-performance-faster-string-find,
performance-faster-string-find,
-performance-for-range-copy,
-performance-implicit-conversion-in-loop,
-performance-inefficient-algorithm,
Expand Down
24 changes: 24 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,27 @@
path = third_party/gtest
url = https://github.com/google/googletest.git
ignore = dirty
[submodule "third_party/openblas"]
path = third_party/openblas
url = https://github.com/xianyi/OpenBLAS.git
ignore = dirty
[submodule "third_party/leveldb"]
path = third_party/leveldb
url = https://github.com/google/leveldb.git
ignore = dirty
[submodule "third_party/brpc"]
path = third_party/brpc
url = https://github.com/apache/brpc.git
ignore = dirty
[submodule "third_party/rocksdb"]
path = third_party/rocksdb
url = https://github.com/Thunderbrook/rocksdb
ignore = dirty
[submodule "third_party/absl"]
path = third_party/absl
url = https://github.com/abseil/abseil-cpp.git
ignore = dirty
[submodule "third_party/jitify"]
path = third_party/jitify
url = https://github.com/NVIDIA/jitify.git
ignore = dirty
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PaddlePaddle is originated from industrial practices with dedication and commitm

## Installation

### Latest PaddlePaddle Release: [v2.4](https://github.com/PaddlePaddle/Paddle/tree/release/2.4)
### Latest PaddlePaddle Release: [v2.5](https://github.com/PaddlePaddle/Paddle/tree/release/2.5)

Our vision is to enable deep learning for everyone via PaddlePaddle.
Please refer to our [release announcement](https://github.com/PaddlePaddle/Paddle/releases) to track the latest features of PaddlePaddle.
Expand Down
2 changes: 1 addition & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

## 安装

### PaddlePaddle最新版本: [v2.4](https://github.com/PaddlePaddle/Paddle/tree/release/2.4)
### PaddlePaddle最新版本: [v2.5](https://github.com/PaddlePaddle/Paddle/tree/release/2.5)

跟进PaddlePaddle最新特性请参考我们的[版本说明](https://github.com/PaddlePaddle/Paddle/releases)

Expand Down
2 changes: 1 addition & 1 deletion README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PaddlePaddle は、工業化に対するコミットメントを持つ工業的

## インストール

### PaddlePaddle の最新リリース: [v2.4](https://github.com/PaddlePaddle/Paddle/tree/release/2.4)
### PaddlePaddle の最新リリース: [v2.5](https://github.com/PaddlePaddle/Paddle/tree/release/2.5)

私たちのビジョンは、PaddlePaddle を通じて、誰もが深層学習を行えるようにすることです。
PaddlePaddle の最新機能を追跡するために、私たちの[リリースのお知らせ](https://github.com/PaddlePaddle/Paddle/releases)を参照してください。
Expand Down
6 changes: 1 addition & 5 deletions cmake/cinn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,8 @@ set(CINN_LIB "${CINN_LIB_LOCATION}/${CINN_LIB_NAME}")
# Add CINN's dependencies header files
######################################

# Add absl
set(ABSL_INCLUDE_DIR "${CMAKE_BINARY_DIR}/dist/third_party/absl/include")
include_directories(${ABSL_INCLUDE_DIR})

# Add isl
set(ISL_INCLUDE_DIR "${CMAKE_BINARY_DIR}/dist/third_party/isl/include")
set(ISL_INCLUDE_DIR "${CMAKE_BINARY_DIR}/third_party/install/isl/include")
include_directories(${ISL_INCLUDE_DIR})

# Add LLVM
Expand Down
8 changes: 5 additions & 3 deletions cmake/cinn/core.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,11 @@ function(cinn_nv_test TARGET_NAME)
set(multiValueArgs SRCS DEPS ARGS)
cmake_parse_arguments(cinn_nv_test "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
cuda_add_executable(${TARGET_NAME} ${cinn_nv_test_SRCS} OPTIONS
"-std=c++${CMAKE_CUDA_STANDARD}")
# Attention:
# 1. cuda_add_executable is deprecated after cmake v3.10, use cuda_add_executable for CUDA please.
# 2. cuda_add_executable does not support ccache.
# Reference: https://cmake.org/cmake/help/v3.10/module/FindCUDA.html
add_executable(${TARGET_NAME} ${cinn_nv_test_SRCS})
get_property(os_dependency_modules GLOBAL PROPERTY OS_DEPENDENCY_MODULES)
target_link_libraries(
${TARGET_NAME}
Expand All @@ -165,7 +168,6 @@ function(cinn_nv_test TARGET_NAME)
${CUDA_LIBRARIES})
add_dependencies(${TARGET_NAME} ${cinn_nv_test_DEPS} cinn_gtest_main gtest)
common_link(${TARGET_NAME})
# add_test(${TARGET_NAME} ${TARGET_NAME})
add_test(
NAME ${TARGET_NAME}
COMMAND ${TARGET_NAME} "${cinn_nv_test_ARGS}"
Expand Down
9 changes: 4 additions & 5 deletions cmake/cinn/external/absl.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include(ExternalProject)

set(ABSL_SOURCES_DIR ${THIRD_PARTY_PATH}/absl)
set(ABSL_SOURCES_DIR ${PADDLE_SOURCE_DIR}/third_party/absl)
set(ABSL_INSTALL_DIR ${THIRD_PARTY_PATH}/install/absl)

set(ABSL_PREFIX_DIR ${THIRD_PARTY_PATH}/absl)
set(ABSL_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

set(ABSL_REPOSITORY "https://github.com/abseil/abseil-cpp.git")
Expand All @@ -22,9 +22,8 @@ ExternalProject_Add(
external_absl
${EXTERNAL_PROJECT_LOG_ARGS}
DEPENDS gflags
GIT_REPOSITORY ${ABSL_REPOSITORY}
GIT_TAG ${ABSL_TAG}
PREFIX ${ABSL_SOURCES_DIR}
PREFIX ${ABSL_PREFIX_DIR}
SOURCE_DIR ${ABSL_SOURCES_DIR}
UPDATE_COMMAND ""
CMAKE_ARGS ${OPTIONAL_ARGS}
-DCMAKE_INSTALL_PREFIX=${ABSL_INSTALL_DIR}
Expand Down
65 changes: 0 additions & 65 deletions cmake/cinn/external/boost.cmake

This file was deleted.

70 changes: 53 additions & 17 deletions cmake/cinn/external/ginac.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,68 @@ include(ExternalProject)
# ginac-1.8.1 https://www.ginac.de/ginac-1.8.1.tar.bz2
# all build with CFLAGS="-fPIC -DPIC" CXXFLAGS="-fPIC -DPIC" --enable-static=yes

set(GINAC_FILE
"ginac-1.8.1_cln-1.3.6_gmp-6.2.1.tar.gz"
CACHE STRING "" FORCE)
set(GINAC_DOWNLOAD_URL
https://paddle-inference-dist.bj.bcebos.com/CINN/ginac-1.8.1_cln-1.3.6_gmp-6.2.1.tar.gz
)
set(GINAC_MD5 ebc3e4b7770dd604777ac3f01bfc8b06)
"https://paddle-inference-dist.bj.bcebos.com/CINN/${GINAC_FILE}")
set(GINAC_URL_MD5 ebc3e4b7770dd604777ac3f01bfc8b06)
set(GINAC_DOWNLOAD_DIR ${PADDLE_SOURCE_DIR}/third_party/ginac)
set(GINAC_PREFIX_DIR ${THIRD_PARTY_PATH}/ginac)
set(GINAC_INSTALL_DIR ${THIRD_PARTY_PATH}/install/ginac)

function(download_ginac)
message(
STATUS
"Downloading ${GINAC_DOWNLOAD_URL} to ${GINAC_DOWNLOAD_DIR}/${GINAC_FILE}"
)
file(
DOWNLOAD ${GINAC_DOWNLOAD_URL} ${GINAC_DOWNLOAD_DIR}/${GINAC_FILE}
EXPECTED_MD5 ${GINAC_URL_MD5}
STATUS ERR)
if(ERR EQUAL 0)
message(STATUS "Download ${GINAC_FILE} success")
else()
message(
FATAL_ERROR
"Download failed, error: ${ERR}\n You can try downloading ${GINAC_FILE} again"
)
endif()
endfunction()

# Download and check ginac.
if(EXISTS ${GINAC_DOWNLOAD_DIR}/${GINAC_FILE})
file(MD5 ${GINAC_DOWNLOAD_DIR}/${GINAC_FILE} GINAC_MD5)
if(NOT GINAC_MD5 STREQUAL GINAC_URL_MD5)
# clean build file
file(REMOVE_RECURSE ${GINAC_PREFIX_DIR})
file(REMOVE_RECURSE ${GINAC_INSTALL_DIR})
download_ginac()
endif()
else()
download_ginac()
endif()

ExternalProject_Add(
external_ginac
${EXTERNAL_PROJECT_LOG_ARGS}
URL ${GINAC_DOWNLOAD_URL}
URL_MD5 ${GINAC_MD5}
PREFIX ${THIRD_PARTY_PATH}/ginac
SOURCE_DIR ${THIRD_PARTY_PATH}/install/ginac
URL ${GINAC_DOWNLOAD_DIR}/${GINAC_FILE}
URL_MD5 ${GINAC_URL_MD5}
DOWNLOAD_DIR ${GINAC_DOWNLOAD_DIR}
PREFIX ${GINAC_PREFIX_DIR}
SOURCE_DIR ${GINAC_INSTALL_DIR}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${THIRD_PARTY_PATH}/install/ginac/lib/libginac.a
BUILD_BYPRODUCTS ${THIRD_PARTY_PATH}/install/ginac/lib/libcln.a
BUILD_BYPRODUCTS ${THIRD_PARTY_PATH}/install/ginac/lib/libgmp.a)
BUILD_BYPRODUCTS ${GINAC_INSTALL_DIR}/lib/libginac.a
BUILD_BYPRODUCTS ${GINAC_INSTALL_DIR}/lib/libcln.a
BUILD_BYPRODUCTS ${GINAC_INSTALL_DIR}/lib/libgmp.a)

add_library(ginac STATIC IMPORTED GLOBAL)
add_dependencies(ginac external_ginac)
set_property(
TARGET ginac PROPERTY IMPORTED_LOCATION
${THIRD_PARTY_PATH}/install/ginac/lib/libginac.a)
target_link_libraries(
ginac INTERFACE ${THIRD_PARTY_PATH}/install/ginac/lib/libcln.a
${THIRD_PARTY_PATH}/install/ginac/lib/libgmp.a)
include_directories(${THIRD_PARTY_PATH}/install/ginac/include)
set_property(TARGET ginac PROPERTY IMPORTED_LOCATION
${GINAC_INSTALL_DIR}/lib/libginac.a)
target_link_libraries(ginac INTERFACE ${GINAC_INSTALL_DIR}/lib/libcln.a
${GINAC_INSTALL_DIR}/lib/libgmp.a)
include_directories(${GINAC_INSTALL_DIR}/include)
Loading

0 comments on commit 9ab9dad

Please sign in to comment.