Skip to content

Commit ff85734

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into fast_install_1.3
2 parents 3972dd8 + 312500d commit ff85734

File tree

1,480 files changed

+16910
-203099
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,480 files changed

+16910
-203099
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ cache:
44
- $HOME/.ccache
55
- $HOME/.cache/pip
66
- $TRAVIS_BUILD_DIR/build/third_party
7-
- $TRAVIS_BUILD_DIR/build_android/third_party
87
sudo: required
98
dist: trusty
109
services:
@@ -13,7 +12,6 @@ os:
1312
- linux
1413
env:
1514
- JOB=check_style
16-
- JOB=build_android
1715
addons:
1816
ssh_known_hosts: 13.229.163.131
1917
before_install:

CMakeLists.txt

Lines changed: 3 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ if(WIN32)
3333
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /bigobj /MT")
3434
endif(WIN32)
3535

36-
if(NOT CMAKE_CROSSCOMPILING)
37-
find_package(CUDA QUIET)
38-
endif(NOT CMAKE_CROSSCOMPILING)
36+
find_package(CUDA QUIET)
3937
find_package(Git REQUIRED)
4038
find_package(Threads REQUIRED)
4139

@@ -49,7 +47,6 @@ option(WITH_MKL "Compile PaddlePaddle with MKL support." ${AVX_FO
4947
option(WITH_NGRAPH "Compile PaddlePaddle with nGraph support." OFF)
5048
option(WITH_DSO "Compile PaddlePaddle with dynamic linked CUDA" ON)
5149
option(WITH_TESTING "Compile PaddlePaddle with unit testing" OFF)
52-
option(WITH_SWIG_PY "Compile PaddlePaddle with inference api" ON)
5350
option(WITH_PYTHON "Compile PaddlePaddle with python interpreter" ON)
5451
option(WITH_DOUBLE "Compile PaddlePaddle with double precision" OFF)
5552
option(WITH_RDMA "Compile PaddlePaddle with RDMA support" OFF)
@@ -60,11 +57,9 @@ option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
6057
option(WITH_COVERAGE "Compile PaddlePaddle with code coverage" OFF)
6158
option(COVERALLS_UPLOAD "Package code coverage data to coveralls" OFF)
6259
option(ON_TRAVIS "Exclude special unit test on Travis CI" OFF)
63-
option(WITH_C_API "Compile PaddlePaddle with C-API(Prediction)" OFF)
6460
option(WITH_FLUID_ONLY "Compile PaddlePaddle fluid only" OFF)
6561
option(WITH_GOLANG "Compile PaddlePaddle with GOLANG" OFF)
6662
option(GLIDE_INSTALL "Download and install go dependencies " ON)
67-
option(USE_NNPACK "Compile PaddlePaddle with NNPACK library" OFF)
6863
option(WITH_DISTRIBUTE "Compile with distributed support" OFF)
6964
option(WITH_PSLIB "Compile with pslib support" OFF)
7065
option(USE_EIGEN_FOR_BLAS "Use matrix multiplication in Eigen" OFF)
@@ -96,37 +91,6 @@ if(NOT CMAKE_BUILD_TYPE)
9691
FORCE)
9792
endif()
9893

99-
if(ANDROID OR IOS)
100-
if(ANDROID)
101-
if(${CMAKE_SYSTEM_VERSION} VERSION_LESS "16")
102-
message(FATAL_ERROR "Unsupport standalone toolchains with Android API level lower than 16")
103-
endif()
104-
endif()
105-
106-
set(WITH_GPU OFF CACHE STRING
107-
"Disable GPU when cross-compiling for Android and iOS" FORCE)
108-
set(WITH_AVX OFF CACHE STRING
109-
"Disable AVX when cross-compiling for Android and iOS" FORCE)
110-
set(WITH_PYTHON OFF CACHE STRING
111-
"Disable PYTHON when cross-compiling for Android and iOS" FORCE)
112-
set(WITH_RDMA OFF CACHE STRING
113-
"Disable RDMA when cross-compiling for Android and iOS" FORCE)
114-
set(WITH_MKL OFF CACHE STRING
115-
"Disable MKL when cross-compiling for Android and iOS" FORCE)
116-
set(WITH_NGRAPH OFF CACHE STRING
117-
"Disable nGraph when cross-compiling for Android and iOS" FORCE)
118-
set(WITH_GOLANG OFF CACHE STRING
119-
"Disable golang when cross-compiling for Android and iOS" FORCE)
120-
121-
# Compile PaddlePaddle mobile inference library
122-
if (NOT WITH_C_API)
123-
set(WITH_C_API ON CACHE STRING
124-
"Always compile the C_API when cross-compiling for Android and iOS" FORCE)
125-
endif()
126-
set(MOBILE_INFERENCE ON)
127-
add_definitions(-DPADDLE_MOBILE_INFERENCE)
128-
endif()
129-
13094
if (APPLE)
13195
set(WITH_MKL OFF CACHE STRING
13296
"Disable MKL for building on mac" FORCE)
@@ -135,8 +99,6 @@ endif()
13599
if (WIN32)
136100
set(WITH_DISTRIBUTE OFF CACHE STRING
137101
"Disable DISTRIBUTE when compiling for Windows" FORCE)
138-
set(WITH_C_API OFF CACHE STRING
139-
"Disable C_API when compiling for Windows" FORCE)
140102
set(WITH_FLUID_ONLY ON CACHE STRING
141103
"Enable FLUID_ONLY when compiling for Windows" FORCE)
142104
endif()
@@ -150,21 +112,7 @@ set(FLUID_INSTALL_DIR "${CMAKE_BINARY_DIR}/fluid_install_dir" CACHE STRING
150112
set(FLUID_INFERENCE_INSTALL_DIR "${CMAKE_BINARY_DIR}/fluid_inference_install_dir" CACHE STRING
151113
"A path setting fluid inference shared and static libraries")
152114

153-
if (WITH_C_API AND WITH_PYTHON)
154-
message(WARNING "It is suggest not embedded a python interpreter in Paddle "
155-
"when using C-API. It will give an unpredictable behavior when using a "
156-
"different Python interpreter from compiling.")
157-
endif()
158-
159-
if (WITH_C_API)
160-
set(WITH_FLUID_ONLY OFF CACHE STRING "Disable install fluid when compile the C_API" FORCE)
161-
endif()
162-
163-
if(MOBILE_INFERENCE)
164-
set(THIRD_PARTY_BUILD_TYPE MinSizeRel)
165-
else()
166-
set(THIRD_PARTY_BUILD_TYPE Release)
167-
endif()
115+
set(THIRD_PARTY_BUILD_TYPE Release)
168116

169117
set(WITH_MKLML ${WITH_MKL})
170118
if (NOT DEFINED WITH_MKLDNN)
@@ -193,7 +141,6 @@ include(external/python) # download, build, install python
193141
include(external/openblas) # download, build, install openblas
194142
include(external/mkldnn) # download, build, install mkldnn
195143
include(external/ngraph) # download, build, install nGraph
196-
include(external/swig) # download, build, install swig
197144
include(external/boost) # download boost
198145
include(external/any) # download libn::any
199146
include(external/eigen) # download eigen3
@@ -265,7 +212,7 @@ endif()
265212
if (WITH_JEMALLOC)
266213
find_package(JeMalloc REQUIRED)
267214
include_directories(${JEMALLOC_INCLUDE_DIR})
268-
add_definitions(-DWITH_JEMALLOC)
215+
add_definitions(-DPADDLE_WITH_JEMALLOC)
269216
endif()
270217

271218
include(generic) # simplify cmake module
@@ -279,9 +226,6 @@ include(inference_lib) # add paddle fluid inference libraries
279226

280227

281228
include_directories("${PADDLE_SOURCE_DIR}")
282-
include_directories("${PADDLE_SOURCE_DIR}/paddle/legacy/cuda/include")
283-
include_directories("${CMAKE_CURRENT_BINARY_DIR}/proto")
284-
include_directories("${CMAKE_CURRENT_BINARY_DIR}/go/pserver/client/c")
285229

286230
set(EXTERNAL_LIBS
287231
gflags
@@ -315,26 +259,6 @@ if(WITH_MKLDNN)
315259
list(APPEND EXTERNAL_LIBS ${MKLDNN_LIB})
316260
endif()
317261

318-
if(USE_NNPACK)
319-
include(external/nnpack)
320-
list(APPEND EXTERNAL_LIBS ${NNPACK_LIBS})
321-
endif(USE_NNPACK)
322-
323-
add_subdirectory(proto)
324-
325-
if(NOT MOBILE_INFERENCE AND NOT WITH_FLUID_ONLY)
326-
# "add_subdirectory(go)" should be placed after the following loine,
327-
# because it depends on paddle/optimizer.
328-
add_subdirectory(paddle/legacy/optimizer)
329-
endif()
330-
331-
# "add_subdirectory(paddle)" and "add_subdirectory(python)" should be
332-
# placed after this block, because they depends on it.
333-
if(WITH_GOLANG)
334-
enable_language(Go)
335-
add_subdirectory(go)
336-
endif(WITH_GOLANG)
337-
338262
set(PADDLE_PYTHON_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/python/build")
339263

340264
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
@@ -352,9 +276,3 @@ add_subdirectory(paddle)
352276
if(WITH_PYTHON)
353277
add_subdirectory(python)
354278
endif()
355-
356-
if(WITH_DOC)
357-
find_package(Sphinx REQUIRED)
358-
find_python_module(recommonmark REQUIRED)
359-
add_subdirectory(doc)
360-
endif()

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ub
1111
# ENV variables
1212
ARG WITH_GPU
1313
ARG WITH_AVX
14-
ARG WITH_DOC
1514

1615
ENV WOBOQ OFF
1716
ENV WITH_GPU=${WITH_GPU:-ON}
1817
ENV WITH_AVX=${WITH_AVX:-ON}
19-
ENV WITH_DOC=${WITH_DOC:-OFF}
2018

2119
ENV HOME /root
2220
# Add bash enhancements

Dockerfile.android

Lines changed: 0 additions & 42 deletions
This file was deleted.

cmake/FindSphinx.cmake

Lines changed: 0 additions & 147 deletions
This file was deleted.

0 commit comments

Comments
 (0)