Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Oneflow-Inc
oneflow
提交
a82beb19
O
oneflow
项目概览
Oneflow-Inc
/
oneflow
上一次同步 接近 3 年
通知
13
Star
2733
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oneflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a82beb19
编写于
11月 28, 2020
作者:
L
lixinqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add ssp variable_proxy
Former-commit-id: ead9222f14b4395f211260f9f2feef1e83daf2db
上级
6924f279
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
5 deletion
+5
-5
oneflow/core/job/ssp_config_def.cpp
oneflow/core/job/ssp_config_def.cpp
+2
-2
oneflow/core/job_rewriter/add_ssp_variable_proxy.cpp
oneflow/core/job_rewriter/add_ssp_variable_proxy.cpp
+2
-2
oneflow/python/test/ops/test_ssp_variable_proxy.py
oneflow/python/test/ops/test_ssp_variable_proxy.py
+1
-1
未找到文件。
oneflow/core/job/ssp_config_def.cpp
浏览文件 @
a82beb19
...
...
@@ -26,8 +26,8 @@ REGISTER_FUNCTION_CONFIG_DEF()
.
ListInt64
(
"ssp_partition_scope_ids"
,
{},
"type: list[int64]. ssp partition scope symbol ids"
);
REGISTER_SCOPE_CONFIG_DEF
()
.
Int64
(
"
ssp_num_stages"
,
-
1
,
"total number of ssp
stages"
)
.
Int64
(
"s
sp_stage_id"
,
-
1
,
"current ssp
stage id "
);
.
Int64
(
"
num_stages"
,
-
1
,
"total number of
stages"
)
.
Int64
(
"s
tage_id"
,
-
1
,
"current
stage id "
);
}
// namespace
...
...
oneflow/core/job_rewriter/add_ssp_variable_proxy.cpp
浏览文件 @
a82beb19
...
...
@@ -125,8 +125,8 @@ class AddSspVariableProxyPass final : public JobPass {
const
Scope
&
scope
=
JUST
(
Global
<
vm
::
SymbolStorage
<
Scope
>>::
Get
()
->
MaybeGet
(
scope_symbol_id
));
int64_t
buffer_size
=
0
;
{
int64_t
num_stages
=
scope
.
Int64
(
"
ssp_
num_stages"
);
int64_t
stage_id
=
scope
.
Int64
(
"s
sp_s
tage_id"
);
int64_t
num_stages
=
scope
.
Int64
(
"num_stages"
);
int64_t
stage_id
=
scope
.
Int64
(
"stage_id"
);
CHECK_GT
(
num_stages
,
0
);
CHECK_GE
(
stage_id
,
0
);
CHECK_LT
(
stage_id
,
num_stages
);
...
...
oneflow/python/test/ops/test_ssp_variable_proxy.py
浏览文件 @
a82beb19
...
...
@@ -139,7 +139,7 @@ class Test1dSspVariableProxy(flow.unittest.TestCase):
with
flow
.
scope
.
placement
(
"cpu"
,
device_name
),
flow
.
experimental
.
scope
.
config
(
ssp_num_stages
=
buffer_size
,
ssp_
stage_id
=
0
num_stages
=
buffer_size
,
stage_id
=
0
):
w
=
flow
.
get_variable
(
"w"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录