Skip to content

Commit 79d4a99

Browse files
committed
Merge branch 'develop' into anakin_v4
2 parents e89936f + 1f09bc3 commit 79d4a99

Some content is hidden

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

75 files changed

+2126
-351
lines changed

CMakeLists.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ message(STATUS "CXX compiler: ${CMAKE_CXX_COMPILER}, version: "
2424
"${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
2525
message(STATUS "C compiler: ${CMAKE_C_COMPILER}, version: "
2626
"${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
27+
if(WIN32)
28+
set(CMAKE_STATIC_LIBRARY_PREFIX lib)
29+
endif(WIN32)
2730

2831
if(NOT CMAKE_CROSSCOMPILING)
2932
find_package(CUDA QUIET)
@@ -165,14 +168,21 @@ include(external/python) # download, build, install python
165168
include(external/openblas) # download, build, install openblas
166169
include(external/mkldnn) # download, build, install mkldnn
167170
include(external/swig) # download, build, install swig
168-
include(external/warpctc) # download, build, install warpctc
169171
include(external/boost) # download boost
170172
include(external/any) # download libn::any
171173
include(external/eigen) # download eigen3
172174
include(external/pybind11) # download pybind11
173175
include(external/cares)
174176
include(external/cub)
175177

178+
if (NOT WIN32)
179+
# there is no official support of snappystream, warpctc, nccl, cupti in windows
180+
include(external/snappy) # download snappy
181+
include(external/snappystream) # download snappystream
182+
include(external/warpctc) # download, build, install warpctc
183+
include(cupti)
184+
endif (NOT WIN32)
185+
176186
if(WITH_DISTRIBUTE)
177187
if(WITH_GRPC)
178188
include(external/grpc)
@@ -194,13 +204,10 @@ if(WITH_BRPC_RDMA)
194204
endif()
195205
endif()
196206

197-
include(external/snappy) # download snappy
198-
include(external/snappystream)
199-
include(external/threadpool)
200207

208+
include(external/threadpool)
201209
include(flags) # set paddle compile flags
202210
include(cudnn) # set cudnn libraries, must before configure
203-
include(cupti)
204211
include(configure) # add paddle env configuration
205212

206213
if(WITH_GPU)

cmake/configure.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ if(NOT CMAKE_CROSSCOMPILING)
6161
endif()
6262
endif()
6363

64+
if(WIN32)
65+
# windows stupid compile option for all targets.
66+
add_definitions(-D_XKEYCHECK_H)
67+
endif(WIN32)
68+
6469
if(NOT WITH_GOLANG)
6570
add_definitions(-DPADDLE_WITHOUT_GOLANG)
6671
endif(NOT WITH_GOLANG)

cmake/external/boost.cmake

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,36 @@ if((NOT DEFINED BOOST_TAR) OR (NOT DEFINED BOOST_URL))
2828
set(BOOST_TAR "boost_1_41_0" CACHE STRING "" FORCE)
2929
set(BOOST_URL "http://paddlepaddledeps.cdn.bcebos.com/${BOOST_TAR}.tar.gz" CACHE STRING "" FORCE)
3030
endif()
31-
MESSAGE(STATUS "BOOST_TAR: ${BOOST_TAR}, BOOST_URL: ${BOOST_URL}")
31+
IF (WIN32)
32+
MESSAGE(WARNING, "In windows, boost can not be downloaded automaticlly, please build it manually and put it at " ${THIRD_PARTY_PATH}install/boost)
33+
else()
34+
MESSAGE(STATUS "BOOST_TAR: ${BOOST_TAR}, BOOST_URL: ${BOOST_URL}")
35+
ENDIF(WIN32)
36+
3237
set(BOOST_SOURCES_DIR ${THIRD_PARTY_PATH}/boost)
3338
set(BOOST_DOWNLOAD_DIR "${BOOST_SOURCES_DIR}/src/${BOOST_PROJECT}")
3439
set(BOOST_INCLUDE_DIR "${BOOST_DOWNLOAD_DIR}/${BOOST_TAR}" CACHE PATH "boost include directory." FORCE)
3540
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1)
3641

3742
include_directories(${BOOST_INCLUDE_DIR})
3843

44+
if (NOT WIN32)
3945
ExternalProject_Add(
4046
${BOOST_PROJECT}
4147
${EXTERNAL_PROJECT_LOG_ARGS}
4248
DOWNLOAD_DIR ${BOOST_DOWNLOAD_DIR}
4349
DOWNLOAD_COMMAND wget --no-check-certificate ${BOOST_URL} -c -q -O ${BOOST_TAR}.tar.gz
44-
&& tar zxf ${BOOST_TAR}.tar.gz
50+
&& tar zxf ${BOOST_TAR}.tar.gz
4551
DOWNLOAD_NO_PROGRESS 1
4652
PREFIX ${BOOST_SOURCES_DIR}
4753
CONFIGURE_COMMAND ""
4854
BUILD_COMMAND ""
4955
INSTALL_COMMAND ""
5056
UPDATE_COMMAND ""
5157
)
58+
endif(NOT WIN32)
5259

53-
if (${CMAKE_VERSION} VERSION_LESS "3.3.0")
60+
if (${CMAKE_VERSION} VERSION_LESS "3.3.0" OR NOT WIN32)
5461
set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/boost_dummy.c)
5562
file(WRITE ${dummyfile} "const char *dummy = \"${dummyfile}\";")
5663
add_library(boost STATIC ${dummyfile})

cmake/external/gflags.cmake

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SET(GFLAGS_SOURCES_DIR ${THIRD_PARTY_PATH}/gflags)
1818
SET(GFLAGS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/gflags)
1919
SET(GFLAGS_INCLUDE_DIR "${GFLAGS_INSTALL_DIR}/include" CACHE PATH "gflags include directory." FORCE)
2020
IF(WIN32)
21-
set(GFLAGS_LIBRARIES "${GFLAGS_INSTALL_DIR}/lib/gflags.lib" CACHE FILEPATH "GFLAGS_LIBRARIES" FORCE)
21+
set(GFLAGS_LIBRARIES "${GFLAGS_INSTALL_DIR}/lib/libgflags.lib" CACHE FILEPATH "GFLAGS_LIBRARIES" FORCE)
2222
ELSE(WIN32)
2323
set(GFLAGS_LIBRARIES "${GFLAGS_INSTALL_DIR}/lib/libgflags.a" CACHE FILEPATH "GFLAGS_LIBRARIES" FORCE)
2424
ENDIF(WIN32)
@@ -45,7 +45,13 @@ ExternalProject_Add(
4545
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
4646
-DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}
4747
)
48-
48+
IF(WIN32)
49+
IF(NOT EXISTS "${GFLAGS_INSTALL_DIR}/lib/libgflags.lib")
50+
add_custom_command(TARGET extern_gflags POST_BUILD
51+
COMMAND cmake -E rename ${GFLAGS_INSTALL_DIR}/lib/gflags_static.lib ${GFLAGS_INSTALL_DIR}/lib/libgflags.lib
52+
)
53+
ENDIF()
54+
ENDIF(WIN32)
4955
ADD_LIBRARY(gflags STATIC IMPORTED GLOBAL)
5056
SET_PROPERTY(TARGET gflags PROPERTY IMPORTED_LOCATION ${GFLAGS_LIBRARIES})
5157
ADD_DEPENDENCIES(gflags extern_gflags)
@@ -60,3 +66,4 @@ IF(WITH_C_API)
6066
INSTALL(FILES ${GFLAGS_LIBRARIES} DESTINATION third_party/gflags/lib)
6167
ENDIF()
6268
ENDIF()
69+

cmake/external/glog.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ ExternalProject_Add(
6060
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
6161
-DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}
6262
)
63+
IF(WIN32)
64+
IF(NOT EXISTS "${GLOG_INSTALL_DIR}/lib/libglog.lib")
65+
add_custom_command(TARGET extern_glog POST_BUILD
66+
COMMAND cmake -E rename ${GLOG_INSTALL_DIR}/lib/glog.lib ${GLOG_INSTALL_DIR}/lib/libglog.lib
67+
)
68+
ENDIF()
69+
ENDIF(WIN32)
6370

6471
ADD_LIBRARY(glog STATIC IMPORTED GLOBAL)
6572
SET_PROPERTY(TARGET glog PROPERTY IMPORTED_LOCATION ${GLOG_LIBRARIES})

cmake/external/openblas.cmake

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,29 @@ IF(USE_EIGEN_FOR_BLAS)
1717
ENDIF(USE_EIGEN_FOR_BLAS)
1818

1919
INCLUDE(cblas)
20+
# IF(WIN32 AND NOT ${CBLAS_FOUND})
21+
22+
2023

2124
IF(NOT ${CBLAS_FOUND})
25+
2226
INCLUDE(ExternalProject)
2327

2428
SET(CBLAS_SOURCES_DIR ${THIRD_PARTY_PATH}/openblas)
2529
SET(CBLAS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/openblas)
26-
SET(CBLAS_INC_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)
30+
SET(CBLAS_INCLUDE_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)
2731

2832
SET(CBLAS_LIBRARIES
2933
"${CBLAS_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}openblas${CMAKE_STATIC_LIBRARY_SUFFIX}"
3034
CACHE FILEPATH "openblas library." FORCE)
3135

3236
ADD_DEFINITIONS(-DPADDLE_USE_OPENBLAS)
37+
IF (WIN32)
38+
SET(CBLAS_FOUND true)
39+
MESSAGE(WARNING, "In windows, openblas only support msvc build, please build it manually and put it at " ${CBLAS_INSTALL_DIR})
40+
ENDIF(WIN32)
3341

42+
IF (NOT WIN32)
3443
SET(OPENBLAS_CC "${CMAKE_C_COMPILER} -Wno-unused-but-set-variable -Wno-unused-variable")
3544
SET(OPENBLAS_COMMIT "v0.2.20")
3645

@@ -69,7 +78,6 @@ IF(NOT ${CBLAS_FOUND})
6978
ENDIF()
7079

7180
SET(COMMON_ARGS CC=${OPENBLAS_CC} NO_SHARED=1 NO_LAPACK=1 libs)
72-
7381
ExternalProject_Add(
7482
extern_openblas
7583
${EXTERNAL_PROJECT_LOG_ARGS}
@@ -84,9 +92,11 @@ IF(NOT ${CBLAS_FOUND})
8492
UPDATE_COMMAND ""
8593
CONFIGURE_COMMAND ""
8694
)
95+
ELSE()
96+
ENDIF(NOT WIN32)
8797
SET(CBLAS_PROVIDER openblas)
8898
IF(WITH_C_API)
89-
INSTALL(DIRECTORY ${CBLAS_INC_DIR} DESTINATION third_party/openblas)
99+
INSTALL(DIRECTORY ${CBLAS_INCLUDE_DIR} DESTINATION third_party/openblas)
90100
# Because libopenblas.a is a symbolic link of another library, thus need to
91101
# install the whole directory.
92102
IF(ANDROID)
@@ -107,7 +117,8 @@ IF(NOT ${CBLAS_FOUND})
107117
ENDIF(NOT ${CBLAS_FOUND})
108118

109119
MESSAGE(STATUS "BLAS library: ${CBLAS_LIBRARIES}")
110-
INCLUDE_DIRECTORIES(${CBLAS_INC_DIR})
120+
MESSAGE(STATUS "BLAS Include: ${CBLAS_INCLUDE_DIR}")
121+
INCLUDE_DIRECTORIES(${CBLAS_INCLUDE_DIR})
111122

112123
# FIXME(gangliao): generate cblas target to track all high performance
113124
# linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas)

cmake/external/protobuf.cmake

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414

1515
INCLUDE(ExternalProject)
1616
# Always invoke `FIND_PACKAGE(Protobuf)` for importing function protobuf_generate_cpp
17+
IF(NOT WIN32)
1718
FIND_PACKAGE(Protobuf QUIET)
19+
ENDIF(NOT WIN32)
1820
macro(UNSET_VAR VAR_NAME)
1921
UNSET(${VAR_NAME} CACHE)
2022
UNSET(${VAR_NAME})
2123
endmacro()
24+
2225
UNSET_VAR(PROTOBUF_INCLUDE_DIR)
2326
UNSET_VAR(PROTOBUF_FOUND)
2427
UNSET_VAR(PROTOBUF_PROTOC_EXECUTABLE)
@@ -94,12 +97,14 @@ macro(PROMPT_PROTOBUF_LIB)
9497
SET(protobuf_DEPS ${ARGN})
9598

9699
MESSAGE(STATUS "Protobuf protoc executable: ${PROTOBUF_PROTOC_EXECUTABLE}")
100+
MESSAGE(STATUS "Protobuf-lite library: ${PROTOBUF_LITE_LIBRARY}")
97101
MESSAGE(STATUS "Protobuf library: ${PROTOBUF_LIBRARY}")
102+
MESSAGE(STATUS "Protoc library: ${PROTOBUF_PROTOC_LIBRARY}")
98103
MESSAGE(STATUS "Protobuf version: ${PROTOBUF_VERSION}")
99104
INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR})
100105

101106
# Assuming that all the protobuf libraries are of the same type.
102-
IF(${PROTOBUF_LIBRARY} MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$")
107+
IF(${PROTOBUF_LIBRARY} MATCHES ${CMAKE_STATIC_LIBRARY_SUFFIX})
103108
SET(protobuf_LIBTYPE STATIC)
104109
ELSEIF(${PROTOBUF_LIBRARY} MATCHES "${CMAKE_SHARED_LIBRARY_SUFFIX}$")
105110
SET(protobuf_LIBTYPE SHARED)
@@ -137,18 +142,25 @@ macro(SET_PROTOBUF_VERSION)
137142
endmacro()
138143

139144
set(PROTOBUF_ROOT "" CACHE PATH "Folder contains protobuf")
145+
IF (WIN32)
146+
SET(PROTOBUF_ROOT ${THIRD_PARTY_PATH}/install/protobuf)
147+
MESSAGE(WARNING, "In windows, protobuf only support msvc build, please build it manually and put it at " ${PROTOBUF_ROOT})
148+
ENDIF(WIN32)
149+
140150
if (NOT "${PROTOBUF_ROOT}" STREQUAL "")
151+
141152
find_path(PROTOBUF_INCLUDE_DIR google/protobuf/message.h PATHS ${PROTOBUF_ROOT}/include NO_DEFAULT_PATH)
142-
find_library(PROTOBUF_LIBRARY protobuf PATHS ${PROTOBUF_ROOT}/lib NO_DEFAULT_PATH)
143-
find_library(PROTOBUF_LITE_LIBRARY protobuf-lite PATHS ${PROTOBUF_ROOT}/lib NO_DEFAULT_PATH)
144-
find_library(PROTOBUF_PROTOC_LIBRARY protoc PATHS ${PROTOBUF_ROOT}/lib NO_DEFAULT_PATH)
153+
find_library(PROTOBUF_LIBRARY protobuf libprotobuf.lib PATHS ${PROTOBUF_ROOT}/lib NO_DEFAULT_PATH)
154+
find_library(PROTOBUF_LITE_LIBRARY protobuf-lite libprotobuf-lite.lib PATHS ${PROTOBUF_ROOT}/lib NO_DEFAULT_PATH)
155+
find_library(PROTOBUF_PROTOC_LIBRARY protoc libprotoc.lib PATHS ${PROTOBUF_ROOT}/lib NO_DEFAULT_PATH)
145156
find_program(PROTOBUF_PROTOC_EXECUTABLE protoc PATHS ${PROTOBUF_ROOT}/bin NO_DEFAULT_PATH)
146157
if (PROTOBUF_INCLUDE_DIR AND PROTOBUF_LIBRARY AND PROTOBUF_LITE_LIBRARY AND PROTOBUF_PROTOC_LIBRARY AND PROTOBUF_PROTOC_EXECUTABLE)
147158
message(STATUS "Using custom protobuf library in ${PROTOBUF_ROOT}.")
159+
SET(PROTOBUF_FOUND true)
148160
SET_PROTOBUF_VERSION()
149161
PROMPT_PROTOBUF_LIB()
150162
else()
151-
message(WARNING "Cannot find protobuf library in ${PROTOBUF_ROOT}.")
163+
message(WARNING "Cannot find protobuf library in ${PROTOBUF_ROOT}")
152164
endif()
153165
endif()
154166

@@ -239,6 +251,7 @@ IF(CMAKE_CROSSCOMPILING)
239251
CACHE FILEPATH "protobuf executable." FORCE)
240252
ENDIF()
241253

254+
242255
IF(NOT PROTOBUF_FOUND)
243256
build_protobuf(extern_protobuf FALSE)
244257

cmake/generic.cmake

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ function(merge_static_libs TARGET_NAME)
148148
COMMAND rm "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a"
149149
COMMAND /usr/bin/libtool -static -o "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a" ${libfiles}
150150
)
151-
else() # general UNIX: use "ar" to extract objects and re-add to a common lib
151+
endif(APPLE)
152+
if(LINUX) # general UNIX: use "ar" to extract objects and re-add to a common lib
152153
set(target_DIR ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}.dir)
153154

154155
foreach(lib ${libs})
@@ -187,14 +188,47 @@ function(merge_static_libs TARGET_NAME)
187188
COMMAND ${CMAKE_AR} crs ${target_LIBNAME} `find ${target_DIR} -name '*.o'`
188189
COMMAND ${CMAKE_RANLIB} ${target_LIBNAME}
189190
WORKING_DIRECTORY ${target_DIR})
190-
endif()
191+
endif(LINUX)
192+
if(WIN32) # windows do not support gcc/nvcc combined compiling. Use msvc lib.exe to merge libs.
193+
# Make the generated dummy source file depended on all static input
194+
# libs. If input lib changes,the source file is touched
195+
# which causes the desired effect (relink).
196+
add_custom_command(OUTPUT ${target_SRCS}
197+
COMMAND ${CMAKE_COMMAND} -E touch ${target_SRCS}
198+
DEPENDS ${libs})
199+
200+
# Generate dummy staic lib
201+
file(WRITE ${target_SRCS} "const char *dummy_${TARGET_NAME} = \"${target_SRCS}\";")
202+
add_library(${TARGET_NAME} STATIC ${target_SRCS})
203+
target_link_libraries(${TARGET_NAME} ${libs_deps})
204+
205+
foreach(lib ${libs})
206+
# Get the file names of the libraries to be merged
207+
#if(NOT $<TARGET_FILE:${lib}> MATCHES "lib.*\\.lib")
208+
# message("library" ${lib})
209+
# set(libfiles ${libfiles} lib$<TARGET_FILE:${lib}>)
210+
#else()
211+
set(libfiles ${libfiles} $<TARGET_FILE:${lib}>)
212+
#endif()
213+
endforeach()
214+
215+
# windows cmd return error in clean env.
216+
# COMMAND del "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${TARGET_NAME}.lib"
217+
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
218+
COMMAND lib /OUT:${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.lib ${libfiles}
219+
)
220+
endif(WIN32)
191221
endfunction(merge_static_libs)
192222

193223
function(cc_library TARGET_NAME)
194224
set(options STATIC static SHARED shared)
195225
set(oneValueArgs "")
196226
set(multiValueArgs SRCS DEPS)
197227
cmake_parse_arguments(cc_library "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
228+
if(WIN32)
229+
# add libxxx.lib prefix in windows
230+
set(${TARGET_NAME}_LIB_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}${TARGET_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE STRING "output library name for target ${TARGET_NAME}")
231+
endif(WIN32)
198232
if(cc_library_SRCS)
199233
if(cc_library_SHARED OR cc_library_shared) # build *.so
200234
add_library(${TARGET_NAME} SHARED ${cc_library_SRCS})

cmake/inference_lib.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ if(WITH_MKLDNN)
101101
)
102102
endif()
103103

104+
if (NOT WIN32)
104105
if(NOT MOBILE_INFERENCE AND NOT RPI)
105106
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/snappy")
106107
copy(snappy_lib
@@ -120,15 +121,23 @@ if(NOT MOBILE_INFERENCE AND NOT RPI)
120121
DSTS ${dst_dir} ${dst_dir}/lib
121122
DEPS zlib)
122123
endif()
124+
endif(NOT WIN32)
123125

124126
# paddle fluid module
125127
set(src_dir "${PADDLE_SOURCE_DIR}/paddle/fluid")
126128
set(dst_dir "${FLUID_INSTALL_DIR}/paddle/fluid")
127129
set(module "framework")
130+
if (NOT WIN32)
128131
copy(framework_lib DEPS framework_py_proto
129132
SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/details/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/framework.pb.h
130133
DSTS ${dst_dir}/${module} ${dst_dir}/${module}/details ${dst_dir}/${module}
131134
)
135+
else()
136+
copy(framework_lib
137+
SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/details/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/framework.pb.h
138+
DSTS ${dst_dir}/${module} ${dst_dir}/${module}/details ${dst_dir}/${module}
139+
)
140+
endif(NOT WIN32)
132141

133142
set(module "memory")
134143
copy(memory_lib

doc/fluid/new_docs/advanced_usage/deploy/native_infer.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Paddle 预测 API
99

1010
- 头文件 ``paddle_inference_api.h`` 定义了所有的接口
1111
- 库文件\ ``libpaddle_fluid.so`` 或 ``libpaddle_fluid.a``
12-
- 库文件 ``libpaddle_inference_api.so`` 或
13-
``libpaddle_inference_api.a``
1412

1513
编译和依赖可以参考 :ref:`install_or_build_cpp_inference_lib` 。
1614

@@ -97,8 +95,7 @@ engine
9795
CHECK(predictor->Run(slots, &outputs));
9896
// 获取 outputs ...
9997
100-
编译时,联编 ``libpaddle_fluid.a/.so`` 和
101-
``libpaddle_inference_api.a/.so`` 便可。
98+
编译时,联编 ``libpaddle_fluid.a/.so`` 即可。
10299

103100
详细代码参考
104101
------------

0 commit comments

Comments
 (0)