Skip to content

Commit 3ca5750

Browse files
committed
fix conficts
2 parents b7b7011 + db82a0e commit 3ca5750

File tree

939 files changed

+11722
-9040
lines changed

Some content is hidden

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

939 files changed

+11722
-9040
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ build/
99
.pydevproject
1010
Makefile
1111
.test_env/
12+
13+
*~
14+
bazel-*

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "warp-ctc"]
2+
path = warp-ctc
3+
url = https://github.com/baidu-research/warp-ctc.git

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22
sha: c25201a00e6b0514370501050cf2a8538ac12270
33
hooks:
44
- id: remove-crlf
5+
files: (?!.*warp-ctc)^.*$
56
- repo: https://github.com/reyoung/mirrors-yapf.git
67
sha: v0.13.2
78
hooks:
8-
- id: yapf
9+
- id: yapf
10+
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$ # Bazel BUILD files follow Python syntax.
911
- repo: https://github.com/pre-commit/pre-commit-hooks
1012
sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469
1113
hooks:
1214
- id: check-added-large-files
1315
- id: check-merge-conflict
1416
- id: check-symlinks
1517
- id: detect-private-key
18+
files: (?!.*warp-ctc)^.*$
1619
- id: end-of-file-fixer
1720
- repo: https://github.com/PaddlePaddle/clang-format-pre-commit-hook.git
1821
sha: 28c0ea8a67a3e2dbbf4822ef44e85b63a0080a29

.travis.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ os:
88
env:
99
- JOB=DOCS
1010
- JOB=BUILD_AND_TEST
11+
- JOB=PRE_COMMIT
1112
matrix:
1213
exclude:
1314
- os: osx
14-
env: JOB=DOCS # Only generate documentation in linux
15+
env: JOB=DOCS # Only generate documentation in linux.
16+
- os: osx
17+
env: JOB=PRE_COMMIT # Only check pre-commit hook in linux
1518

1619
addons:
1720
apt:
@@ -26,10 +29,6 @@ addons:
2629
- python-pip
2730
- python2.7-dev
2831
- m4
29-
- libprotobuf-dev
30-
- doxygen
31-
- protobuf-compiler
32-
- python-protobuf
3332
- python-numpy
3433
- python-wheel
3534
- libgoogle-glog-dev
@@ -39,18 +38,25 @@ addons:
3938
- lcov
4039
- graphviz
4140
- swig
41+
- clang-format-3.8
42+
- automake
43+
- libtool
4244
before_install:
4345
- |
4446
if [ ${JOB} == "BUILD_AND_TEST" ]; then
45-
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(\.rst$)|(\.jpg$)|(\.png$)'
46-
then
47-
echo "Only markdown docs were updated, stopping build process."
48-
exit
47+
local change_list=`git diff --name-only $TRAVIS_COMMIT_RANGE`
48+
if [ $? -eq 0 ]; then # if git diff return no zero, then rerun unit test.
49+
if ! echo ${change_list} | grep -qvE '(\.md$)|(\.rst$)|(\.jpg$)|(\.png$)'
50+
then
51+
echo "Only markdown docs were updated, stopping build process."
52+
exit
53+
fi
4954
fi
5055
fi
5156
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi
5257
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
53-
- pip install wheel protobuf sphinx breathe recommonmark virtualenv numpy sphinx_rtd_theme
58+
- if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
59+
- pip install wheel protobuf sphinx recommonmark virtualenv numpy sphinx_rtd_theme pre-commit requests==2.9.2 LinkChecker
5460
script:
5561
- paddle/scripts/travis/main.sh
5662
notifications:

CMakeLists.txt

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ find_package(Protobuf REQUIRED)
1111

1212
# Check protobuf library version.
1313
execute_process(COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} --version
14-
OUTPUT_VARIABLE PROTOBUF_VERSION)
14+
OUTPUT_VARIABLE PROTOBUF_VERSION)
1515
string(REPLACE "libprotoc " "" PROTOBUF_VERSION ${PROTOBUF_VERSION})
1616

1717
set(PROTOBUF_3 OFF)
@@ -25,8 +25,8 @@ find_package(ZLIB REQUIRED)
2525
find_package(NumPy REQUIRED)
2626
find_package(Threads REQUIRED)
2727
find_package(AVX QUIET)
28-
find_package(Glog)
29-
find_package(Gflags QUIET)
28+
find_package(Glog REQUIRED)
29+
find_package(Gflags REQUIRED)
3030
find_package(GTest)
3131
find_package(Sphinx)
3232
find_package(Doxygen)
@@ -40,8 +40,6 @@ option(WITH_AVX "Compile PaddlePaddle with avx intrinsics" ${AVX_FOUND})
4040
option(WITH_PYTHON "Compile PaddlePaddle with python interpreter" ON)
4141
option(WITH_STYLE_CHECK "Style Check for PaddlePaddle" ${PYTHONINTERP_FOUND})
4242
option(WITH_RDMA "Compile PaddlePaddle with rdma support" OFF)
43-
option(WITH_GLOG "Compile PaddlePaddle use glog, otherwise use a log implement internally" ${LIBGLOG_FOUND})
44-
option(WITH_GFLAGS "Compile PaddlePaddle use gflags, otherwise use a flag implement internally" ${GFLAGS_FOUND})
4543
option(WITH_TIMER "Compile PaddlePaddle use timer" OFF)
4644
option(WITH_PROFILER "Compile PaddlePaddle use gpu profiler" OFF)
4745
option(WITH_TESTING "Compile and run unittest for PaddlePaddle" ${GTEST_FOUND})
@@ -51,13 +49,7 @@ option(ON_TRAVIS "Running test on travis-ci or not." OFF)
5149
option(ON_COVERALLS "Generating code coverage data on coveralls or not." OFF)
5250
option(COVERALLS_UPLOAD "Uploading the generated coveralls json." ON)
5351

54-
if(NOT CMAKE_BUILD_TYPE)
55-
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
56-
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel"
57-
FORCE)
58-
endif()
5952

60-
include(enableCXX11)
6153
include(cpplint)
6254
include(ccache)
6355
if(WITH_RDMA)
@@ -75,42 +67,37 @@ include(coveralls)
7567
find_package(Git REQUIRED)
7668
# version.cmake will get the current PADDLE_VERSION
7769
include(version)
78-
add_definitions(-DPADDLE_VERSION=\"${PADDLE_VERSION}\")
79-
70+
add_definitions(-DPADDLE_VERSION=${PADDLE_VERSION})
8071

8172
if(NOT WITH_GPU)
8273
add_definitions(-DPADDLE_ONLY_CPU)
8374
add_definitions(-DHPPL_STUB_FUNC)
75+
8476
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu)
8577
else()
86-
if(${CUDA_VERSION_MAJOR} GREATER 6)
87-
if(COMPILER_SUPPORT_CXX11)
88-
LIST(APPEND CUDA_NVCC_FLAGS -std=c++11)
89-
endif()
78+
if(${CUDA_VERSION_MAJOR} VERSION_LESS 7)
79+
message(FATAL_ERROR "Paddle need CUDA >= 7.0 to compile")
9080
endif()
9181

92-
# TODO(yuyang18): Change it to remove std=c++11 in cuda compile.
93-
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
9482
if(NOT CUDNN_FOUND)
9583
message(FATAL_ERROR "Paddle need cudnn to compile")
9684
endif()
97-
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-g -O3 --use_fast_math")
9885

9986
if(WITH_AVX)
10087
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${AVX_FLAG}")
10188
else(WITH_AVX)
10289
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${SSE3_FLAG}")
10390
endif(WITH_AVX)
10491

105-
if(WITH_DSO)
106-
add_definitions(-DPADDLE_USE_DSO)
107-
endif(WITH_DSO)
108-
10992
# Include cuda and cudnn
11093
include_directories(${CUDNN_INCLUDE_DIR})
11194
include_directories(${CUDA_TOOLKIT_INCLUDE})
11295
endif(NOT WITH_GPU)
11396

97+
if(WITH_DSO)
98+
add_definitions(-DPADDLE_USE_DSO)
99+
endif(WITH_DSO)
100+
114101
if(WITH_DOUBLE)
115102
add_definitions(-DPADDLE_TYPE_DOUBLE)
116103
set(ACCURACY double)
@@ -147,16 +134,12 @@ else(WITH_RDMA)
147134
add_definitions(-DPADDLE_DISABLE_RDMA)
148135
endif(WITH_RDMA)
149136

150-
if(WITH_GLOG)
151-
add_definitions(-DPADDLE_USE_GLOG)
152-
include_directories(${LIBGLOG_INCLUDE_DIR})
153-
endif()
137+
# glog
138+
include_directories(${LIBGLOG_INCLUDE_DIR})
154139

155-
if(WITH_GFLAGS)
156-
add_definitions(-DPADDLE_USE_GFLAGS)
157-
add_definitions(-DGFLAGS_NS=${GFLAGS_NAMESPACE})
158-
include_directories(${GFLAGS_INCLUDE_DIRS})
159-
endif()
140+
#gflags
141+
add_definitions(-DGFLAGS_NS=${GFLAGS_NAMESPACE})
142+
include_directories(${GFLAGS_INCLUDE_DIRS})
160143

161144
if(WITH_TESTING)
162145
enable_testing()
@@ -180,5 +163,4 @@ add_subdirectory(paddle)
180163
add_subdirectory(python)
181164
if(WITH_DOC)
182165
add_subdirectory(doc)
183-
add_subdirectory(doc_cn)
184166
endif()

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./doc/howto/dev/contribute_to_paddle_en.md

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016 Baidu, Inc. All Rights Reserved
1+
Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
22

33
Apache License
44
Version 2.0, January 2004
@@ -188,7 +188,7 @@ Copyright (c) 2016 Baidu, Inc. All Rights Reserved
188188
same "printed page" as the copyright notice for easier
189189
identification within third-party archives.
190190

191-
Copyright (c) 2016 Baidu, Inc. All Rights Reserve.
191+
Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
192192

193193
Licensed under the Apache License, Version 2.0 (the "License");
194194
you may not use this file except in compliance with the License.

WORKSPACE

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# External dependency to Google protobuf.
2+
http_archive(
3+
name="protobuf",
4+
url="http://github.com/google/protobuf/archive/v3.1.0.tar.gz",
5+
sha256="0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7",
6+
strip_prefix="protobuf-3.1.0")
7+
8+
# External dependency to gtest 1.7.0. This method comes from
9+
# https://www.bazel.io/versions/master/docs/tutorial/cpp.html.
10+
new_http_archive(
11+
name="gtest",
12+
url="https://github.com/google/googletest/archive/release-1.7.0.zip",
13+
sha256="b58cb7547a28b2c718d1e38aee18a3659c9e3ff52440297e965f5edffe34b6d0",
14+
build_file="third_party/gtest.BUILD",
15+
strip_prefix="googletest-release-1.7.0")
16+
17+
# External dependency to gflags. This method comes from
18+
# https://github.com/gflags/example/blob/master/WORKSPACE.
19+
new_git_repository(
20+
name="gflags",
21+
tag="v2.2.0",
22+
remote="https://github.com/gflags/gflags.git",
23+
build_file="third_party/gflags.BUILD")
24+
25+
# External dependency to glog. This method comes from
26+
# https://github.com/reyoung/bazel_playground/blob/master/WORKSPACE
27+
new_git_repository(
28+
name="glog",
29+
remote="https://github.com/google/glog.git",
30+
commit="b6a5e0524c28178985f0d228e9eaa43808dbec3c",
31+
build_file="third_party/glog.BUILD")

benchmark/tensorflow/rnn/run_multi.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ test 4 2 256 512
2525
test 4 2 512 128
2626
test 4 2 512 256
2727
test 4 2 512 512
28-

cmake/FindSphinx.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +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
7576
)
7677

7778
set_property(
@@ -143,4 +144,4 @@ function( Sphinx_add_targets target_base_name conf source base_destination )
143144

144145
add_dependencies( ${target_base_name}_linkcheck ${_dependencies} )
145146
endif()
146-
endfunction()
147+
endfunction()

0 commit comments

Comments
 (0)