diff --git a/CMakeLists.txt b/CMakeLists.txt index fb796103350ac4403d4151cf08eb4315bcde68fd..7d1e7e415597504ebfcac8ae763ff87c244dfbbf 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,6 +110,7 @@ option(WITH_LITE "Compile Paddle Fluid with Lite Engine" OFF) option(WITH_NCCL "Compile PaddlePaddle with NCCL support" ON) option(WITH_CRYPTO "Compile PaddlePaddle with crypto support" ON) option(WITH_ARM "Compile PaddlePaddle with arm support" OFF) +option(WITH_MUSL "Compile with musl libc instead of gblic" OFF) # PY_VERSION if(NOT PY_VERSION) diff --git a/cmake/configure.cmake b/cmake/configure.cmake index cf458d97706755e794c5fbb1ba9d3fcb51e9d1ce..630c7df5f05a0327acabf510eb13e58366109682 100644 --- a/cmake/configure.cmake +++ b/cmake/configure.cmake @@ -51,6 +51,19 @@ if(WIN32) endif(NOT MSVC) endif(WIN32) +if(WITH_MUSL) + add_definitions(-DPADDLE_WITH_MUSL) + + message(STATUS, "WITH_CRYPTO=OFF, when WITH_MUSL=ON") + SET(WITH_CRYPTO OFF) + + message(STATUS, "WITH_MKL=OFF, when WITH_MUSL=ON") + SET(WITH_MKL OFF) + + message(STATUS, "WITH_GPU=OFF, when WITH_MUSL=ON") + SET(WITH_GPU OFF) +endif() + if(WITH_PSLIB) add_definitions(-DPADDLE_WITH_PSLIB) endif() diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index 82dd4fa2e8eae9ce6dbafa5f2d4acf47ce7ecd9f..f1a22fb8f6b72988257dcf4cda12209d63cd73b0 100644 --- a/cmake/external/protobuf.cmake +++ b/cmake/external/protobuf.cmake @@ -199,7 +199,8 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ENDIF() SET(PROTOBUF_REPOSITORY https://github.com/protocolbuffers/protobuf.git) - SET(PROTOBUF_TAG 9f75c5aa851cd877fb0d93ccc31b8567a6706546) + #SET(PROTOBUF_TAG 9f75c5aa851cd877fb0d93ccc31b8567a6706546) + SET(PROTOBUF_TAG 2761122b810fe8861004ae785cc3ab39f384d342) cache_third_party(${TARGET_NAME} REPOSITORY ${PROTOBUF_REPOSITORY} @@ -234,7 +235,8 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ) ENDFUNCTION() -SET(PROTOBUF_VERSION 3.1.0) +#SET(PROTOBUF_VERSION 3.1.0) +SET(PROTOBUF_VERSION 3.5.0) IF(NOT PROTOBUF_FOUND) build_protobuf(extern_protobuf FALSE) diff --git a/python/paddle/fluid/core.py b/python/paddle/fluid/core.py index a05aa3b0a84b57bb1f9ce00b0ad007280c316c6e..5abfe1ed85d11b215deaffc8320680a0a8194d5d 100644 --- a/python/paddle/fluid/core.py +++ b/python/paddle/fluid/core.py @@ -201,7 +201,8 @@ def pre_load(dso_name): def get_glibc_ver(): - return run_shell_command("ldd --version | awk '/ldd/{print $NF}'") + return "musl_" + run_shell_command("ldd 2>&1 | awk '/Version/{print $NF}'") + #return run_shell_command("ldd --version | awk '/ldd/{print $NF}'") def less_than_ver(a, b): @@ -226,7 +227,7 @@ def less_than_ver(a, b): # For paddle, the problem is that 'libgomp' is a DSO with static TLS, and it is loaded after 14 DSOs. # So, here is a tricky way to solve the problem by pre load 'libgomp' before 'core_avx.so'. # The final solution is to upgrade glibc to > 2.22 on the target system. -if platform.system().lower() == 'linux' and less_than_ver(get_glibc_ver(), +if platform.system().lower() == 'linux' and False and less_than_ver(get_glibc_ver(), '2.23'): try: pre_load('libgomp') diff --git a/python/paddle/vision/transforms/transforms.py b/python/paddle/vision/transforms/transforms.py index 14809e0c1acaa1b6d5a494e6e3df1801e1c8f61b..2fa160ef25d37f9013bd91fa05d721c5b9bcf4cc 100644 --- a/python/paddle/vision/transforms/transforms.py +++ b/python/paddle/vision/transforms/transforms.py @@ -122,7 +122,7 @@ class BatchCompose(object): Args: transforms (list): List of transforms to compose. these transforms perform on batch data. - + Examples: .. code-block:: python diff --git a/python/requirements.txt b/python/requirements.txt index c8d3b2af1794bb0858b187d6a4c641322f50cdd1..a83261d5963691d086d00eeec9871eb9c67ca18e 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -4,10 +4,10 @@ numpy>=1.13, <=1.16.4 ; python_version<"3.5" numpy>=1.13 ; python_version>="3.5" protobuf>=3.1.0 gast==0.3.3 -matplotlib<=2.2.4 ; python_version<"3.6" +#matplotlib<=2.2.4 ; python_version<"3.6" scipy>=0.19.0, <=1.2.1 ; python_version<"3.5" nltk>=3.2.2, <=3.4 ; python_version<"3.5" -matplotlib<=3.2.1 ; python_version>="3.6" +#matplotlib<=3.2.1 ; python_version>="3.6" scipy<=1.3.1 ; python_version=="3.5" scipy ; python_version>"3.5" nltk ; python_version>="3.5"