Skip to content

Commit 4801ee8

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into refine_generate_proposals_op
2 parents 8e0b949 + da722d6 commit 4801ee8

File tree

287 files changed

+14825
-5997
lines changed

Some content is hidden

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

287 files changed

+14825
-5997
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ third_party/
2525
bazel-*
2626
third_party/
2727

28+
build_*
2829
# clion workspace.
2930
cmake-build-*

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ option(WITH_INFERENCE "Compile fluid inference library" ON)
7272
option(WITH_INFERENCE_API_TEST "Test fluid inference high-level api interface" OFF)
7373
option(WITH_SYSTEM_BLAS "Use system blas library" OFF)
7474
option(PY_VERSION "Compile PaddlePaddle with python3 support" ${PY_VERSION})
75+
option(WITH_FAST_MATH "Make use of fast math library, might affect the precision to some extent" ON)
7576

7677
# PY_VERSION
7778
if(NOT PY_VERSION)
@@ -126,6 +127,9 @@ set(THIRD_PARTY_PATH "${CMAKE_BINARY_DIR}/third_party" CACHE STRING
126127
set(FLUID_INSTALL_DIR "${CMAKE_BINARY_DIR}/fluid_install_dir" CACHE STRING
127128
"A path setting fluid shared and static libraries")
128129

130+
set(FLUID_INFERENCE_INSTALL_DIR "${CMAKE_BINARY_DIR}/fluid_inference_install_dir" CACHE STRING
131+
"A path setting fluid inference shared and static libraries")
132+
129133
if (WITH_C_API AND WITH_PYTHON)
130134
message(WARNING "It is suggest not embedded a python interpreter in Paddle "
131135
"when using C-API. It will give an unpredictable behavior when using a "

Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ COPY ./paddle/scripts/docker/root/ /root/
2424

2525
RUN apt-get update && \
2626
apt-get install -y --allow-downgrades patchelf \
27+
python3 python3-dev python3-pip \
2728
git python-pip python-dev python-opencv openssh-server bison \
2829
libnccl2=2.1.2-1+cuda8.0 libnccl-dev=2.1.2-1+cuda8.0 \
2930
wget unzip unrar tar xz-utils bzip2 gzip coreutils ntp \
@@ -70,24 +71,33 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
7071
# specify sphinx version as 1.5.6 and remove -U option for [pip install -U
7172
# sphinx-rtd-theme] since -U option will cause sphinx being updated to newest
7273
# version(1.7.1 for now), which causes building documentation failed.
73-
RUN easy_install -U pip && \
74+
RUN pip3 install -U wheel && \
75+
pip3 install -U docopt PyYAML sphinx==1.5.6 && \
76+
pip3 install sphinx-rtd-theme==0.1.9 recommonmark && \
77+
easy_install -U pip && \
7478
pip install -U wheel && \
7579
pip install -U docopt PyYAML sphinx==1.5.6 && \
7680
pip install sphinx-rtd-theme==0.1.9 recommonmark
7781

78-
RUN pip install pre-commit 'ipython==5.3.0' && \
82+
RUN pip3 install pre-commit 'ipython==5.3.0' && \
83+
pip3 install 'ipykernel==4.6.0' 'jupyter==1.0.0' && \
84+
pip3 install opencv-python && \
85+
pip install pre-commit 'ipython==5.3.0' && \
7986
pip install 'ipykernel==4.6.0' 'jupyter==1.0.0' && \
8087
pip install opencv-python
8188

8289
#For docstring checker
90+
RUN pip3 install pylint pytest astroid isort
8391
RUN pip install pylint pytest astroid isort LinkChecker
8492

8593
COPY ./python/requirements.txt /root/
94+
RUN pip3 install -r /root/requirements.txt
8695
RUN pip install -r /root/requirements.txt
8796

8897
# To fix https://github.com/PaddlePaddle/Paddle/issues/1954, we use
8998
# the solution in https://urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2
9099
RUN apt-get install -y libssl-dev libffi-dev
100+
RUN pip3 install certifi urllib3[secure]
91101
RUN pip install certifi urllib3[secure]
92102

93103

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33

44
[![Build Status](https://travis-ci.org/PaddlePaddle/Paddle.svg?branch=develop)](https://travis-ci.org/PaddlePaddle/Paddle)
5-
[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://www.paddlepaddle.org/docs/develop/documentation/en/getstarted/index_en.html)
6-
[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](http://www.paddlepaddle.org/docs/develop/documentation/zh/getstarted/index_cn.html)
5+
[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://paddlepaddle.org/documentation/docs/en/1.0/getstarted/index_en.html)
6+
[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](http://paddlepaddle.org/documentation/docs/zh/1.0/beginners_guide/index.html)
77
[![Release](https://img.shields.io/github/release/PaddlePaddle/Paddle.svg)](https://github.com/PaddlePaddle/Paddle/releases)
88
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
99

@@ -19,17 +19,17 @@ 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

2121

22-
### Latest PaddlePaddle Release: [Fluid 0.15.0](https://github.com/PaddlePaddle/Paddle/tree/v0.15.0)
22+
### Latest PaddlePaddle Release: [Fluid 1.0.1](https://github.com/PaddlePaddle/Paddle/tree/release/1.0.0)
2323
### Install Latest Stable Release:
2424
```
2525
# Linux CPU
2626
pip install paddlepaddle
2727
# Linux GPU cuda9cudnn7
2828
pip install paddlepaddle-gpu
2929
# Linux GPU cuda8cudnn7
30-
pip install paddlepaddle-gpu==0.15.0.post87
30+
pip install paddlepaddle-gpu==1.0.1.post87
3131
# Linux GPU cuda8cudnn5
32-
pip install paddlepaddle-gpu==0.15.0.post85
32+
pip install paddlepaddle-gpu==1.0.1.post85
3333
3434
# For installation on other platform, refer to http://paddlepaddle.org/
3535
```
@@ -76,26 +76,26 @@ pip install paddlepaddle-gpu==0.15.0.post85
7676

7777
## Installation
7878

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.
79+
It is recommended to read [this doc](http://paddlepaddle.org/documentation/docs/zh/1.0/beginners_guide/index.html) on our website.
8080

8181
## Documentation
8282

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.
83+
We provide [English](http://paddlepaddle.org/documentation/docs/en/1.0.0/getstarted/index_en.html) and
84+
[Chinese](http://paddlepaddle.org/documentation/docs/zh/1.0/beginners_guide/index.html) documentation.
8585

8686
- [Deep Learning 101](https://github.com/PaddlePaddle/book)
8787

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

90-
- [Distributed Training](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/user_guides/howto/training/cluster_howto.html)
90+
- [Distributed Training](http://paddlepaddle.org/documentation/docs/zh/1.0/user_guides/howto/training/cluster_howto.html)
9191

9292
You can run distributed training jobs on MPI clusters.
9393

94-
- [Python API](http://paddlepaddle.org/documentation/api/zh/0.15.0/fluid.html)
94+
- [Python API](http://paddlepaddle.org/documentation/api/zh/1.0/fluid.html)
9595

9696
Our new API enables much shorter programs.
9797

98-
- [How to Contribute](http://paddlepaddle.org/documentation/docs/zh/0.15.0/new_docs/advanced_usage/development/contribute_to_paddle.html)
98+
- [How to Contribute](http://paddlepaddle.org/documentation/docs/zh/1.0/advanced_usage/development/contribute_to_paddle.html)
9999

100100
We appreciate your contributions!
101101

benchmark/fluid/run.sh

100644100755
File mode changed.

cmake/cblas.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ set(OPENBLAS_LIB_SEARCH_PATHS
4040
/usr/local/opt/openblas/lib)
4141

4242
find_path(OPENBLAS_INC_DIR NAMES cblas.h
43-
PATHS ${OPENBLAS_INCLUDE_SEARCH_PATHS})
43+
PATHS ${OPENBLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH)
4444
find_path(OPENBLAS_LAPACKE_INC_DIR NAMES lapacke.h
4545
PATHS ${OPENBLAS_INCLUDE_SEARCH_PATHS})
4646
find_library(OPENBLAS_LIB NAMES openblas

cmake/cuda.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ list(APPEND CUDA_NVCC_FLAGS "-std=c++11")
175175
list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -fPIC")
176176
endif(NOT WIN32)
177177

178-
list(APPEND CUDA_NVCC_FLAGS "--use_fast_math")
178+
if(WITH_FAST_MATH)
179+
# Make use of fast math library. https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html
180+
list(APPEND CUDA_NVCC_FLAGS "--use_fast_math")
181+
endif()
179182
# in cuda9, suppress cuda warning on eigen
180183
list(APPEND CUDA_NVCC_FLAGS "-w")
181184
# Set :expt-relaxed-constexpr to suppress Eigen warnings

cmake/external/eigen.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ INCLUDE(ExternalProject)
33
SET(EIGEN_SOURCE_DIR ${THIRD_PARTY_PATH}/eigen3)
44
SET(EIGEN_INCLUDE_DIR ${EIGEN_SOURCE_DIR}/src/extern_eigen3)
55
INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIR})
6+
if(NOT WITH_FAST_MATH)
7+
# EIGEN_FAST_MATH: https://eigen.tuxfamily.org/dox/TopicPreprocessorDirectives.html
8+
# enables some optimizations which might affect the accuracy of the result.
9+
# This currently enables the SSE vectorization of sin() and cos(),
10+
# and speedups sqrt() for single precision.
11+
# Defined to 1 by default. Define it to 0 to disable.
12+
add_definitions(-DEIGEN_FAST_MATH=0)
13+
endif()
614

715
if(WITH_AMD_GPU)
816
ExternalProject_Add(

cmake/external/openblas.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ IF(NOT ${CBLAS_FOUND})
2727

2828
SET(CBLAS_SOURCES_DIR ${THIRD_PARTY_PATH}/openblas)
2929
SET(CBLAS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/openblas)
30-
SET(CBLAS_INCLUDE_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)
30+
SET(CBLAS_INC_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)
3131

3232
SET(CBLAS_LIBRARIES
3333
"${CBLAS_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}openblas${CMAKE_STATIC_LIBRARY_SUFFIX}"
@@ -96,7 +96,7 @@ IF(NOT ${CBLAS_FOUND})
9696
ENDIF(NOT WIN32)
9797
SET(CBLAS_PROVIDER openblas)
9898
IF(WITH_C_API)
99-
INSTALL(DIRECTORY ${CBLAS_INCLUDE_DIR} DESTINATION third_party/openblas)
99+
INSTALL(DIRECTORY ${CBLAS_INC_DIR} DESTINATION third_party/openblas)
100100
# Because libopenblas.a is a symbolic link of another library, thus need to
101101
# install the whole directory.
102102
IF(ANDROID)
@@ -117,8 +117,8 @@ IF(NOT ${CBLAS_FOUND})
117117
ENDIF(NOT ${CBLAS_FOUND})
118118

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

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

cmake/flags.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ if (APPLE)
157157
# On Mac OS X build fat binaries with x86_64 architectures by default.
158158
set (CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX" FORCE)
159159
endif()
160+
# On Mac OS X register class specifier is deprecated and will cause warning error on latest clang 10.0
161+
set (COMMON_FLAGS -Wno-deprecated-register)
160162
endif(APPLE)
161163

162164
if(LINUX)

0 commit comments

Comments
 (0)