Skip to content

Commit 4c2b3b6

Browse files
authored
Merge pull request PaddlePaddle#484 from PaddlePaddle/release/v0.9.0
Release v0.9.0
2 parents d539e78 + 0ad33b5 commit 4c2b3b6

File tree

475 files changed

+26662
-11172
lines changed

Some content is hidden

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

475 files changed

+26662
-11172
lines changed

.clang-format

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@
1313
# The document of clang-format is
1414
# http://clang.llvm.org/docs/ClangFormat.html
1515
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
16-
#
17-
# TODO(yuyang18): Add python and other language code style
1816
---
1917
Language: Cpp
2018
BasedOnStyle: Google
2119
IndentWidth: 2
2220
TabWidth: 2
2321
ContinuationIndentWidth: 4
2422
AccessModifierOffset: -2 # The private/protected/public has no indent in class
25-
PointerAlignment: Left # int* p/int& p, not int *p/int &p
2623
Standard: Cpp11
2724
AllowAllParametersOfDeclarationOnNextLine: true
25+
BinPackParameters: false
26+
BinPackArguments: false
2827
...
2928

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ build/
33
*.user
44

55
.vscode
6-
.idea
6+
.idea
7+
.project
8+
.cproject
9+
.pydevproject
10+
Makefile

.pre-commit-config.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
2+
sha: c25201a00e6b0514370501050cf2a8538ac12270
3+
hooks:
4+
- id: remove-crlf
5+
- repo: https://github.com/reyoung/mirrors-yapf.git
6+
sha: v0.13.2
7+
hooks:
8+
- id: yapf
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
sha: 4ef03c4223ad322c7adaa6c6c0efb26b57df3b71
11+
hooks:
12+
- id: check-added-large-files
13+
- id: check-merge-conflict
14+
- id: check-symlinks
15+
- id: detect-private-key
16+
- id: end-of-file-fixer
17+
# TODO(yuyang): trailing whitespace has some bugs on markdown
18+
# files now, please not add it to pre-commit hook now
19+
# - id: trailing-whitespace
20+
#
21+
# TODO(yuyang): debug-statements not fit for Paddle, because
22+
# not all of our python code is runnable. Some are used for
23+
# documenation
24+
# - id: debug-statements

.style.yapf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[style]
2+
based_on_style = pep8
3+
column_limit = 80

.travis.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@ language: cpp
22
cache: ccache
33
sudo: required
44
dist: trusty
5+
os:
6+
- linux
7+
- osx
58
env:
69
- JOB=DOCS
710
- JOB=BUILD_AND_TEST
11+
matrix:
12+
exclude:
13+
- os: osx
14+
env: JOB=DOCS # Only generate documentation in linux
15+
816
addons:
917
apt:
1018
packages:
@@ -27,9 +35,22 @@ addons:
2735
- libgoogle-glog-dev
2836
- libgflags-dev
2937
- libgtest-dev
38+
- curl
39+
- lcov
40+
- graphviz
41+
- swig
3042
before_install:
31-
- pip install wheel protobuf sphinx breathe recommonmark
32-
- sudo paddle/scripts/travis/before_install.sh
43+
- |
44+
if [ ${JOB} == "BUILD_AND_TEST" ]; then
45+
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)'
46+
then
47+
echo "Only markdown docs were updated, stopping build process."
48+
exit
49+
fi
50+
fi
51+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi
52+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
53+
- pip install wheel protobuf sphinx breathe recommonmark virtualenv numpy
3354
script:
3455
- paddle/scripts/travis/main.sh
3556
notifications:

CMakeLists.txt

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ cmake_minimum_required(VERSION 2.8)
22

33
project(paddle CXX C)
44
set(PADDLE_MAJOR_VERSION 0)
5-
set(PADDLE_MINOR_VERSION 8)
6-
set(PADDLE_PATCH_VERSION 0b1)
5+
set(PADDLE_MINOR_VERSION 9)
6+
set(PADDLE_PATCH_VERSION 0)
77
set(PADDLE_VERSION ${PADDLE_MAJOR_VERSION}.${PADDLE_MINOR_VERSION}.${PADDLE_PATCH_VERSION})
88

99
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
1010
set(PROJ_ROOT ${CMAKE_SOURCE_DIR})
1111
include(package)
12-
include(swig)
12+
find_package(SWIG 2.0)
1313
find_package(CUDA QUIET)
1414
find_package(Protobuf REQUIRED)
1515
find_package(PythonLibs 2.7 REQUIRED)
@@ -40,6 +40,9 @@ option(WITH_TESTING "Compile and run unittest for PaddlePaddle" ${GTEST_FOUND})
4040
option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
4141
option(WITH_SWIG_PY "Compile PaddlePaddle with py PaddlePaddle prediction api" ${SWIG_FOUND})
4242
option(ON_TRAVIS "Running test on travis-ci or not." OFF)
43+
option(ON_COVERALLS "Generating code coverage data on coveralls or not." OFF)
44+
option(COVERALLS_UPLOAD "Uploading the generated coveralls json." ON)
45+
4346
if(NOT CMAKE_BUILD_TYPE)
4447
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
4548
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel"
@@ -49,11 +52,16 @@ endif()
4952
include(enableCXX11)
5053
include(cpplint)
5154
include(ccache)
55+
if(WITH_RDMA)
56+
include(rdma)
57+
endif()
5258
include(util)
5359
include(flags)
5460
include(cudnn)
5561
include(FindPythonModule)
5662
include(check_packages)
63+
include(swig)
64+
include(coveralls)
5765

5866
# add PaddlePaddle version
5967
if(DEFINED ENV{PADDLE_VERSION})
@@ -65,6 +73,19 @@ else()
6573
Subversion_WC_INFO(${PROJ_ROOT} Project)
6674
add_definitions(-DPADDLE_VERSION=${Project_WC_REVISION})
6775
endif()
76+
elseif(EXISTS ${PROJ_ROOT}/.git/)
77+
find_package(Git REQUIRED)
78+
execute_process(
79+
COMMAND ${GIT_EXECUTABLE} log -1 --format=%H
80+
WORKING_DIRECTORY ${PROJ_ROOT}
81+
OUTPUT_VARIABLE GIT_SHA1
82+
RESULT_VARIABLE GIT_RESULT
83+
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
84+
if(NOT ${GIT_RESULT})
85+
add_definitions(-DPADDLE_VERSION=\"${GIT_SHA1}\")
86+
else()
87+
message(WARNING "Cannot add paddle version from git tag")
88+
endif()
6889
endif()
6990
endif()
7091

@@ -74,11 +95,24 @@ if(NOT WITH_GPU)
7495
add_definitions(-DHPPL_STUB_FUNC)
7596
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu)
7697
else()
98+
if(${CUDA_VERSION_MAJOR} GREATER 6)
99+
if(COMPILER_SUPPORT_CXX11)
100+
LIST(APPEND CUDA_NVCC_FLAGS -std=c++11)
101+
endif()
102+
endif()
103+
77104
# TODO(yuyang18): Change it to remove std=c++11 in cuda compile.
78105
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
79106
if(NOT CUDNN_FOUND)
80107
message(FATAL_ERROR "Paddle need cudnn to compile")
81108
endif()
109+
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-g -O3 --use_fast_math")
110+
111+
if(WITH_AVX)
112+
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${AVX_FLAG}")
113+
else(WITH_AVX)
114+
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${SSE3_FLAG}")
115+
endif(WITH_AVX)
82116

83117
if(WITH_DSO)
84118
set(CUDA_LIBRARIES "")
@@ -91,7 +125,7 @@ else()
91125
endif(NOT WITH_GPU)
92126

93127
if(WITH_DOUBLE)
94-
add_definitions(-DPADDLE_TYPE_DOUBLE -DHPPL_TYPE_DOUBLE)
128+
add_definitions(-DPADDLE_TYPE_DOUBLE)
95129
set(ACCURACY double)
96130
else(WITH_DOUBLE)
97131
set(ACCURACY float)
@@ -102,11 +136,11 @@ if(NOT WITH_TIMER)
102136
endif(NOT WITH_TIMER)
103137

104138
if(WITH_AVX)
105-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${AVX_FLAGS}")
106-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${AVX_FLAGS}")
139+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${AVX_FLAG}")
140+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${AVX_FLAG}")
107141
else(WITH_AVX)
108-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3")
109-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse3")
142+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SSE3_FLAG}")
143+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SSE3_FLAG}")
110144
endif(WITH_AVX)
111145

112146
if(WITH_PYTHON)
@@ -116,12 +150,15 @@ else(WITH_PYTHON)
116150
add_definitions(-DPADDLE_NO_PYTHON)
117151
endif(WITH_PYTHON)
118152

119-
if(NOT WITH_RDMA)
120-
add_definitions(-DPADDLE_DISABLE_RDMA)
121-
endif()
153+
if(WITH_RDMA)
154+
include_directories("${RDMA_INC_DIR}")
155+
else(WITH_RDMA)
156+
add_definitions(-DPADDLE_DISABLE_RDMA)
157+
endif(WITH_RDMA)
122158

123159
if(WITH_GLOG)
124160
add_definitions(-DPADDLE_USE_GLOG)
161+
include_directories(${LIBGLOG_INCLUDE_DIR})
125162
endif()
126163

127164
if(WITH_GFLAGS)

ISSUE_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Thank you for contributing to PaddlePaddle. Submitting an issue is a great help for us.
2+
Both Chinese and English issues are welcome.
3+
4+
It's hard to solve a problem when important details are missing.
5+
Before submitting the issue, look over the following criteria before handing your request in.
6+
7+
- [ ] Was there a similar issue submitted or resolved before ? You could search issue in the github.
8+
- [ ] Did you retrieve your issue from widespread search engines ?
9+
- [ ] Is my description of the issue clear enough to reproduce this problem?
10+
* If some errors occurred, we need details about `how do you run your code?`, `what system do you use?`, `Are you using GPU or not?`, etc.
11+
* If you use an recording [asciinema](https://asciinema.org/) to show what you are doing to make it happen, that's awesome! We could help you solve the problem more quickly.
12+
- [ ] Is my description of the issue use the github markdown correctly?
13+
* Please use the proper markdown syntaxes for styling all forms of writing, e.g, source code, error information, etc.
14+
* Check out [this page](https://guides.github.com/features/mastering-markdown/) to find out much more about markdown.

README.md

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,67 @@
11
# PaddlePaddle
2-
[![Build Status](https://travis-ci.org/baidu/Paddle.svg?branch=master)](https://travis-ci.org/baidu/Paddle)
32

4-
Welcome to the PaddlePaddle GitHub.
53

6-
The software will be released on Sept. 30 with full documentation and installation support.
4+
[![Build Status](https://travis-ci.org/baidu/Paddle.svg?branch=master)](https://travis-ci.org/baidu/Paddle)
5+
[![Coverage Status](https://coveralls.io/repos/github/baidu/Paddle/badge.svg?branch=develop)](https://coveralls.io/github/baidu/Paddle?branch=develop)
6+
[![Join the chat at https://gitter.im/PaddlePaddle/Deep_Learning](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PaddlePaddle/Deep_Learning?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7+
[![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](LICENSE)
78

8-
A pre-release version is available now for those who are eager to take a look.
9+
Welcome to the PaddlePaddle GitHub.
910

1011
PaddlePaddle (PArallel Distributed Deep LEarning) is an easy-to-use,
1112
efficient, flexible and scalable deep learning platform, which is originally
1213
developed by Baidu scientists and engineers for the purpose of applying deep
1314
learning to many products at Baidu.
1415

16+
Our vision is to enable deep learning for everyone via PaddlePaddle.
17+
Please refer to our [release announcement](https://github.com/baidu/Paddle/releases) to track the latest feature of PaddlePaddle.
18+
1519
## Features
1620

1721
- **Flexibility**
1822

19-
PaddlePaddle supports a wide range of neural network architectures and
20-
optimization algorithms. It is easy to configure complex models such as
21-
neural machine translation model with attention mechanism or complex memory
22-
connection.
23+
PaddlePaddle supports a wide range of neural network architectures and
24+
optimization algorithms. It is easy to configure complex models such as
25+
neural machine translation model with attention mechanism or complex memory
26+
connection.
2327

2428
- **Efficiency**
2529

26-
In order to unleash the power of heterogeneous computing resource,
27-
optimization occurs at different levels of PaddlePaddle, including
28-
computing, memory, architecture and communication. The following are some
29-
examples:
30-
1. Optimized math operations through SSE/AVX intrinsics, BLAS libraries
31-
(e.g. MKL, ATLAS, cuBLAS) or customized CPU/GPU kernels.
32-
2. Highly optimized recurrent networks which can handle **variable-length**
33-
sequence without padding.
34-
3. Optimized local and distributed training for models with high dimensional
35-
sparse data.
30+
In order to unleash the power of heterogeneous computing resource,
31+
optimization occurs at different levels of PaddlePaddle, including
32+
computing, memory, architecture and communication. The following are some
33+
examples:
34+
35+
- Optimized math operations through SSE/AVX intrinsics, BLAS libraries
36+
(e.g. MKL, ATLAS, cuBLAS) or customized CPU/GPU kernels.
37+
- Highly optimized recurrent networks which can handle **variable-length**
38+
sequence without padding.
39+
- Optimized local and distributed training for models with high dimensional
40+
sparse data.
3641

3742
- **Scalability**
3843

39-
With PaddlePaddle, it is easy to use many CPUs/GPUs and machines to speed
40-
up your training. PaddlePaddle can achieve high throughput and performance
41-
via optimized communication.
44+
With PaddlePaddle, it is easy to use many CPUs/GPUs and machines to speed
45+
up your training. PaddlePaddle can achieve high throughput and performance
46+
via optimized communication.
4247

4348
- **Connected to Products**
4449

45-
In addition, PaddlePaddle is also designed to be easily deployable. At Baidu,
46-
PaddlePaddle has been deployed into products or service with a vast number
47-
of users, including ad click-through rate (CTR) prediction, large-scale image
48-
classification, optical character recognition(OCR), search ranking, computer
49-
virus detection, recommendation, etc. It is widely utilized in products at
50-
Baidu and it has achieved a significant impact. We hope you can also exploit
51-
the capability of PaddlePaddle to make a huge impact for your product.
50+
In addition, PaddlePaddle is also designed to be easily deployable. At Baidu,
51+
PaddlePaddle has been deployed into products or service with a vast number
52+
of users, including ad click-through rate (CTR) prediction, large-scale image
53+
classification, optical character recognition(OCR), search ranking, computer
54+
virus detection, recommendation, etc. It is widely utilized in products at
55+
Baidu and it has achieved a significant impact. We hope you can also exploit
56+
the capability of PaddlePaddle to make a huge impact for your product.
5257

5358
## Installation
54-
See [Installation Guide](http://paddlepaddle.org/doc/build/) to install from pre-built package or build from the source code. (Note: The installation packages are still in pre-release state and your experience of installation may not be smooth.).
55-
59+
Check out the [Install Guide](http://paddlepaddle.org/doc/build/) to install from
60+
pre-built packages (**docker image**, **deb package**) or
61+
directly build on **Linux** and **Mac OS X** from the source code.
62+
5663
## Documentation
57-
- [Chinese Documentation](http://paddlepaddle.org/doc_cn/) <br>
64+
Both [English Docs](http://paddlepaddle.org/doc/) and [Chinese Docs](http://paddlepaddle.org/doc_cn/) are provided for our users and developers.
5865

5966
- [Quick Start](http://paddlepaddle.org/doc/demo/quick_start/index_en) <br>
6067
You can follow the quick start tutorial to learn how use PaddlePaddle
@@ -81,9 +88,9 @@ See [Installation Guide](http://paddlepaddle.org/doc/build/) to install from pre
8188
- [Source Code Documents](http://paddlepaddle.org/doc/source/) <br>
8289

8390
## Ask Questions
84-
85-
If you want to ask questions and discuss about methods and models, welcome
86-
to send email to [email protected]. Framework development discussions and
91+
Please join the [**gitter chat**](https://gitter.im/PaddlePaddle/Deep_Learning) or send email to
92+
**[email protected]** to ask questions and talk about methods and models.
93+
Framework development discussions and
8794
bug reports are collected on [Issues](https://github.com/baidu/paddle/issues).
8895

8996
## Copyright and License

0 commit comments

Comments
 (0)