Skip to content

Commit 945ad8d

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into resnet
2 parents 30b57ee + 0a4a66f commit 945ad8d

File tree

116 files changed

+5205
-1156
lines changed

Some content is hidden

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

116 files changed

+5205
-1156
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ include(external/swig) # download, build, install swig
126126
include(external/warpctc) # download, build, install warpctc
127127
include(external/any) # download libn::any
128128
include(external/eigen) # download eigen3
129-
include(external/pybind11) # download pybind11
129+
include(external/pybind11) # download pybind11
130130
include(external/nccl)
131131

132132
include(cudnn) # set cudnn libraries, must before configure

cmake/cross_compiling/ios.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ if(NOT DEFINED IOS_ARCH)
7979
# FIXME(liuyiqun): support "armv7;armv7s;arm64" future
8080
set(IOS_ARCH "arm64")
8181
elseif(IOS_PLATFORM STREQUAL "SIMULATOR")
82-
set(IOS_ARCH "i386;x86_64")
83-
elseif(IOS_PLATFORM STREQUAL "WATCHOS")
84-
set(IOS_ARCH armv7k)
82+
# FIXME(liuyiqun): support "i386;x86_64" future
83+
set(IOS_ARCH "x86_64")
8584
endif()
8685
endif()
8786
set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string "Build architecture for iOS")

cmake/external/nccl.cmake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
if(NOT WITH_GPU)
16+
return()
17+
endif()
18+
119
include(ExternalProject)
220

321
set(NCCL_SOURCE_DIR ${THIRD_PARTY_PATH}/nccl)

cmake/external/openblas.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

cmake/external/pybind11.cmake

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
INCLUDE(ExternalProject)
1+
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
214

3-
SET(PYBIND_SOURCE_DIR ${THIRD_PARTY_PATH}/pybind)
15+
if(NOT WITH_PYTHON)
16+
return()
17+
endif()
18+
19+
include(ExternalProject)
420

5-
INCLUDE_DIRECTORIES(${PYBIND_SOURCE_DIR}/src/extern_pybind/include)
21+
set(PYBIND_SOURCE_DIR ${THIRD_PARTY_PATH}/pybind)
22+
23+
include_directories(${PYBIND_SOURCE_DIR}/src/extern_pybind/include)
624

725
ExternalProject_Add(
826
extern_pybind
@@ -17,14 +35,12 @@ ExternalProject_Add(
1735
TEST_COMMAND ""
1836
)
1937

20-
if (${CMAKE_VERSION} VERSION_LESS "3.3.0")
38+
if(${CMAKE_VERSION} VERSION_LESS "3.3.0")
2139
set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/pybind_dummy.c)
22-
file(WRITE ${dummyfile} "const char * dummy_any = \"${dummyfile}\";")
40+
file(WRITE ${dummyfile} "const char * dummy_pybind = \"${dummyfile}\";")
2341
add_library(pybind STATIC ${dummyfile})
2442
else()
2543
add_library(pybind INTERFACE)
2644
endif()
2745

2846
add_dependencies(pybind extern_pybind)
29-
30-
LIST(APPEND external_project_dependencies pybind)

cmake/external/swig.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

cmake/external/zlib.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

cmake/simd.cmake

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
# This file is use to check all support level of AVX on your machine
22
# so that PaddlePaddle can unleash the vectorization power of muticore.
33

4-
INCLUDE(CheckCXXSourceRuns)
5-
INCLUDE(CheckCXXSourceCompiles)
4+
include(CheckCXXSourceRuns)
5+
include(CheckCXXSourceCompiles)
66

7-
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
7+
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
88
set(MMX_FLAG "-mmmx")
99
set(SSE2_FLAG "-msse2")
1010
set(SSE3_FLAG "-msse3")
11-
SET(AVX_FLAG "-mavx")
12-
SET(AVX2_FLAG "-mavx2")
13-
ELSEIF(MSVC)
11+
set(AVX_FLAG "-mavx")
12+
set(AVX2_FLAG "-mavx2")
13+
elseif(MSVC)
1414
set(MMX_FLAG "/arch:MMX")
1515
set(SSE2_FLAG "/arch:SSE2")
1616
set(SSE3_FLAG "/arch:SSE3")
1717
SET(AVX_FLAG "/arch:AVX")
1818
SET(AVX2_FLAG "/arch:AVX2")
19-
ENDIF()
19+
endif()
2020

2121
set(CMAKE_REQUIRED_FLAGS_RETAINED ${CMAKE_REQUIRED_FLAGS})
2222

2323
# Check MMX
2424
set(CMAKE_REQUIRED_FLAGS ${MMX_FLAG})
25+
set(MMX_FOUND_EXITCODE 1 CACHE STRING "Result from TRY_RUN" FORCE)
2526
CHECK_CXX_SOURCE_RUNS("
2627
#include <mmintrin.h>
2728
int main()
@@ -32,6 +33,7 @@ int main()
3233

3334
# Check SSE2
3435
set(CMAKE_REQUIRED_FLAGS ${SSE2_FLAG})
36+
set(SSE2_FOUND_EXITCODE 1 CACHE STRING "Result from TRY_RUN" FORCE)
3537
CHECK_CXX_SOURCE_RUNS("
3638
#include <emmintrin.h>
3739
int main()
@@ -42,6 +44,7 @@ int main()
4244

4345
# Check SSE3
4446
set(CMAKE_REQUIRED_FLAGS ${SSE3_FLAG})
47+
set(SSE3_FOUND_EXITCODE 1 CACHE STRING "Result from TRY_RUN" FORCE)
4548
CHECK_CXX_SOURCE_RUNS("
4649
#include <pmmintrin.h>
4750
int main()
@@ -55,6 +58,7 @@ int main()
5558

5659
# Check AVX
5760
set(CMAKE_REQUIRED_FLAGS ${AVX_FLAG})
61+
set(AVX_FOUND_EXITCODE 1 CACHE STRING "Result from TRY_RUN" FORCE)
5862
CHECK_CXX_SOURCE_RUNS("
5963
#include <immintrin.h>
6064
int main()
@@ -67,6 +71,7 @@ int main()
6771

6872
# Check AVX 2
6973
set(CMAKE_REQUIRED_FLAGS ${AVX2_FLAG})
74+
set(AVX2_FOUND_EXITCODE 1 CACHE STRING "Result from TRY_RUN" FORCE)
7075
CHECK_CXX_SOURCE_RUNS("
7176
#include <immintrin.h>
7277
int main()

doc/getstarted/build_and_install/docker_install_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ PaddlePaddle发布新版本的时候都会发布对应版本的生产镜像以
145145

146146
Jupyter Notebook是一个开源的web程序,大家可以通过它制作和分享带有代码、公式、图表、文字的交互式文档。用户可以通过网页浏览文档。
147147

148-
PaddlePaddle Book是为用户和开发者制作的一个交互式的Jupyter Nodebook
148+
PaddlePaddle Book是为用户和开发者制作的一个交互式的Jupyter Notebook
149149
如果您想要更深入了解deep learning,PaddlePaddle Book一定是您最好的选择。
150150

151151
我们提供可以直接运行PaddlePaddle Book的Docker镜像,直接运行:

doc/howto/usage/cmd_parameter/arguments_cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
</tr>
6464

6565
<tr>
66-
<td class="left" rowspan="15">训练</td><td class="left">dot_period</td>
66+
<td class="left" rowspan="14">训练</td><td class="left">dot_period</td>
6767
<td class="left">√</td><td class="left">√</td><td class="left"></td><td class="left"></td>
6868
</tr>
6969

0 commit comments

Comments
 (0)