-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
370 changed files
with
26,352 additions
and
3,210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
INCLUDE (ExternalProject) | ||
|
||
SET(LAPACK_PREFIX_DIR ${THIRD_PARTY_PATH}/lapack) | ||
SET(LAPACK_SOURCE_DIR ${THIRD_PARTY_PATH}/lapack/src/extern_lapack) | ||
SET(LAPACK_INSTALL_DIR ${THIRD_PARTY_PATH}/install/lapack) | ||
SET(LAPACK_INCLUDE_DIR ${LAPACK_SOURCE_DIR}) | ||
SET(LAPACK_LIB_DIR ${LAPACK_INSTALL_DIR}/lib) | ||
|
||
# Note(zhouwei): lapack need fortan compiler which many machines don't have, so use precompiled library. | ||
# use lapack tag v3.10.0 on 06/28/2021 https://github.com/Reference-LAPACK/lapack | ||
if(LINUX) | ||
SET(LAPACK_VER "lapack_lnx_v3.10.0.20210628" CACHE STRING "" FORCE) | ||
SET(LAPACK_URL "https://paddlepaddledeps.bj.bcebos.com/${LAPACK_VER}.tar.gz" CACHE STRING "" FORCE) | ||
SET(LAPACK_URL_MD5 71f8cc8237a8571692f3e07f9a4f25f6) | ||
SET(GNU_RT_LIB_1 "${LAPACK_LIB_DIR}/libquadmath.so.0") | ||
SET(GFORTRAN_LIB "${LAPACK_LIB_DIR}/libgfortran.so.3") | ||
SET(BLAS_LIB "${LAPACK_LIB_DIR}/libblas.so.3") | ||
SET(LAPACK_LIB "${LAPACK_LIB_DIR}/liblapack.so.3") | ||
elseif(WIN32) | ||
# Refer to [lapack-for-windows] http://icl.cs.utk.edu/lapack-for-windows/lapack/#lapacke | ||
SET(LAPACK_VER "lapack_win_v3.10.0.20210628" CACHE STRING "" FORCE) | ||
SET(LAPACK_URL "https://paddlepaddledeps.bj.bcebos.com/${LAPACK_VER}.zip" CACHE STRING "" FORCE) | ||
SET(LAPACK_URL_MD5 590d080392dcd5abbd5dca767a50b63a) | ||
SET(GNU_RT_LIB_1 "${LAPACK_LIB_DIR}/libquadmath-0.dll") | ||
SET(GNU_RT_LIB_2 "${LAPACK_LIB_DIR}/libgcc_s_seh-1.dll") | ||
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_VER "lapack_mac_v3.10.0.20210628" CACHE STRING "" FORCE) | ||
SET(LAPACK_URL "https://paddlepaddledeps.bj.bcebos.com/${LAPACK_VER}.tar.gz" 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() | ||
|
||
ExternalProject_Add( | ||
extern_lapack | ||
${EXTERNAL_PROJECT_LOG_ARGS} | ||
URL ${LAPACK_URL} | ||
URL_MD5 ${LAPACK_URL_MD5} | ||
PREFIX ${LAPACK_PREFIX_DIR} | ||
DOWNLOAD_DIR ${LAPACK_SOURCE_DIR} | ||
DOWNLOAD_NO_PROGRESS 1 | ||
PATCH_COMMAND "" | ||
UPDATE_COMMAND "" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAPACK_SOURCE_DIR} ${LAPACK_LIB_DIR} | ||
BUILD_BYPRODUCTS ${BLAS_LIB} | ||
BUILD_BYPRODUCTS ${LAPACK_LIB} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
include(ExternalProject) | ||
|
||
|
||
set(POCKETFFT_PATH "${THIRD_PARTY_PATH}/pocketfft" CACHE STRING "A path setting for external_pocketfft path.") | ||
set(POCKETFFT_PREFIX_DIR ${POCKETFFT_PATH}) | ||
|
||
set(POCKETFFT_REPOSITORY https://gitlab.mpcdf.mpg.de/mtr/pocketfft.git) | ||
set(POCKETFFT_TAG release_for_eigen) | ||
|
||
SET(POCKETFFT_INCLUDE_DIR ${POCKETFFT_PREFIX_DIR}/src) | ||
message("POCKETFFT_INCLUDE_DIR is ${POCKETFFT_INCLUDE_DIR}") | ||
include_directories(${POCKETFFT_INCLUDE_DIR}) | ||
|
||
ExternalProject_Add( | ||
extern_pocketfft | ||
${EXTERNAL_PROJECT_LOG_ARGS} | ||
${SHALLOW_CLONE} | ||
GIT_REPOSITORY ${POCKETFFT_REPOSITORY} | ||
GIT_TAG ${POCKETFFT_TAG} | ||
PREFIX ${POCKETFFT_PREFIX_DIR} | ||
UPDATE_COMMAND "" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
TEST_COMMAND "" | ||
) | ||
|
||
add_library(pocketfft INTERFACE) | ||
|
||
add_dependencies(pocketfft extern_pocketfft) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
ec15acc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉