提交 72be50ca 编写于 作者: C chenzhiyu

add with_musl option

上级 44d9b48e
......@@ -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)
......
......@@ -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()
......
......@@ -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)
......
......@@ -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')
......
......@@ -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
......
......@@ -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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册