Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
bd64719a
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bd64719a
编写于
1月 29, 2018
作者:
T
typhoonzero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update for today
上级
7aed1c13
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
54 addition
and
34 deletion
+54
-34
benchmark/cluster/vgg16/README.md
benchmark/cluster/vgg16/README.md
+30
-14
benchmark/cluster/vgg16/fluid_trainer.yaml
benchmark/cluster/vgg16/fluid_trainer.yaml
+1
-1
benchmark/cluster/vgg16/v2_trainer.yaml
benchmark/cluster/vgg16/v2_trainer.yaml
+1
-1
benchmark/cluster/vgg16/vgg16_fluid.py
benchmark/cluster/vgg16/vgg16_fluid.py
+21
-18
benchmark/cluster/vgg16/vgg16_v2.py
benchmark/cluster/vgg16/vgg16_v2.py
+1
-0
未找到文件。
benchmark/cluster/vgg16/README.md
浏览文件 @
bd64719a
...
...
@@ -2,41 +2,57 @@
## Test Result
### Single node single thread
### Hardware Infomation
-
CPU: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
-
cpu MHz : 2101.000
-
cache size : 20480 KB
### Single Node Single Thread
-
PServer Count: 10
-
Trainer Count: 20
-
Metrics: samples / sec
| Batch Size | 32 | 64 | 128 | 256 |
| -- | -- | -- | -- | -- |
| PaddlePaddle Fluid |
- | - | 16.74 | -
|
| PaddlePaddle v2 |
- | - | 17.60 | -
|
| PaddlePaddle Fluid |
15.44 | 16.32 | 16.74 | 16.79
|
| PaddlePaddle v2 |
15.97 | 17.04 | 17.60 | 17.83
|
| TensorFlow | - | - | - | - |
### different batch size
-
PServer Count: 10
-
Trainer Count: 20
-
Per trainer CPU Core: 1
-
Metrics: samples / sec
| Batch Size | 32 | 64 | 128 | 256 |
| -- | -- | -- | -- | -- |
| PaddlePaddle Fluid |
- | 247.40 | - | -
|
| PaddlePaddle v2 |
- | - | 256.14 | -
|
| PaddlePaddle Fluid |
190.20 | 222.15 | 247.40 | 258.18
|
| PaddlePaddle v2 |
170.96 | 233.71 | 256.14 | 329.23
|
| TensorFlow | - | - | - | - |
### different pserver number
-
Trainer Count: 100
-
Batch Size: 64
-
Metrics: mini-batch / sec
### Accelerate rate
| PServer Count | 10 | 20 | 40 | 60 |
-
Pserver Count: 20
-
Batch Size: 128
-
Metrics: samples / sec
| Trainer Counter | 20 | 40 | 80 | 100 |
| -- | -- | -- | -- | -- |
| PaddlePaddle Fluid |
- | - | - | -
|
| PaddlePaddle v2 |
- | - | - | -
|
| PaddlePaddle Fluid |
291.06 | 518.80 | 836.26 | 1019.29
|
| PaddlePaddle v2 |
356.28 | - | - | 1041.99
|
| TensorFlow | - | - | - | - |
###
Accelerate rate
###
different pserver number
| Trainer Counter | 20 | 40 | 80 | 100 |
-
Trainer Count: 100
-
Batch Size: 128
-
Metrics: mini-batch / sec
| PServer Count | 10 | 20 | 40 | 60 |
| -- | -- | -- | -- | -- |
| PaddlePaddle Fluid | - | - | - | - |
| PaddlePaddle v2 | - | - | - | - |
...
...
benchmark/cluster/vgg16/fluid_trainer.yaml
浏览文件 @
bd64719a
...
...
@@ -30,7 +30,7 @@ spec:
-
name
:
TOPOLOGY
value
:
"
"
-
name
:
ENTRY
value
:
"
MKL_NUM_THREADS=1
python
/workspace/vgg16_fluid.py
--local
0
--batch_size
128
"
value
:
"
MKL_NUM_THREADS=1
python
/workspace/vgg16_fluid.py
--local
0
--batch_size
256
"
-
name
:
TRAINER_PACKAGE
value
:
"
/workspace"
-
name
:
PADDLE_INIT_PORT
...
...
benchmark/cluster/vgg16/v2_trainer.yaml
浏览文件 @
bd64719a
...
...
@@ -22,7 +22,7 @@ spec:
-
name
:
PADDLE_JOB_NAME
value
:
vgg16v2job
-
name
:
BATCH_SIZE
value
:
"
128
"
value
:
"
256
"
-
name
:
TRAINERS
value
:
"
20"
-
name
:
PSERVERS
...
...
benchmark/cluster/vgg16/vgg16_fluid.py
浏览文件 @
bd64719a
...
...
@@ -20,6 +20,7 @@ import numpy as np
import
paddle.v2
as
paddle
import
paddle.v2.fluid
as
fluid
import
paddle.v2.fluid.core
as
core
import
paddle.v2.fluid.profiler
as
profiler
import
argparse
import
functools
import
os
...
...
@@ -160,24 +161,25 @@ def main():
start_time
=
time
.
time
()
num_samples
=
0
accuracy
.
reset
(
exe
)
for
batch_id
,
data
in
enumerate
(
train_reader
()):
ts
=
time
.
time
()
img_data
=
np
.
array
(
map
(
lambda
x
:
x
[
0
].
reshape
(
data_shape
),
data
)).
astype
(
"float32"
)
y_data
=
np
.
array
(
map
(
lambda
x
:
x
[
1
],
data
)).
astype
(
"int64"
)
y_data
=
y_data
.
reshape
([
-
1
,
1
])
loss
,
acc
=
exe
.
run
(
trainer_prog
,
feed
=
{
"pixel"
:
img_data
,
"label"
:
y_data
},
fetch_list
=
[
avg_cost
]
+
accuracy
.
metrics
)
iters
+=
1
num_samples
+=
len
(
data
)
print
(
"Pass = %d, Iters = %d, Loss = %f, Accuracy = %f, spent %f"
%
(
pass_id
,
iters
,
loss
,
acc
,
time
.
time
()
-
ts
)
)
# The accuracy is the accumulation of batches, but not the current batch.
with
profiler
.
profiler
(
"CPU"
,
'total'
)
as
prof
:
for
batch_id
,
data
in
enumerate
(
train_reader
()):
ts
=
time
.
time
()
img_data
=
np
.
array
(
map
(
lambda
x
:
x
[
0
].
reshape
(
data_shape
),
data
)).
astype
(
"float32"
)
y_data
=
np
.
array
(
map
(
lambda
x
:
x
[
1
],
data
)).
astype
(
"int64"
)
y_data
=
y_data
.
reshape
([
-
1
,
1
])
loss
,
acc
=
exe
.
run
(
trainer_prog
,
feed
=
{
"pixel"
:
img_data
,
"label"
:
y_data
},
fetch_list
=
[
avg_cost
]
+
accuracy
.
metrics
)
iters
+=
1
num_samples
+=
len
(
data
)
print
(
"Pass = %d, Iters = %d, Loss = %f, Accuracy = %f, spent %f"
%
(
pass_id
,
iters
,
loss
,
acc
,
time
.
time
()
-
ts
)
)
# The accuracy is the accumulation of batches, but not the current batch.
pass_elapsed
=
time
.
time
()
-
start_time
pass_train_acc
=
accuracy
.
eval
(
exe
)
...
...
@@ -211,6 +213,7 @@ def main():
pserver_endpoints
=
","
.
join
(
eplist
)
print
(
"pserver endpoints: "
,
pserver_endpoints
)
trainers
=
int
(
os
.
getenv
(
"TRAINERS"
))
# total trainer count
print
(
"trainers total: "
,
trainers
)
current_endpoint
=
os
.
getenv
(
"POD_IP"
)
+
":6174"
# current pserver endpoint
training_role
=
os
.
getenv
(
...
...
benchmark/cluster/vgg16/vgg16_v2.py
浏览文件 @
bd64719a
...
...
@@ -26,6 +26,7 @@ if BATCH_SIZE:
BATCH_SIZE
=
int
(
BATCH_SIZE
)
else
:
BATCH_SIZE
=
128
print
"batch_size"
,
BATCH_SIZE
NODE_COUNT
=
int
(
os
.
getenv
(
"TRAINERS"
))
ts
=
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录