Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Oneflow-Inc
OneFlow-Benchmark
提交
fe1e78e0
O
OneFlow-Benchmark
项目概览
Oneflow-Inc
/
OneFlow-Benchmark
上一次同步 接近 3 年
通知
1
Star
92
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OneFlow-Benchmark
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fe1e78e0
编写于
9月 29, 2021
作者:
O
ouyangyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use Environment Variable ONEFLOW_COMM_NET_IB_ENABLE
上级
302fa6a8
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
4 addition
and
15 deletion
+4
-15
Classification/cnns/config.py
Classification/cnns/config.py
+0
-3
Classification/cnns/of_cnn_train_val.py
Classification/cnns/of_cnn_train_val.py
+0
-3
Classification/cnns/train_fp16.sh
Classification/cnns/train_fp16.sh
+1
-0
LanguageModeling/GPT/README.md
LanguageModeling/GPT/README.md
+1
-1
LanguageModeling/GPT/examples/pretrain.sh
LanguageModeling/GPT/examples/pretrain.sh
+1
-1
LanguageModeling/GPT/oneflow_gpt/config.py
LanguageModeling/GPT/oneflow_gpt/config.py
+1
-5
LanguageModeling/GPT/oneflow_gpt/training.py
LanguageModeling/GPT/oneflow_gpt/training.py
+0
-2
未找到文件。
Classification/cnns/config.py
浏览文件 @
fe1e78e0
...
...
@@ -113,9 +113,6 @@ def get_parser(parser=None):
parser
.
add_argument
(
"--batch_size_per_device"
,
type
=
int
,
default
=
64
)
parser
.
add_argument
(
"--val_batch_size_per_device"
,
type
=
int
,
default
=
8
)
parser
.
add_argument
(
"--use_rdma"
,
type
=
str2bool
,
nargs
=
"?"
,
const
=
True
,
help
=
"Use rdma."
,
)
parser
.
add_argument
(
"--nccl_fusion_threshold_mb"
,
type
=
int
,
...
...
Classification/cnns/of_cnn_train_val.py
浏览文件 @
fe1e78e0
...
...
@@ -64,9 +64,6 @@ if args.nccl_fusion_threshold_mb:
if
args
.
nccl_fusion_max_ops
:
flow
.
config
.
collective_boxing
.
nccl_fusion_max_ops
(
args
.
nccl_fusion_max_ops
)
if
args
.
num_nodes
>
1
and
args
.
use_rdma
:
flow
.
config
.
use_rdma
(
True
)
def
label_smoothing
(
labels
,
classes
,
eta
,
dtype
):
assert
classes
>
0
...
...
Classification/cnns/train_fp16.sh
浏览文件 @
fe1e78e0
...
...
@@ -24,6 +24,7 @@ export PYTHONUNBUFFERED=1
echo
PYTHONUNBUFFERED
=
$PYTHONUNBUFFERED
export
NCCL_LAUNCH_MODE
=
PARALLEL
echo
NCCL_LAUNCH_MODE
=
$NCCL_LAUNCH_MODE
export
ONEFLOW_COMM_NET_IB_ENABLE
=
1
python3 of_cnn_train_val.py
\
--train_data_dir
=
$DATA_ROOT
/train
\
...
...
LanguageModeling/GPT/README.md
浏览文件 @
fe1e78e0
...
...
@@ -173,7 +173,7 @@ python3 tools/launch_container.py \
bash examples/pretrain_1n8d_2x4x1_16_1536x16.sh
```
如果需要进一步扩充设备数量,由于单台机器适配的 GPU 设备数量有限,我们需要更多的物理机器 node。此时,我们需要配置
`--num-nodes`
和
`--node-ips`
参数,并且分别在每台机器上启动训练命令(
`traning.py`
)。同时在有 rdma 的环境中,可以开启
`
--use-rdma
`
来带来更佳的训练效率。以下是4机8卡下,各种并行方式混合的示例:
如果需要进一步扩充设备数量,由于单台机器适配的 GPU 设备数量有限,我们需要更多的物理机器 node。此时,我们需要配置
`--num-nodes`
和
`--node-ips`
参数,并且分别在每台机器上启动训练命令(
`traning.py`
)。同时在有 rdma 的环境中,可以开启
`
export ONEFLOW_COMM_NET_IB_ENABLE=1
`
来带来更佳的训练效率。以下是4机8卡下,各种并行方式混合的示例:
```
bash examples/distribute_pretrain_4n8d_2x4x4_512_2304x24.sh
...
...
LanguageModeling/GPT/examples/pretrain.sh
浏览文件 @
fe1e78e0
...
...
@@ -84,7 +84,7 @@ cmd+=" --multihead-attention-fusion"
cmd+
=
" --fp16"
if
[[
${
num_nodes
}
-gt
1
]]
;
then
cmd+
=
" --use-rdma"
export
ONEFLOW_COMM_NET_IB_ENABLE
=
1
fi
if
[[
!
-z
"
${
ONEFLOW_GTP_PROFILE_FILE
}
"
]]
;
then
...
...
LanguageModeling/GPT/oneflow_gpt/config.py
浏览文件 @
fe1e78e0
...
...
@@ -635,11 +635,7 @@ def _add_misc_args(parser):
action
=
"store_true"
,
help
=
"open transformer layer profiler"
,
)
group
.
add_argument
(
"--use-rdma"
,
action
=
"store_true"
,
help
=
"Use rdma."
,
)
return
parser
...
...
LanguageModeling/GPT/oneflow_gpt/training.py
浏览文件 @
fe1e78e0
...
...
@@ -47,8 +47,6 @@ def _init_config(args):
" please try other version."
)
if
args
.
use_rdma
:
flow
.
config
.
use_rdma
(
True
)
flow
.
config
.
enable_legacy_model_io
()
flow
.
config
.
enable_model_io_v2
(
True
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录