Skip to content

Commit cf87f39

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into remove_evaluator
2 parents f802940 + 457d012 commit cf87f39

File tree

118 files changed

+2665
-638
lines changed

Some content is hidden

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

118 files changed

+2665
-638
lines changed

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ cache:
44
- $HOME/.ccache
55
- $HOME/.cache/pip
66
- $TRAVIS_BUILD_DIR/build/third_party
7+
- $TRAVIS_BUILD_DIR/build_android/third_party
78
sudo: required
89
dist: trusty
10+
services:
11+
- docker
912
os:
1013
- linux
1114
env:
1215
- JOB=build_doc
1316
- JOB=check_style
17+
- JOB=build_android
1418
addons:
1519
apt:
1620
packages:
@@ -41,8 +45,10 @@ before_install:
4145
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
4246
script:
4347
- |
44-
timeout 2580 paddle/scripts/travis/${JOB}.sh # 43min timeout
45-
RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true ;else exit 1; fi;
48+
# 43min timeout
49+
if [[ "$JOB" == "build_android" ]]; then timeout 2580 docker run -it --rm -v "$TRAVIS_BUILD_DIR:/paddle" paddlepaddle/paddle:latest-dev-android;
50+
else timeout 2580 paddle/scripts/travis/${JOB}.sh; fi;
51+
RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else exit 1; fi;
4652
- |
4753
if [[ "$JOB" != "build_doc" ]]; then exit 0; fi;
4854
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi;

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
| Github account | name |
22
|---|---|
3+
| abhinavarora | Abhinav Arora |
34
| backyes | Yan-Fei Wang |
45
| beckett1124 | Bin Qi |
56
| JiayiFeng | Jia-Yi Feng |

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/proto")
166166
include_directories("${CMAKE_CURRENT_BINARY_DIR}/go/pserver/client/c")
167167

168168
set(EXTERNAL_LIBS
169-
${GFLAGS_LIBRARIES}
170-
${GLOG_LIBRARIES}
169+
gflags
170+
glog
171171
${CBLAS_LIBRARIES}
172-
${PROTOBUF_LIBRARY}
173-
${ZLIB_LIBRARIES}
172+
protobuf
173+
zlib
174174
${PYTHON_LIBRARIES}
175175
)
176176

benchmark/cluster/vgg16/vgg16_fluid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ def conv_block(input, num_filter, groups, dropouts):
106106
conv5 = conv_block(conv4, 512, 3, [0.4, 0.4, 0])
107107

108108
drop = fluid.layers.dropout(x=conv5, dropout_prob=0.5)
109-
fc1 = fluid.layers.fc(input=drop, size=512, act=None)
109+
fc1 = fluid.layers.fc(input=drop, size=4096, act=None)
110110
bn = fluid.layers.batch_norm(input=fc1, act='relu')
111111
drop2 = fluid.layers.dropout(x=bn, dropout_prob=0.5)
112-
fc2 = fluid.layers.fc(input=drop2, size=512, act=None)
112+
fc2 = fluid.layers.fc(input=drop2, size=4096, act=None)
113113
return fc2
114114

115115

cmake/configure.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ endif(NOT WITH_GOLANG)
5959

6060
if(NOT WITH_GPU)
6161
add_definitions(-DHPPL_STUB_FUNC)
62-
add_definitions("-DCUPTI_LIB_PATH=\"\"")
6362

6463
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu)
6564
else()
@@ -77,9 +76,7 @@ else()
7776
if(CUPTI_FOUND)
7877
include_directories(${CUPTI_INCLUDE_DIR})
7978
add_definitions(-DPADDLE_WITH_CUPTI)
80-
add_definitions("-DCUPTI_LIB_PATH=\"${CUPTI_LIBRARY_PATH}\"")
8179
else()
82-
add_definitions("-DCUPTI_LIB_PATH=\"\"")
8380
message(STATUS "Cannot find CUPTI, GPU Profiling is incorrect.")
8481
endif()
8582
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${SIMD_FLAG}")

cmake/external/zlib.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ENDIF(WIN32)
2828
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
2929

3030
ExternalProject_Add(
31-
zlib
31+
extern_zlib
3232
${EXTERNAL_PROJECT_LOG_ARGS}
3333
GIT_REPOSITORY "https://github.com/madler/zlib.git"
3434
GIT_TAG "v1.2.8"
@@ -49,9 +49,11 @@ ExternalProject_Add(
4949
-DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}
5050
)
5151

52+
ADD_LIBRARY(zlib STATIC IMPORTED GLOBAL)
53+
SET_PROPERTY(TARGET zlib PROPERTY IMPORTED_LOCATION ${ZLIB_LIBRARIES})
54+
ADD_DEPENDENCIES(zlib extern_zlib)
55+
5256
LIST(APPEND external_project_dependencies zlib)
53-
ADD_LIBRARY(zlib_target STATIC IMPORTED GLOBAL)
54-
SET_PROPERTY(TARGET zlib_target PROPERTY IMPORTED_LOCATION ${ZLIB_LIBRARIES})
5557

5658
IF(WITH_C_API)
5759
INSTALL(DIRECTORY ${ZLIB_INCLUDE_DIR} DESTINATION third_party/zlib)

cmake/generic.cmake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ function(merge_static_libs TARGET_NAME)
104104
foreach(lib ${libs})
105105
list(APPEND libs_deps ${${lib}_LIB_DEPENDS})
106106
endforeach()
107-
list(REMOVE_DUPLICATES libs_deps)
107+
if(libs_deps)
108+
list(REMOVE_DUPLICATES libs_deps)
109+
endif()
108110

109111
# To produce a library we need at least one source file.
110112
# It is created by add_custom_command below and will helps
@@ -191,10 +193,13 @@ function(cc_library TARGET_NAME)
191193
list(REMOVE_ITEM cc_library_DEPS warpctc)
192194
add_dependencies(${TARGET_NAME} warpctc)
193195
endif()
194-
# Support linking flags: --whole-archive (Linux) / -force_load (MacOS)
195-
target_circle_link_libraries(${TARGET_NAME} ${cc_library_DEPS})
196196
if("${cc_library_DEPS}" MATCHES "ARCHIVE_START")
197+
# Support linking flags: --whole-archive (Linux) / -force_load (MacOS).
198+
# WARNING: Please don't use ARCHIVE_START&ARCHIVE_END if TARGET_NAME will be linked by other libraries.
199+
target_circle_link_libraries(${TARGET_NAME} ${cc_library_DEPS})
197200
list(REMOVE_ITEM cc_library_DEPS ARCHIVE_START ARCHIVE_END)
201+
else()
202+
target_link_libraries(${TARGET_NAME} ${cc_library_DEPS})
198203
endif()
199204
add_dependencies(${TARGET_NAME} ${cc_library_DEPS})
200205
endif()

cmake/inference_lib.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ copy(inference_lib DEPENDS paddle_fluid_shared
7272
)
7373

7474
set(module "platform")
75-
copy(platform_lib
75+
copy(platform_lib DEPS profiler_py_proto
7676
SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/dynload/*.h ${src_dir}/${module}/details/*.h
7777
DSTS ${dst_dir}/${module} ${dst_dir}/${module}/dynload ${dst_dir}/${module}/details
7878
)

doc/api/overview.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ it proposes some high-level concepts such as `Layers <http://www.paddlepaddle.or
77
A model is composed of the computation described by a group of `Layers`, with `Evaluator` to define the error, `Optimizer` to update the parameters and `Data Reader` to feed in the data.
88

99
We also provide the `interface for Training and Inference <http://www.paddlepaddle.org/docs/develop/api/en/v2/run_logic.html>`_ to help control the training and inference phrase,
10-
it has several easy to use methods
10+
it has several easy to use methods to better expose the internal running details, different `events <http://www.paddlepaddle.org/docs/develop/api/en/v2/run_logic.html#event>`_ are available to users by writing some callbacks.
1111

12-
- `paddle.train`
13-
- `paddle.test`
14-
- `paddle.infer`
15-
16-
to better expose the internal running details, different `events <http://www.paddlepaddle.org/docs/develop/api/en/v2/run_logic.html#event>`_ are available to users by writing some callbacks.
12+
All in all, the V2 API gives a higher abstraction and make PaddlePaddle programs require fiew lines of code.

doc/build_and_install/build_from_source_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
为了编译PaddlePaddle,我们需要
1010

1111
1. 一台电脑,可以装的是 Linux, Windows 或者 MacOS 操作系统
12-
1. Docker
12+
2. Docker
1313

1414
不需要依赖其他任何软件了。即便是 Python 和 GCC 都不需要,因为我们会把所有编译工具都安装进一个 Docker 镜像里。
1515

0 commit comments

Comments
 (0)