@@ -33,9 +33,7 @@ if(WIN32)
33
33
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /bigobj /MT" )
34
34
endif (WIN32 )
35
35
36
- if (NOT CMAKE_CROSSCOMPILING )
37
- find_package (CUDA QUIET )
38
- endif (NOT CMAKE_CROSSCOMPILING )
36
+ find_package (CUDA QUIET )
39
37
find_package (Git REQUIRED )
40
38
find_package (Threads REQUIRED )
41
39
@@ -49,7 +47,6 @@ option(WITH_MKL "Compile PaddlePaddle with MKL support." ${AVX_FO
49
47
option (WITH_NGRAPH "Compile PaddlePaddle with nGraph support." OFF )
50
48
option (WITH_DSO "Compile PaddlePaddle with dynamic linked CUDA" ON )
51
49
option (WITH_TESTING "Compile PaddlePaddle with unit testing" OFF )
52
- option (WITH_SWIG_PY "Compile PaddlePaddle with inference api" ON )
53
50
option (WITH_PYTHON "Compile PaddlePaddle with python interpreter" ON )
54
51
option (WITH_DOUBLE "Compile PaddlePaddle with double precision" OFF )
55
52
option (WITH_RDMA "Compile PaddlePaddle with RDMA support" OFF )
@@ -60,11 +57,9 @@ option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
60
57
option (WITH_COVERAGE "Compile PaddlePaddle with code coverage" OFF )
61
58
option (COVERALLS_UPLOAD "Package code coverage data to coveralls" OFF )
62
59
option (ON_TRAVIS "Exclude special unit test on Travis CI" OFF )
63
- option (WITH_C_API "Compile PaddlePaddle with C-API(Prediction)" OFF )
64
60
option (WITH_FLUID_ONLY "Compile PaddlePaddle fluid only" OFF )
65
61
option (WITH_GOLANG "Compile PaddlePaddle with GOLANG" OFF )
66
62
option (GLIDE_INSTALL "Download and install go dependencies " ON )
67
- option (USE_NNPACK "Compile PaddlePaddle with NNPACK library" OFF )
68
63
option (WITH_DISTRIBUTE "Compile with distributed support" OFF )
69
64
option (WITH_PSLIB "Compile with pslib support" OFF )
70
65
option (USE_EIGEN_FOR_BLAS "Use matrix multiplication in Eigen" OFF )
@@ -96,37 +91,6 @@ if(NOT CMAKE_BUILD_TYPE)
96
91
FORCE )
97
92
endif ()
98
93
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
-
130
94
if (APPLE )
131
95
set (WITH_MKL OFF CACHE STRING
132
96
"Disable MKL for building on mac" FORCE )
@@ -135,8 +99,6 @@ endif()
135
99
if (WIN32 )
136
100
set (WITH_DISTRIBUTE OFF CACHE STRING
137
101
"Disable DISTRIBUTE when compiling for Windows" FORCE )
138
- set (WITH_C_API OFF CACHE STRING
139
- "Disable C_API when compiling for Windows" FORCE )
140
102
set (WITH_FLUID_ONLY ON CACHE STRING
141
103
"Enable FLUID_ONLY when compiling for Windows" FORCE )
142
104
endif ()
@@ -150,21 +112,7 @@ set(FLUID_INSTALL_DIR "${CMAKE_BINARY_DIR}/fluid_install_dir" CACHE STRING
150
112
set (FLUID_INFERENCE_INSTALL_DIR "${CMAKE_BINARY_DIR} /fluid_inference_install_dir" CACHE STRING
151
113
"A path setting fluid inference shared and static libraries" )
152
114
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 )
168
116
169
117
set (WITH_MKLML ${WITH_MKL} )
170
118
if (NOT DEFINED WITH_MKLDNN )
@@ -193,7 +141,6 @@ include(external/python) # download, build, install python
193
141
include (external/openblas ) # download, build, install openblas
194
142
include (external/mkldnn ) # download, build, install mkldnn
195
143
include (external/ngraph ) # download, build, install nGraph
196
- include (external/swig ) # download, build, install swig
197
144
include (external/boost ) # download boost
198
145
include (external/any ) # download libn::any
199
146
include (external/eigen ) # download eigen3
@@ -312,11 +259,6 @@ if(WITH_MKLDNN)
312
259
list (APPEND EXTERNAL_LIBS ${MKLDNN_LIB} )
313
260
endif ()
314
261
315
- if (USE_NNPACK )
316
- include (external/nnpack )
317
- list (APPEND EXTERNAL_LIBS ${NNPACK_LIBS} )
318
- endif (USE_NNPACK )
319
-
320
262
set (PADDLE_PYTHON_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR} /python/build" )
321
263
322
264
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG" )
0 commit comments