Skip to content

Commit 7116cc1

Browse files
committed
Merge develop
2 parents abf9832 + 3fbfcd9 commit 7116cc1

File tree

1,207 files changed

+67312
-12519
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,207 files changed

+67312
-12519
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ python/paddle/v2/fluid/tests/book/image_classification_resnet.inference.model/
55
python/paddle/v2/fluid/tests/book/image_classification_vgg.inference.model/
66
python/paddle/v2/fluid/tests/book/label_semantic_roles.inference.model/
77
*.DS_Store
8+
*.vs
89
build/
910
build_doc/
1011
*.user
@@ -15,6 +16,7 @@ build_doc/
1516
.cproject
1617
.pydevproject
1718
.settings/
19+
CMakeSettings.json
1820
Makefile
1921
.test_env/
2022
third_party/

.travis.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ script:
2727
# 43min timeout
2828
paddle/scripts/paddle_docker_build.sh ${JOB}
2929
if [ $? -eq 0 ] || [ $? -eq 142 ]; then true; else exit 1; fi;
30-
- |
31-
if [[ "$JOB" != "doc" ]]; then exit 0; fi;
32-
# For document only
33-
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi;
34-
if [[ "$TRAVIS_BRANCH" != "develop" && ! "$TRAVIS_BRANCH" =~ ^v[[:digit:]]+\.[[:digit:]]+(\.[[:digit:]]+)?(-\S*)?$ ]]; then exit 0; fi;
35-
export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
36-
export DOCS_DIR=`pwd`
37-
cd ..
38-
curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $DOCS_DIR $DOCS_DIR/build/doc/
3930
notifications:
4031
email:
4132
on_success: change

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
| tianbingsz | Tian-Bing Xu |
4747
| tpatejko | Tomasz Patejko |
4848
| typhoonzero | Yi Wu |
49+
| velconia | Qi-Yang Min |
4950
| wanghaoshuang | Hao-Shuang Wang |
5051
| wangyang59 | Yang Wang |
5152
| wangzhen-nlp | Zhen Wang |

CMakeLists.txt

Lines changed: 44 additions & 18 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)
@@ -65,7 +68,15 @@ option(REPLACE_ENFORCE_GLOG "Replace PADDLE_ENFORCE with glog/CHECK for better d
6568
option(WITH_ANAKIN "Compile with Anakin library" OFF)
6669
option(WITH_GRPC "Use grpc as the default rpc framework" ${WITH_DISTRIBUTE})
6770
option(WITH_BRPC_RDMA "Use brpc rdma as the rpc protocal" OFF)
71+
option(WITH_INFERENCE "Compile fluid inference library" ON)
6872
option(WITH_SYSTEM_BLAS "Use system blas library" OFF)
73+
option(PY_VERSION "Compile PaddlePaddle with python3 support" ${PY_VERSION})
74+
75+
# PY_VERSION
76+
if(NOT PY_VERSION)
77+
set(PY_VERSION 2.7)
78+
endif()
79+
set(PYBIND11_PYTHON_VERSION ${PY_VERSION})
6980

7081
# CMAKE_BUILD_TYPE
7182
if(NOT CMAKE_BUILD_TYPE)
@@ -103,6 +114,11 @@ if(ANDROID OR IOS)
103114
add_definitions(-DPADDLE_MOBILE_INFERENCE)
104115
endif()
105116

117+
if (APPLE OR WIN32)
118+
set(WITH_MKL OFF CACHE STRING
119+
"Disable MKL for building on mac and windows" FORCE)
120+
endif()
121+
106122
set(THIRD_PARTY_PATH "${CMAKE_BINARY_DIR}/third_party" CACHE STRING
107123
"A path setting third party libraries download & build directories.")
108124

@@ -141,6 +157,8 @@ endif()
141157
########################################################################################
142158

143159
include(external/mklml) # download mklml package
160+
include(external/xbyak) # download xbyak package
161+
include(external/libxsmm) # download, build, install libxsmm
144162
include(external/zlib) # download, build, install zlib
145163
include(external/gflags) # download, build, install gflags
146164
include(external/glog) # download, build, install glog
@@ -150,12 +168,20 @@ include(external/python) # download, build, install python
150168
include(external/openblas) # download, build, install openblas
151169
include(external/mkldnn) # download, build, install mkldnn
152170
include(external/swig) # download, build, install swig
153-
include(external/warpctc) # download, build, install warpctc
154171
include(external/boost) # download boost
155172
include(external/any) # download libn::any
156173
include(external/eigen) # download eigen3
157174
include(external/pybind11) # download pybind11
158175
include(external/cares)
176+
include(external/cub)
177+
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)
159185

160186
if(WITH_DISTRIBUTE)
161187
if(WITH_GRPC)
@@ -178,19 +204,27 @@ if(WITH_BRPC_RDMA)
178204
endif()
179205
endif()
180206

181-
include(external/snappy) # download snappy
182-
include(external/snappystream)
183-
include(external/threadpool)
184207

208+
include(external/threadpool)
209+
include(flags) # set paddle compile flags
185210
include(cudnn) # set cudnn libraries, must before configure
186-
include(cupti)
187211
include(configure) # add paddle env configuration
212+
213+
if(WITH_GPU)
214+
include(cuda)
215+
include(tensorrt)
216+
endif()
217+
if(WITH_MKL OR WITH_MKLML)
218+
include(external/anakin)
219+
elseif()
220+
set(WITH_ANAKIN OFF CACHE STRING "Anakin is used in MKL only now." FORCE)
221+
endif()
222+
188223
include(generic) # simplify cmake module
189224
include(package) # set paddle packages
190225
include(ccache) # set ccache for compilation
191226
include(util) # set unittest and link libs
192227
include(rdma) # set rdma libraries
193-
include(flags) # set paddle compile flags
194228
include(version) # set PADDLE_VERSION
195229
include(coveralls) # set code coverage
196230
include(inference_lib) # add paddle fluid inference libraries
@@ -210,14 +244,6 @@ set(EXTERNAL_LIBS
210244
${PYTHON_LIBRARIES}
211245
)
212246

213-
if(WITH_GPU)
214-
include(cuda)
215-
include(tensorrt)
216-
include(external/anakin)
217-
else()
218-
set(WITH_ANAKIN OFF CACHE STRING "Anakin is valid only when GPU is set." FORCE)
219-
endif()
220-
221247
if(WITH_AMD_GPU)
222248
find_package(HIP)
223249
include(hip)
@@ -227,6 +253,10 @@ if(WITH_MKLML)
227253
list(APPEND EXTERNAL_LIBS ${MKLML_IOMP_LIB})
228254
endif()
229255

256+
if(WITH_LIBXSMM)
257+
list(APPEND EXTERNAL_LIBS ${LIBXSMM_LIBS})
258+
endif()
259+
230260
if(WITH_MKLDNN)
231261
list(APPEND EXTERNAL_LIBS ${MKLDNN_LIB})
232262
endif()
@@ -266,7 +296,3 @@ if(WITH_DOC)
266296
find_python_module(recommonmark REQUIRED)
267297
add_subdirectory(doc)
268298
endif()
269-
270-
if (WITH_CONTRIB)
271-
add_subdirectory(paddle/contrib)
272-
endif()

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ RUN curl -s -q https://glide.sh/get | sh
5353
# and its size is only one-third of the official one.
5454
# 2. Manually add ~IPluginFactory() in IPluginFactory class of NvInfer.h, otherwise, it couldn't work in paddle.
5555
# See https://github.com/PaddlePaddle/Paddle/issues/10129 for details.
56-
RUN wget -qO- http://paddlepaddledeps.bj.bcebos.com/TensorRT-4.0.0.3.Ubuntu-16.04.4.x86_64-gnu.cuda-8.0.cudnn7.0.tar.gz | \
56+
RUN wget -qO- http://paddlepaddledeps.cdn.bcebos.com/TensorRT-4.0.0.3.Ubuntu-16.04.4.x86_64-gnu.cuda-8.0.cudnn7.0.tar.gz | \
5757
tar -xz -C /usr/local && \
5858
cp -rf /usr/local/TensorRT/include /usr && \
5959
cp -rf /usr/local/TensorRT/lib /usr
@@ -80,7 +80,7 @@ RUN pip install pre-commit 'ipython==5.3.0' && \
8080
pip install opencv-python
8181

8282
#For docstring checker
83-
RUN pip install pylint pytest astroid isort
83+
RUN pip install pylint pytest astroid isort LinkChecker
8484

8585
COPY ./python/requirements.txt /root/
8686
RUN pip install -r /root/requirements.txt

README.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@ learning to many products at Baidu.
1818
Our vision is to enable deep learning for everyone via PaddlePaddle.
1919
Please refer to our [release announcement](https://github.com/PaddlePaddle/Paddle/releases) to track the latest feature of PaddlePaddle.
2020

21-
### Lastest PaddlePaddle Version: [Fluid](https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/fluid)
21+
22+
### Latest PaddlePaddle Release: [Fluid 0.15.0](https://github.com/PaddlePaddle/Paddle/tree/v0.15.0)
23+
### Install Latest Stable Release:
24+
```
25+
# Linux CPU
26+
pip install paddlepaddle
27+
# Linux GPU cuda9cudnn7
28+
pip install paddlepaddle-gpu
29+
# Linux GPU cuda8cudnn7
30+
pip install paddlepaddle-gpu==0.14.0.post87
31+
# Linux GPU cuda8cudnn5
32+
pip install paddlepaddle-gpu==0.14.0.post85
33+
34+
# For installation on other platform, refer to http://paddlepaddle.org/
35+
```
2236

2337
## Features
2438

@@ -62,33 +76,26 @@ Please refer to our [release announcement](https://github.com/PaddlePaddle/Paddl
6276

6377
## Installation
6478

65-
It is recommended to check out the
66-
[Docker installation guide](http://www.paddlepaddle.org/docs/develop/documentation/fluid/en/build_and_install/docker_install_en.html)
67-
before looking into the
68-
[build from source guide](http://www.paddlepaddle.org/docs/develop/documentation/fluid/en/build_and_install/build_from_source_en.html).
79+
It is recommended to read [this doc](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/beginners_guide/install/install_doc.html) on our website.
6980

7081
## Documentation
7182

72-
We provide [English](http://www.paddlepaddle.org/docs/develop/documentation/en/getstarted/index_en.html) and
73-
[Chinese](http://www.paddlepaddle.org/docs/develop/documentation/zh/getstarted/index_cn.html) documentation.
83+
We provide [English](http://paddlepaddle.org/documentation/docs/en/0.15.0/getstarted/index_en.html) and
84+
[Chinese](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/beginners_guide/index.html) documentation.
7485

75-
- [Deep Learning 101](http://www.paddlepaddle.org/docs/develop/book/01.fit_a_line/index.html)
86+
- [Deep Learning 101](https://github.com/PaddlePaddle/book)
7687

7788
You might want to start from this online interactive book that can run in a Jupyter Notebook.
7889

79-
- [Distributed Training](http://www.paddlepaddle.org/docs/develop/documentation/en/howto/cluster/index_en.html)
90+
- [Distributed Training](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/user_guides/howto/training/cluster_howto.html)
8091

8192
You can run distributed training jobs on MPI clusters.
8293

83-
- [Distributed Training on Kubernetes](http://www.paddlepaddle.org/docs/develop/documentation/en/howto/cluster/multi_cluster/k8s_en.html)
84-
85-
You can also run distributed training jobs on Kubernetes clusters.
86-
87-
- [Python API](http://www.paddlepaddle.org/docs/develop/api/en/overview.html)
94+
- [Python API](http://paddlepaddle.org/documentation/api/zh/0.15.0/fluid.html)
8895

8996
Our new API enables much shorter programs.
9097

91-
- [How to Contribute](http://www.paddlepaddle.org/docs/develop/documentation/fluid/en/dev/contribute_to_paddle_en.html)
98+
- [How to Contribute](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/advanced_usage/development/contribute_to_paddle.html)
9299

93100
We appreciate your contributions!
94101

benchmark/fluid/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.7 /usr/lib/libcudnn.so && ln -s
1111
# Add "ENV http_proxy=http://ip:port" if your download is slow, and don't forget to unset it at runtime.
1212
# exmaple: unset http_proxy && unset https_proxy && python fluid_benchmark.py ...
1313

14+
1415
RUN pip install -U pip
1516
RUN pip install -U kubernetes paddlepaddle
1617

@@ -27,5 +28,6 @@ ADD *.whl /
2728
RUN pip install /*.whl && rm -f /*.whl
2829

2930
ENV LD_LIBRARY_PATH=/usr/local/lib
30-
ADD fluid_benchmark.py recordio_converter.py args.py recordio_converter.py run.sh run_fluid_benchmark.sh /workspace/
31+
ADD fluid_benchmark.py recordio_converter.py args.py recordio_converter.py run.sh run_fluid_benchmark.sh imagenet_reader.py /workspace/
3132
ADD models/ /workspace/models/
33+

benchmark/fluid/args.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
__all__ = ['parse_args', ]
1818

1919
BENCHMARK_MODELS = [
20-
"machine_translation", "resnet", "vgg", "mnist", "stacked_dynamic_lstm"
20+
"machine_translation", "resnet", "se_resnext", "vgg", "mnist",
21+
"stacked_dynamic_lstm", "resnet_with_preprocess"
2122
]
2223

2324

@@ -67,12 +68,12 @@ def parse_args():
6768
'--cpus',
6869
type=int,
6970
default=1,
70-
help='If cpus > 1, will use ParallelDo to run, else use Executor.')
71+
help='If cpus > 1, will set ParallelExecutor to use multiple threads.')
7172
parser.add_argument(
7273
'--data_set',
7374
type=str,
7475
default='flowers',
75-
choices=['cifar10', 'flowers'],
76+
choices=['cifar10', 'flowers', 'imagenet'],
7677
help='Optional dataset for benchmark.')
7778
parser.add_argument(
7879
'--infer_only', action='store_true', help='If set, run forward only.')
@@ -122,6 +123,11 @@ def parse_args():
122123
type=str,
123124
default="",
124125
help='Directory that contains all the training recordio files.')
126+
parser.add_argument(
127+
'--test_data_path',
128+
type=str,
129+
default="",
130+
help='Directory that contains all the test data (NOT recordio).')
125131
parser.add_argument(
126132
'--use_inference_transpiler',
127133
action='store_true',
@@ -130,5 +136,15 @@ def parse_args():
130136
'--no_random',
131137
action='store_true',
132138
help='If set, keep the random seed and do not shuffle the data.')
139+
parser.add_argument(
140+
'--use_lars',
141+
action='store_true',
142+
help='If set, use lars for optimizers, ONLY support resnet module.')
143+
parser.add_argument(
144+
'--reduce_strategy',
145+
type=str,
146+
choices=['reduce', 'all_reduce'],
147+
default='all_reduce',
148+
help='Specify the reduce strategy, can be reduce, all_reduce')
133149
args = parser.parse_args()
134150
return args

0 commit comments

Comments
 (0)