Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
dfde76af
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
dfde76af
编写于
4月 24, 2020
作者:
X
Xiaoda Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete the 'simplify_cal' attribute in 'set_algo_parameters' and 'get_algo_parameters' interface
上级
c984c48f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
28 deletion
+7
-28
mindspore/ccsrc/pipeline/init.cc
mindspore/ccsrc/pipeline/init.cc
+0
-4
mindspore/parallel/algo_parameter_config.py
mindspore/parallel/algo_parameter_config.py
+5
-15
tests/ut/python/parallel/test_auto_parallel_two_matmul.py
tests/ut/python/parallel/test_auto_parallel_two_matmul.py
+2
-9
未找到文件。
mindspore/ccsrc/pipeline/init.cc
浏览文件 @
dfde76af
...
...
@@ -206,10 +206,6 @@ PYBIND11_MODULE(_c_expression, m) {
"Set the parameter cost_model_gamma of the DP algorithm"
)
.
def
(
"get_costmodel_gamma"
,
&
CostModelContext
::
costmodel_gamma
,
"Get the parameter cost_model_gamma of the DP algorithm."
)
.
def
(
"set_simplify_cal"
,
&
CostModelContext
::
set_costmodel_simplify_cal
,
"Set the parameter cost_model_simplify_cal of the DP algorithm."
)
.
def
(
"get_simplify_cal"
,
&
CostModelContext
::
costmodel_simplify_cal
,
"Get the parameter cost_model_simplify_cal of the DP algorithm."
)
.
def
(
"set_costmodel_communi_threshold"
,
&
CostModelContext
::
set_costmodel_communi_threshold
,
"Set the parameter cost_model_communi_threshold of the DP algorithm."
)
.
def
(
"get_costmodel_communi_threshold"
,
&
CostModelContext
::
costmodel_communi_threshold
,
...
...
mindspore/parallel/algo_parameter_config.py
浏览文件 @
dfde76af
...
...
@@ -45,14 +45,6 @@ class _AlgoParameterConfig():
if
self
.
_config_handle
is
None
:
raise
ValueError
(
"Config handle is none!!!"
)
def
set_simplify_cal
(
self
,
simplify_cal
):
self
.
check_config_handle
()
self
.
_config_handle
.
set_simplify_cal
(
simplify_cal
)
def
get_simplify_cal
(
self
):
self
.
check_config_handle
()
return
self
.
_config_handle
.
get_simplify_cal
()
def
set_fully_use_devices
(
self
,
not_fully
):
self
.
check_config_handle
()
self
.
_config_handle
.
set_fully_use_devices
(
not_fully
)
...
...
@@ -118,7 +110,6 @@ def _algo_parameter_config():
set_algo_parameters_config_func_map
=
{
"simplify_cal"
:
_algo_parameter_config
().
set_simplify_cal
,
"fully_use_devices"
:
_algo_parameter_config
().
set_fully_use_devices
,
"elementwise_op_strategy_follow"
:
_algo_parameter_config
().
set_elementwise_op_strategy_follow
,
"tensor_slice_align_enable"
:
_algo_parameter_config
().
set_tensor_slice_align_enable
,
...
...
@@ -126,14 +117,13 @@ set_algo_parameters_config_func_map = {
get_algo_parameters_config_func_map
=
{
"simplify_cal"
:
_algo_parameter_config
().
get_simplify_cal
,
"fully_use_devices"
:
_algo_parameter_config
().
get_fully_use_devices
,
"elementwise_op_strategy_follow"
:
_algo_parameter_config
().
get_elementwise_op_strategy_follow
,
"tensor_slice_align_enable"
:
_algo_parameter_config
().
get_tensor_slice_align_enable
,
"tensor_slice_align_size"
:
_algo_parameter_config
().
get_tensor_slice_align_size
}
@
args_type_check
(
simplify_cal
=
bool
,
tensor_slice_align_enable
=
bool
,
tensor_slice_align_size
=
int
,
@
args_type_check
(
tensor_slice_align_enable
=
bool
,
tensor_slice_align_size
=
int
,
fully_use_devices
=
bool
,
elementwise_op_strategy_follow
=
bool
)
def
set_algo_parameters
(
**
kwargs
):
"""
...
...
@@ -143,10 +133,10 @@ def set_algo_parameters(**kwargs):
Attribute name is needed.
Args:
simplify_cal (bool): Whether simplifying calculations in strategy-searching algorithm. Default: Tru
e
tensor_slice_align_
enable (bool): Whether checking tensor slice shape. Default: False
tensor_slice_align_size (int): The minimum tensor slice shape, the value must be in [1, 1024].
Default: 16
fully_use_devices (bool): Whether generating strategies that fully use all available devices. Default: True
tensor_slice_align_enable (bool): Whether checking tensor slice shape for MatMul. Default: Fals
e
tensor_slice_align_
size (int): The minimum tensor slice shape of MatMul, the value must be in [1, 1024].
Default: 16
fully_use_devices (bool): Whether
ONLY
generating strategies that fully use all available devices. Default: True
elementwise_op_strategy_follow (bool): Whether the elementwise operator have the same strategies as its
subsequent operators. Default: False
...
...
tests/ut/python/parallel/test_auto_parallel_two_matmul.py
浏览文件 @
dfde76af
...
...
@@ -97,13 +97,8 @@ def test_two_matmul():
assert
costmodel_communi_bias
==
1024.0
set_algo_parameters
(
simplify_cal
=
True
,
tensor_slice_align_enable
=
False
,
tensor_slice_align_size
=
32
,
fully_use_devices
=
False
,
elementwise_op_strategy_follow
=
False
)
para_simplify_cal
=
get_algo_parameters
(
"simplify_cal"
)
assert
para_simplify_cal
==
True
set_algo_parameters
(
tensor_slice_align_enable
=
False
,
tensor_slice_align_size
=
32
,
fully_use_devices
=
False
,
elementwise_op_strategy_follow
=
False
)
para_slice_align_enable
=
get_algo_parameters
(
"tensor_slice_align_enable"
)
assert
para_slice_align_enable
==
False
para_slice_align_size
=
get_algo_parameters
(
"tensor_slice_align_size"
)
...
...
@@ -114,8 +109,6 @@ def test_two_matmul():
assert
elementwise_op_strategy_follow
==
False
reset_algo_parameters
()
para_simplify_cal
=
get_algo_parameters
(
"simplify_cal"
)
assert
para_simplify_cal
==
True
para_slice_align_enable
=
get_algo_parameters
(
"tensor_slice_align_enable"
)
assert
para_slice_align_enable
==
False
para_slice_align_size
=
get_algo_parameters
(
"tensor_slice_align_size"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录