Skip to content

Commit 63f5e47

Browse files
committed
Merge branch 'wanghaoshuang-fix_seq' into develop
2 parents d89061c + a60b3a5 commit 63f5e47

File tree

501 files changed

+10438
-4242
lines changed

Some content is hidden

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

501 files changed

+10438
-4242
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ cmake_install.cmake
2828
paddle/.timestamp
2929
python/paddlepaddle.egg-info/
3030
paddle/pybind/pybind.h
31+
python/paddle/version.py

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ cmake_minimum_required(VERSION 3.0)
1616
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
1717
set(PADDLE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
1818
set(PADDLE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
19+
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
20+
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
1921

2022
include(system)
2123

2224
project(paddle CXX C Go)
25+
message(STATUS "CXX compiler: " ${CMAKE_CXX_COMPILER} ", version: " ${CMAKE_CXX_COMPILER_VERSION})
26+
message(STATUS "C compiler: " ${CMAKE_C_COMPILER} ", version: " ${CMAKE_C_COMPILER_VERSION})
2327

2428
find_package(Sphinx)
2529
if(NOT CMAKE_CROSSCOMPILING)
@@ -56,6 +60,7 @@ option(GLIDE_INSTALL "Download and install go dependencies " ON)
5660
option(USE_NNPACK "Compile PaddlePaddle with NNPACK library" OFF)
5761
option(WITH_DISTRIBUTE "Compile with grpc distributed support" OFF)
5862
option(USE_EIGEN_FOR_BLAS "Use matrix multiplication in Eigen" OFF)
63+
option(WITH_ARM_FP16 "Use half precision support on armv8.2-a cpu" OFF)
5964

6065
# CMAKE_BUILD_TYPE
6166
if(NOT CMAKE_BUILD_TYPE)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Please refer to our [release announcement](https://github.com/PaddlePaddle/Paddl
3636
examples:
3737

3838
- Optimized math operations through SSE/AVX intrinsics, BLAS libraries
39-
(e.g. MKL, ATLAS, cuBLAS) or customized CPU/GPU kernels.
39+
(e.g. MKL, OpenBLAS, cuBLAS) or customized CPU/GPU kernels.
4040
- Highly optimized recurrent networks which can handle **variable-length**
4141
sequence without padding.
4242
- Optimized local and distributed training for models with high dimensional

RELEASE.cn.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
1+
# v0.11.0版本
2+
3+
## PaddlePaddle Fluid
4+
5+
- PaddlePaddle发布版本v0.11.0包含一个新的特性*PaddlePaddle Fluid*. Fluid 是设计用来让用户像Pytorch和Tensorflow Eager Execution一样执行程序。在这些系统中,不再有*模型*这个概念,应用也不再包含一个用于描述Operator图或者一系列层的符号描述,而是像通用程序那样描述训练或者预测的过程。而Fluid与PyTorch或Eager Execution的区别在于Fluid不依赖Python提供的控制流,例如 if-else-then或者for,而是提供了基于C++实现的控制流并暴露了对应的用with语法实现的Python接口。例如:
6+
7+
https://github.com/PaddlePaddle/Paddle/blob/3df78ed2a98d37f7ae6725894cc7514effd5664b/python/paddle/v2/fluid/tests/test_while_op.py#L36-L44
8+
9+
- 在v0.11.0版本中,我们提供了一个C++类`Executor`用于运行一个Fluid程序。Executor类似一个解释器。在未来的版本中,我们将提升和优化Executor成为一个调试器,就像GDB。并可能提供一些编译器,这个编译器会读取一个上文所描述的应用然后编译成一个等价的
10+
源代码,这个源代码可以被nvcc编译成可以使用CUDA的二进制,或者被icc编译成可以充分利用Intel CPU的二进制。
11+
12+
13+
## 新特点
14+
15+
* 发布 `PaddlePaddle Fluid`
16+
* 增加了用于模型预测的C-API。
17+
* 用Fluid API实现了一个简单的GAN的例子。
18+
* 增加了关于性能调优的文档。
19+
*`paddle.v2.dataset`下载数据集提供了重试机制.
20+
* C++中使用protobuf-lite替换protobuf减少了二进制的大小。
21+
* 发布了新特性 [Elastic Deep Learning (EDL)](https://github.com/PaddlePaddle/cloud/tree/develop/doc/autoscale/experiment).
22+
* 基于Bazel API利用cmake实现了一个的新的构建系统函数库。
23+
* 当使用编译选项`WITH_MKL=ON`时自动下载和编译Intel® [MKLML](https://github.com/01org/mkl-dnn/releases/download/v0.11/mklml_lnx_2018.0.1.20171007.tgz) 函数库.
24+
* [Intel® MKL-DNN on PaddlePaddle](https://github.com/PaddlePaddle/Paddle/tree/develop/doc/design/mkldnn):
25+
- 完成了 11个 MKL-DNN 层: Convolution, Fully connectivity, Pooling, ReLU, Tanh, ELU, Softmax, BatchNorm, AddTo, Concat, LRN。
26+
- 完成了 3个 MKL-DNN 网络: VGG-19, ResNet-50, GoogleNet
27+
- 基于Intel Skylake 6148 CPU的[性能测试](https://github.com/PaddlePaddle/Paddle/blob/develop/benchmark/IntelOptimizedPaddle.md) : 相对于MKLML有2~3倍的训练加速。
28+
* 增加 [softsign activation](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/activation.html#softsign)
29+
* 增加 [dot product layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#dot-prod)
30+
* 增加 [L2 distance layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#l2-distance)
31+
* 增加 [sub-nested sequence layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#sub-nested-seq)
32+
* 增加 [kmax sequence score layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#kmax-sequence-score)
33+
* 增加 [sequence slice layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#seq-slice)
34+
* 增加 [row convolution layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#row-conv)
35+
* 增加移动端友好的网页
36+
37+
## 改进
38+
39+
* 使用一个Python`whl`包即可安装.
40+
* [V2 API可以实现用户定制化评估](https://github.com/PaddlePaddle/models/tree/develop/ltr#训练过程中输出自定义评估指标)
41+
*`PADDLE_ONLY_CPU` 改为 `PADDLE_WITH_GPU`, 因为我们会支持多种设备。
42+
* 删除了有一些bug的BarrierStat。
43+
* 清理和删除了paddle::Parameter中未使用的函数。
44+
* 删除了ProtoDataProvider。
45+
* Huber loss同时支持回归和分类。
46+
* 为sequence pooling 层增加`stride`参数。
47+
* v2 API自动使用cudnn batch normalization。
48+
* 可以使用一个固定的参数名共享BN层的参数。
49+
* 2D convolution operation支持variable-dimension input特性。
50+
* 重构cmake中关于CUDA的部分并实现自动检测GPU架构的功能。
51+
* 优化网页导航。
52+
53+
## 错误修复
54+
55+
* 修复ROI pooling的Bug. cc9a761
56+
* 修复当label是dense vector是AUC变成0的问题. #5274
57+
* 修复WarpCTC 层的Bug.
58+
59+
160
# v0.10.0版本
261

362
我们非常高兴发布了PaddlePaddle V0.10.0版,并开发了新的[Python API](http://research.baidu.com/paddlepaddles-new-api-simplifies-deep-learning-programs/)

RELEASE.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,75 @@
1+
# Release v0.11.0
2+
3+
## PaddlePaddle Fluid
4+
5+
- Release 0.11.0 includes a new feature *PaddlePaddle Fluid*. Fluid is
6+
designed to allow users to program like PyTorch and TensorFlow Eager Execution.
7+
In these systems, there is no longer the concept *model* and applications
8+
do not include a symbolic description of a graph of operators nor a sequence
9+
of layers. Instead, applications look exactly like a usual program that
10+
describes a process of training or inference. The difference between
11+
Fluid and PyTorch or Eager Execution is that Fluid doesn't rely on Python's
12+
control-flow, `if-then-else` nor `for`. Instead, Fluid provides its
13+
C++ implementations and their Python binding using the `with` statement. For an example
14+
15+
https://github.com/PaddlePaddle/Paddle/blob/3df78ed2a98d37f7ae6725894cc7514effd5664b/python/paddle/v2/fluid/tests/test_while_op.py#L36-L44
16+
17+
- In 0.11.0, we provides a C++ class `Executor` to run a Fluid program.
18+
Executor works like an interpreter. In future version, we will improve
19+
`Executor` into a debugger like GDB, and we might provide some compilers,
20+
which, for example, takes an application like the above one, and outputs
21+
an equivalent C++ source program, which can be compiled using
22+
[`nvcc`](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html)
23+
to generate binaries that use CUDA, or using
24+
[`icc`](https://software.intel.com/en-us/c-compilers) to generate binaries
25+
that make full use of Intel CPUs.
26+
27+
## New Features
28+
29+
* Release `PaddlePaddle Fluid`.
30+
* Add C-API for model inference
31+
* Use fluid API to create a simple GAN demo.
32+
* Add develop guide about performance tunning.
33+
* Add retry when download `paddle.v2.dataset`.
34+
* Linking protobuf-lite not protobuf in C++. Reduce the binary size.
35+
* Feature [Elastic Deep Learning (EDL)](https://github.com/PaddlePaddle/cloud/tree/develop/doc/autoscale/experiment) released.
36+
* A new style cmake functions for Paddle. It is based on Bazel API.
37+
* Automatically download and compile with Intel® [MKLML](https://github.com/01org/mkl-dnn/releases/download/v0.11/mklml_lnx_2018.0.1.20171007.tgz) library as CBLAS when build `WITH_MKL=ON`.
38+
* [Intel® MKL-DNN on PaddlePaddle](https://github.com/PaddlePaddle/Paddle/tree/develop/doc/design/mkldnn):
39+
- Complete 11 MKL-DNN layers: Convolution, Fully connectivity, Pooling, ReLU, Tanh, ELU, Softmax, BatchNorm, AddTo, Concat, LRN.
40+
- Complete 3 MKL-DNN networks: VGG-19, ResNet-50, GoogleNet
41+
- [Benchmark](https://github.com/PaddlePaddle/Paddle/blob/develop/benchmark/IntelOptimizedPaddle.md) on Intel Skylake 6148 CPU: 2~3x training speedup compared with MKLML.
42+
* Add the [`softsign` activation](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/activation.html#softsign).
43+
* Add the [dot product layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#dot-prod).
44+
* Add the [L2 distance layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#l2-distance).
45+
* Add the [sub-nested sequence layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#sub-nested-seq).
46+
* Add the [kmax sequence score layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#kmax-sequence-score).
47+
* Add the [sequence slice layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#seq-slice).
48+
* Add the [row convolution layer](http://www.paddlepaddle.org/docs/develop/documentation/zh/api/v2/config/layer.html#row-conv)
49+
* Add mobile friendly webpages.
50+
51+
## Improvements
52+
53+
* Build and install using a single `whl` package.
54+
* [Custom evaluating in V2 API](https://github.com/PaddlePaddle/models/tree/develop/ltr#训练过程中输出自定义评估指标).
55+
* Change `PADDLE_ONLY_CPU` to `PADDLE_WITH_GPU`, since we will support many kinds of devices.
56+
* Remove buggy BarrierStat.
57+
* Clean and remove unused functions in paddle::Parameter.
58+
* Remove ProtoDataProvider.
59+
* Huber loss supports both regression and classification.
60+
* Add the `stride` parameter for sequence pooling layers.
61+
* Enable v2 API use cudnn batch normalization automatically.
62+
* The BN layer's parameter can be shared by a fixed the parameter name.
63+
* Support variable-dimension input feature for 2D convolution operation.
64+
* Refine cmake about CUDA to automatically detect GPU architecture.
65+
* Improved website navigation.
66+
67+
## Bug Fixes
68+
69+
* Fix bug in ROI pooling. cc9a761
70+
* Fix AUC is zero when label is dense vector. #5274
71+
* Fix bug in WarpCTC layer.
72+
173
# Release v0.10.0
274

375
We are glad to release version 0.10.0. In this version, we are happy to release the new

benchmark/IntelOptimizedPaddle.md

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,25 @@
22

33
Machine:
44

5-
- Server
6-
- Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz, 2 Sockets, 20 Cores per socket
7-
- Laptop
8-
- DELL XPS15-9560-R1745: i7-7700HQ 8G 256GSSD
9-
- i5 MacBook Pro (Retina, 13-inch, Early 2015)
10-
- Desktop
11-
- i7-6700k
5+
- Server: Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz, 2 Sockets, 20 Cores per socket
6+
- Laptop: TBD
127

138
System: CentOS release 6.3 (Final), Docker 1.12.1.
149

15-
PaddlePaddle: paddlepaddle/paddle:latest (for MKLML and MKL-DNN), paddlepaddle/paddle:latest-openblas (for OpenBLAS)
16-
- MKL-DNN tag v0.11
17-
- MKLML 2018.0.1.20171007
18-
- OpenBLAS v0.2.20
19-
(TODO: will rerun after 0.11.0)
10+
PaddlePaddle: (TODO: will rerun after 0.11.0)
11+
- paddlepaddle/paddle:latest (for MKLML and MKL-DNN)
12+
- MKL-DNN tag v0.11
13+
- MKLML 2018.0.1.20171007
14+
- paddlepaddle/paddle:latest-openblas (for OpenBLAS)
15+
- OpenBLAS v0.2.20
2016

2117
On each machine, we will test and compare the performance of training on single node using MKL-DNN / MKLML / OpenBLAS respectively.
2218

2319
## Benchmark Model
2420

2521
### Server
22+
23+
#### Training
2624
Test on batch size 64, 128, 256 on Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
2725

2826
Input image size - 3 * 224 * 224, Time: images/second
@@ -35,9 +33,7 @@ Input image size - 3 * 224 * 224, Time: images/second
3533
| MKLML | 12.12 | 13.70 | 16.18 |
3634
| MKL-DNN | 28.46 | 29.83 | 30.44 |
3735

38-
39-
chart on batch size 128
40-
TBD
36+
<img src="figs/vgg-cpu-train.png" width="500">
4137

4238
- ResNet-50
4339

@@ -47,9 +43,7 @@ TBD
4743
| MKLML | 32.52 | 31.89 | 33.12 |
4844
| MKL-DNN | 81.69 | 82.35 | 84.08 |
4945

50-
51-
chart on batch size 128
52-
TBD
46+
<img src="figs/resnet-cpu-train.png" width="500">
5347

5448
- GoogLeNet
5549

@@ -59,10 +53,35 @@ TBD
5953
| MKLML | 128.46| 137.89| 158.63 |
6054
| MKL-DNN     | 250.46| 264.83| 269.50 |
6155

62-
chart on batch size 128
63-
TBD
56+
<img src="figs/googlenet-cpu-train.png" width="500">
57+
58+
#### Inference
59+
Test on batch size 1, 2, 4, 8, 16 on Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
60+
- VGG-19
61+
62+
| BatchSize | 1 | 2 | 4 | 8 | 16 |
63+
|-----------|-------|-------|-------|-------|-------|
64+
| OpenBLAS | 1.07 | 1.08 | 1.06 | 0.88 | 0.65 |
65+
| MKLML | 5.58 | 9.80 | 15.15 | 21.21 | 28.67 |
66+
| MKL-DNN | 75.07 | 88.64 | 82.58 | 92.29 | 96.75 |
67+
68+
- ResNet-50
69+
70+
| BatchSize | 1 | 2 | 4 | 8 | 16 |
71+
|-----------|-------|--------|--------|--------|--------|
72+
| OpenBLAS | 3.35 | 3.19 | 3.09 | 2.55 | 1.96 |
73+
| MKLML | 6.33 | 12.02 | 22.88 | 40.53 | 63.09 |
74+
| MKL-DNN | 107.83| 148.84 | 177.78 | 189.35 | 217.69 |
75+
76+
77+
- GoogLeNet
78+
79+
| BatchSize | 1 | 2 | 4 | 8 | 16 |
80+
|-----------|--------|--------|--------|--------|--------|
81+
| OpenBLAS | 12.04 | 11.31 | 10.00 | 9.07 | 4.34 |
82+
| MKLML | 22.74 | 41.56 | 81.22 | 133.47 | 210.53 |
83+
| MKL-DNN | 175.10 | 272.92 | 450.70 | 512.00 | 600.94 |
84+
6485

6586
### Laptop
6687
TBD
67-
### Desktop
68-
TBD
17.8 KB
Loading

benchmark/figs/resnet-cpu-train.png

19.8 KB
Loading

benchmark/figs/vgg-cpu-train.png

17.9 KB
Loading

benchmark/paddle/image/run_mkldnn_infer.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function clock_to_seconds() {
44
hours=`echo $1 | awk -F ':' '{print $1}'`
55
mins=`echo $1 | awk -F ':' '{print $2}'`
66
secs=`echo $1 | awk -F ':' '{print $3}'`
7-
echo `bc -l <<< "$secs + $mins * 60 + $hours * 3600"`
7+
echo `awk 'BEGIN{printf "%.2f",('$secs' + '$mins' * 60 + '$hours' * 3600)}'`
88
}
99

1010
function infer() {
@@ -58,9 +58,9 @@ function infer() {
5858
end=`tail ${log} -n 2 | head -n 1 | awk -F ' ' '{print $2}' | xargs`
5959
start_sec=`clock_to_seconds $start`
6060
end_sec=`clock_to_seconds $end`
61-
fps=`bc <<< "scale = 2; 1280 / ($end_sec - $start_sec)"`
61+
fps=`awk 'BEGIN{printf "%.2f",(1280 / ('$end_sec' - '$start_sec'))}'`
6262
echo "Last 1280 samples start: ${start}(${start_sec} sec), end: ${end}(${end_sec} sec;" >> ${log}
63-
echo "FPS: $fps images/sec" >> ${log}
63+
echo "FPS: $fps images/sec" 2>&1 | tee -a ${log}
6464
}
6565

6666
if [ ! -f "train.list" ]; then

0 commit comments

Comments
 (0)