Skip to content

Commit 0986415

Browse files
committed
Fix conflict
2 parents 7955e3f + 6d6804f commit 0986415

File tree

338 files changed

+16332
-3142
lines changed

Some content is hidden

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

338 files changed

+16332
-3142
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.dockerignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.DS_Store
2+
build/
3+
*.user
4+
.vscode
5+
.idea
6+
.project
7+
.cproject
8+
.pydevproject
9+
Makefile
10+
.test_env/
11+
third_party/
12+
*~
13+
bazel-*
14+
15+
!build/*.deb

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ build/
77
.project
88
.cproject
99
.pydevproject
10+
.settings/
1011
Makefile
1112
.test_env/
1213
third_party/

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
sha: c25201a00e6b0514370501050cf2a8538ac12270
33
hooks:
44
- id: remove-crlf
5-
files: (?!.*third_party)^.*$
5+
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
66
- repo: https://github.com/reyoung/mirrors-yapf.git
77
sha: v0.13.2
88
hooks:
99
- id: yapf
10-
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$ # Bazel BUILD files follow Python syntax.
10+
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
1111
- repo: https://github.com/pre-commit/pre-commit-hooks
1212
sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469
1313
hooks:
1414
- id: check-added-large-files
1515
- id: check-merge-conflict
1616
- id: check-symlinks
1717
- id: detect-private-key
18-
files: (?!.*third_party)^.*$
18+
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
1919
- id: end-of-file-fixer
2020
- repo: https://github.com/PaddlePaddle/clang-format-pre-commit-hook.git
2121
sha: 28c0ea8a67a3e2dbbf4822ef44e85b63a0080a29

.travis.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,14 @@ cache:
44
- $HOME/third_party
55
- $HOME/.ccache
66
- $HOME/.cache/pip
7-
- $HOME/Library/Caches/Homebrew
87
sudo: required
98
dist: trusty
109
os:
1110
- linux
12-
- osx
1311
env:
1412
- JOB=DOCS
1513
- JOB=BUILD_AND_TEST
1614
- JOB=PRE_COMMIT
17-
matrix:
18-
exclude:
19-
- os: osx
20-
env: JOB=DOCS # Only generate documentation in linux.
21-
- os: osx
22-
env: JOB=PRE_COMMIT # Only check pre-commit hook in linux
2315

2416
addons:
2517
apt:
@@ -53,11 +45,10 @@ before_install:
5345
fi
5446
fi
5547
fi
56-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
5748
- if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
5849
# Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python
5950
# protobuf version.
60-
- pip install numpy wheel 'protobuf==3.1' sphinx recommonmark sphinx_rtd_theme virtualenv pre-commit requests==2.9.2 LinkChecker
51+
- pip install numpy wheel 'protobuf==3.1' sphinx recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit requests==2.9.2 LinkChecker
6152
script:
6253
- paddle/scripts/travis/main.sh
6354
notifications:

CMakeLists.txt

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,23 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License
1414

15-
cmake_minimum_required(VERSION 3.0)
16-
1715
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
1816
set(PROJ_ROOT ${CMAKE_SOURCE_DIR})
1917

2018
include(system)
2119

20+
if(ANDROID)
21+
cmake_minimum_required(VERSION 3.7)
22+
else()
23+
cmake_minimum_required(VERSION 3.0)
24+
endif()
25+
2226
project(paddle CXX C)
2327

2428
find_package(Sphinx)
25-
find_package(CUDA QUIET)
29+
if(NOT CMAKE_CROSSCOMPILING)
30+
find_package(CUDA QUIET)
31+
endif(NOT CMAKE_CROSSCOMPILING)
2632
find_package(Git REQUIRED)
2733
find_package(Threads REQUIRED)
2834

@@ -41,7 +47,7 @@ option(WITH_RDMA "Compile PaddlePaddle with RDMA support" OFF)
4147
option(WITH_TIMER "Compile PaddlePaddle with stats timer" OFF)
4248
option(WITH_PROFILER "Compile PaddlePaddle with GPU profiler" OFF)
4349
option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
44-
option(ON_COVERALLS "Compile PaddlePaddle with code coverage" OFF)
50+
option(WITH_COVERAGE "Compile PaddlePaddle with code coverage" OFF)
4551
option(COVERALLS_UPLOAD "Package code coverage data to coveralls" OFF)
4652
option(ON_TRAVIS "Exclude special unit test on Travis CI" OFF)
4753

@@ -52,6 +58,21 @@ if(NOT CMAKE_BUILD_TYPE)
5258
FORCE)
5359
endif()
5460

61+
if(ANDROID)
62+
if(${CMAKE_SYSTEM_VERSION} VERSION_LESS "21")
63+
message(FATAL_ERROR "Unsupport standalone toolchains with Android API level lower than 21")
64+
endif()
65+
66+
set(WITH_GPU OFF CACHE STRING
67+
"Disable GPU when cross-compiling for Android" FORCE)
68+
set(WITH_AVX OFF CACHE STRING
69+
"Disable AVX when cross-compiling for Android" FORCE)
70+
set(WITH_PYTHON OFF CACHE STRING
71+
"Disable PYTHON when cross-compiling for Android" FORCE)
72+
set(WITH_RDMA OFF CACHE STRING
73+
"Disable RDMA when cross-compiling for Android" FORCE)
74+
endif(ANDROID)
75+
5576
set(THIRD_PARTY_PATH "${PROJ_ROOT}/third_party" CACHE STRING
5677
"A path setting third party libraries download & build directories.")
5778
########################################################################################
@@ -65,6 +86,7 @@ include(external/python) # download, build, install python
6586
include(external/openblas) # download, build, install openblas
6687
include(external/swig) # download, build, install swig
6788
include(external/warpctc) # download, build, install warpctc
89+
include(external/any) # download libn::any
6890

6991
include(package) # set paddle packages
7092
include(cpplint) # set paddle c++ style
@@ -75,22 +97,28 @@ include(flags) # set paddle compile flags
7597
include(cudnn) # set cudnn libraries
7698
include(version) # set PADDLE_VERSION
7799
include(coveralls) # set code coverage
78-
79100
include(configure) # add paddle env configuration
80101

81102
include_directories("${PROJ_ROOT}")
82103
include_directories("${PROJ_ROOT}/paddle/cuda/include")
83104
include_directories("${CMAKE_CURRENT_BINARY_DIR}/proto")
84105

85106
set(EXTERNAL_LIBS
86-
# have not include gtest here.
87107
${GFLAGS_LIBRARIES}
88108
${GLOG_LIBRARIES}
89109
${CBLAS_LIBRARIES}
90110
${PROTOBUF_LIBRARY}
91111
${ZLIB_LIBRARIES}
112+
${PYTHON_LIBRARIES}
92113
)
93114

115+
if(WITH_GPU)
116+
list(APPEND EXTERNAL_LIB ${CUDA_LIBRARIES} ${CUDA_rt_LIBRARY})
117+
if(NOT WITH_DSO)
118+
list(APPEND EXTERNAL_LIB ${CUDNN_LIBRARY} ${CUDA_CUBLAS_LIBRARIES} ${CUDA_curand_LIBRARY})
119+
endif(NOT WITH_DSO)
120+
endif(WITH_GPU)
121+
94122
add_subdirectory(proto)
95123
add_subdirectory(paddle)
96124
add_subdirectory(python)
Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,55 @@
1-
FROM ubuntu:14.04
1+
# A image for building paddle binaries
2+
# Use cuda devel base image for both cpu and gpu environment
3+
FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04
24
MAINTAINER PaddlePaddle Authors <[email protected]>
35

4-
ARG DEBIAN_FRONTEND=noninteractive
56
ARG UBUNTU_MIRROR
6-
RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi'
7+
RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com/ubuntu#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi'
8+
9+
# ENV variables
10+
ARG WITH_GPU
11+
ARG WITH_AVX
12+
ARG WITH_DOC
13+
ARG WITH_STYLE_CHECK
14+
15+
ENV WOBOQ OFF
16+
ENV WITH_GPU=${WITH_AVX:-OFF}
17+
ENV WITH_AVX=${WITH_AVX:-ON}
18+
ENV WITH_DOC=${WITH_DOC:-OFF}
19+
ENV WITH_STYLE_CHECK=${WITH_STYLE_CHECK:-OFF}
20+
21+
ENV HOME /root
22+
# Add bash enhancements
23+
COPY ./paddle/scripts/docker/root/ /root/
724

825
RUN apt-get update && \
926
apt-get install -y git python-pip python-dev openssh-server bison && \
1027
apt-get install -y wget unzip tar xz-utils bzip2 gzip coreutils && \
1128
apt-get install -y curl sed grep graphviz libjpeg-dev zlib1g-dev && \
1229
apt-get install -y python-numpy python-matplotlib gcc g++ gfortran && \
13-
apt-get install -y automake && \
30+
apt-get install -y automake locales clang-format-3.8 swig && \
1431
apt-get clean -y
1532

33+
# git credential to skip password typing
34+
RUN git config --global credential.helper store
35+
36+
# Fix locales to en_US.UTF-8
37+
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
38+
39+
# FIXME: due to temporary ipykernel dependency issue, specify ipykernel jupyter
40+
# version util jupyter fixes this issue.
1641
RUN pip install --upgrade pip && \
17-
pip install -U "protobuf==3.1.0" && \
42+
pip install -U 'protobuf==3.1.0' && \
1843
pip install -U wheel pillow BeautifulSoup && \
1944
pip install -U docopt PyYAML sphinx && \
20-
pip install -U sphinx_rtd_theme recommonmark jupyter
45+
pip install -U sphinx-rtd-theme==0.1.9 recommonmark && \
46+
pip install pre-commit 'requests==2.9.2' 'ipykernel==4.6.0' 'jupyter==1.0.0'
2147

2248
RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \
2349
cd cmake-3.4.1 && ./bootstrap && make -j `nproc` && make install && \
2450
cd .. && rm -rf cmake-3.4.1
2551

26-
ARG BUILD_WOBOQ
27-
ARG BUILD_AND_INSTALL
28-
ARG WITH_AVX
29-
ARG WITH_DOC
30-
ARG WITH_STYLE_CHECK
31-
32-
ENV BUILD_WOBOQ=${BUILD_WOBOQ:-OFF}
33-
ENV BUILD_AND_INSTALL=${BUILD_AND_INSTALL:-OFF}
34-
ENV WITH_GPU=OFF
35-
ENV WITH_AVX=${WITH_AVX:-ON}
36-
ENV WITH_DOC=${WITH_DOC:-OFF}
37-
ENV WITH_STYLE_CHECK=${WITH_STYLE_CHECK:-OFF}
38-
39-
RUN mkdir /paddle
40-
COPY . /paddle/
41-
RUN /paddle/paddle/scripts/docker/build.sh
42-
VOLUME ["/usr/share/nginx/html/data", "/usr/share/nginx/html/paddle"]
52+
VOLUME ["/woboq_out"]
4353

4454
# Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service
4555
RUN mkdir /var/run/sshd
@@ -48,12 +58,5 @@ RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
4858
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
4959
EXPOSE 22
5060

51-
# Jupyter Notebook directory.
52-
RUN mkdir /notes/
53-
WORKDIR "/notes"
54-
EXPOSE 8888
55-
56-
RUN mkdir -p /opt/bin
57-
COPY ./paddle/scripts/docker/entrypoint /opt/bin/
58-
59-
CMD ["/opt/bin/entrypoint"]
61+
# development image default do build work
62+
CMD ["bash", "/paddle/paddle/scripts/docker/build.sh"]

README.md

Lines changed: 24 additions & 24 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/)
6-
[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](http://www.paddlepaddle.org/cn/index.html)
5+
[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://www.paddlepaddle.org/develop/doc/)
6+
[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](http://www.paddlepaddle.org/doc_cn/)
77
[![Coverage Status](https://coveralls.io/repos/github/PaddlePaddle/Paddle/badge.svg?branch=develop)](https://coveralls.io/github/PaddlePaddle/Paddle?branch=develop)
88
[![Release](https://img.shields.io/github/release/PaddlePaddle/Paddle.svg)](https://github.com/PaddlePaddle/Paddle/releases)
99
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
@@ -59,36 +59,36 @@ Please refer to our [release announcement](https://github.com/PaddlePaddle/Paddl
5959
the capability of PaddlePaddle to make a huge impact for your product.
6060

6161
## Installation
62-
Check out the [Install Guide](http://paddlepaddle.org/doc/build/) to install from
63-
pre-built packages (**docker image**, **deb package**) or
64-
directly build on **Linux** and **Mac OS X** from the source code.
62+
63+
It is recommended to check out the
64+
[Docker installation guide](http://www.paddlepaddle.org/develop/doc/getstarted/build_and_install/docker_install_en.html)
65+
before looking into the
66+
[build from source guide](http://www.paddlepaddle.org/develop/doc/getstarted/build_and_install/build_from_source_en.html)
6567

6668
## Documentation
67-
Both [English Docs](http://paddlepaddle.org/doc/) and [Chinese Docs](http://paddlepaddle.org/doc_cn/) are provided for our users and developers.
6869

69-
- [Quick Start](http://paddlepaddle.org/doc/demo/quick_start/index_en) <br>
70-
You can follow the quick start tutorial to learn how use PaddlePaddle
71-
step-by-step.
70+
We provide [English](http://www.paddlepaddle.org/develop/doc/) and
71+
[Chinese](http://www.paddlepaddle.org/doc_cn/) documentation.
72+
73+
- [Deep Learning 101](http://book.paddlepaddle.org/index.en.html)
74+
75+
You might want to start from the this online interactive book that can run in Jupyter Notebook.
76+
77+
- [Distributed Training](http://www.paddlepaddle.org/develop/doc/howto/usage/cluster/cluster_train_en.html)
78+
79+
You can run distributed training jobs on MPI clusters.
80+
81+
- [Distributed Training on Kubernetes](http://www.paddlepaddle.org/develop/doc/howto/usage/k8s/k8s_en.html)
7282

73-
- [Example and Demo](http://paddlepaddle.org/doc/demo/) <br>
74-
We provide five demos, including: image classification, sentiment analysis,
75-
sequence to sequence model, recommendation, semantic role labeling.
83+
You can also run distributed training jobs on Kubernetes clusters.
7684

77-
- [Distributed Training](http://paddlepaddle.org/doc/cluster) <br>
78-
This system supports training deep learning models on multiple machines
79-
with data parallelism.
85+
- [Python API](http://www.paddlepaddle.org/develop/doc/api/index_en.html)
8086

81-
- [Python API](http://paddlepaddle.org/doc/ui/) <br>
82-
PaddlePaddle supports using either Python interface or C++ to build your
83-
system. We also use SWIG to wrap C++ source code to create a user friendly
84-
interface for Python. You can also use SWIG to create interface for your
85-
favorite programming language.
87+
Our new API enables much shorter programs.
8688

87-
- [How to Contribute](http://paddlepaddle.org/doc/build/contribute_to_paddle.html) <br>
88-
We sincerely appreciate your interest and contributions. If you would like to
89-
contribute, please read the contribution guide.
89+
- [How to Contribute](http://www.paddlepaddle.org/develop/doc/howto/dev/contribute_to_paddle_en.html)
9090

91-
- [Source Code Documents](http://paddlepaddle.org/doc/source/) <br>
91+
We appreciate your contributions!
9292

9393
## Ask Questions
9494

authors

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@ Luo, Tao
2929
Lyu, Qin
3030
Mao, Hongyue
3131
Qian, Xiaojun
32+
Qiao, Longfei
3233
Qi, Jun
3334
Qin, Duohao
3435
Shen, Guolong
3536
Shi, Guangchuan
3637
Song, Xiang
38+
Wang, Helin
3739
Wang, Jiang
3840
Wang, Yanfei
41+
Wang, Yi
3942
Wang, Yong
4043
Weng, Renliang
4144
Xu, Tianbing

cmake/FindSphinx.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function( Sphinx_add_target target_name builder conf cache source destination )
7272
${source}
7373
${destination}
7474
COMMENT "Generating sphinx documentation: ${builder}"
75-
COMMAND ln -sf ${destination}/index_*.html ${destination}/index.html
75+
COMMAND cd ${destination} && ln -sf ./index_*.html index.html
7676
)
7777

7878
set_property(

0 commit comments

Comments
 (0)