Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
5845c4ad
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看板
提交
5845c4ad
编写于
6月 15, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
6月 15, 2020
浏览文件
操作
浏览文件
下载
差异文件
!2109 clean review code
Merge pull request !2109 from caifubi/clean-review-code
上级
11f5f880
2bf98d55
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
24 addition
and
4 deletion
+24
-4
mindspore/ccsrc/device/ascend/profiling/reporter/desc_reporter.cc
...e/ccsrc/device/ascend/profiling/reporter/desc_reporter.cc
+3
-3
mindspore/ccsrc/device/ascend/profiling/reporter/graph_desc_reporter.cc
...c/device/ascend/profiling/reporter/graph_desc_reporter.cc
+1
-0
mindspore/ccsrc/kernel/hccl/hccl_kernel.cc
mindspore/ccsrc/kernel/hccl/hccl_kernel.cc
+1
-1
mindspore/ccsrc/kernel/hccl/hcom_all_broadcast.cc
mindspore/ccsrc/kernel/hccl/hcom_all_broadcast.cc
+5
-0
mindspore/ccsrc/kernel/hccl/hcom_all_gather.cc
mindspore/ccsrc/kernel/hccl/hcom_all_gather.cc
+4
-0
mindspore/ccsrc/kernel/hccl/hcom_all_reduce.cc
mindspore/ccsrc/kernel/hccl/hcom_all_reduce.cc
+4
-0
mindspore/ccsrc/kernel/hccl/hcom_all_reduce_scatter.cc
mindspore/ccsrc/kernel/hccl/hcom_all_reduce_scatter.cc
+4
-0
mindspore/ccsrc/kernel/hccl/hcom_util.cc
mindspore/ccsrc/kernel/hccl/hcom_util.cc
+2
-0
未找到文件。
mindspore/ccsrc/device/ascend/profiling/reporter/desc_reporter.cc
浏览文件 @
5845c4ad
...
...
@@ -42,14 +42,14 @@ void DescReporter::ReportByLine(const std::string &data, const std::string &file
report_data
.
data
=
(
unsigned
char
*
)
data
.
c_str
()
+
cur_size
;
auto
ret
=
memcpy_s
(
report_data
.
tag
,
MSPROF_ENGINE_MAX_TAG_LEN
+
1
,
file_name
.
c_str
(),
file_name
.
length
());
if
(
ret
!=
0
)
{
MS_LOG
(
EXCEPTION
)
<<
"
m
emcpy_s report data tag failed"
;
MS_LOG
(
EXCEPTION
)
<<
"
M
emcpy_s report data tag failed"
;
}
auto
report_ret
=
reporter
->
Report
(
&
report_data
);
if
(
report_ret
!=
0
)
{
MS_LOG
(
EXCEPTION
)
<<
"
r
eport data failed"
;
MS_LOG
(
EXCEPTION
)
<<
"
R
eport data failed"
;
}
if
(
report_size
==
0
)
{
MS_LOG
(
WARNING
)
<<
"
r
eport_size is 0"
;
MS_LOG
(
WARNING
)
<<
"
R
eport_size is 0"
;
break
;
}
cur_size
+=
report_size
;
...
...
mindspore/ccsrc/device/ascend/profiling/reporter/graph_desc_reporter.cc
浏览文件 @
5845c4ad
...
...
@@ -30,6 +30,7 @@ void GraphDescReporter::ReportData() {
}
std
::
vector
<
DataElement
>
input_data_list
;
std
::
vector
<
DataElement
>
output_data_list
;
MS_EXCEPTION_IF_NULL
(
node
);
auto
op_name
=
node
->
fullname_with_scope
();
auto
op_type
=
AnfAlgo
::
GetCNodeName
(
node
);
auto
input_size
=
AnfAlgo
::
GetInputTensorNum
(
node
);
...
...
mindspore/ccsrc/kernel/hccl/hccl_kernel.cc
浏览文件 @
5845c4ad
...
...
@@ -129,7 +129,7 @@ std::vector<TaskInfoPtr> HcclKernel::GenTask(const std::vector<AddressPtr> &inpu
const
std
::
vector
<
AddressPtr
>
&
workspace
,
const
std
::
vector
<
AddressPtr
>
&
outputs
,
uint32_t
stream_id
)
{
if
(
inputs
.
empty
()
||
outputs
.
empty
())
{
MS_LOG
(
EXCEPTION
)
<<
"
i
nputs or outputs is empty"
;
MS_LOG
(
EXCEPTION
)
<<
"
I
nputs or outputs is empty"
;
}
stream_id_
=
stream_id
;
std
::
string
hccl_type
=
AnfAlgo
::
GetCNodeName
(
anf_node_
);
...
...
mindspore/ccsrc/kernel/hccl/hcom_all_broadcast.cc
浏览文件 @
5845c4ad
...
...
@@ -32,7 +32,12 @@ bool HcomAllBroadCastKernel::Launch(const std::vector<AddressPtr> &inputs,
if
(
context_ptr
->
enable_task_sink
())
{
return
true
;
}
if
(
inputs
.
empty
()
||
hccl_data_type_list_
.
empty
())
{
MS_LOG
(
ERROR
)
<<
"BroadCast param is empty"
;
return
false
;
}
const
char
*
tag
=
"Hccl-BroadCast"
;
MS_EXCEPTION_IF_NULL
(
inputs
[
0
]);
hcclResult_t
ret
=
hcom_broadcast
(
tag
,
inputs
[
0
]
->
addr
,
hccl_count_
,
hccl_data_type_list_
[
0
],
root_id_
,
nullptr
,
stream_ptr
);
if
(
ret
!=
HCCL_SUCCESS
)
{
...
...
mindspore/ccsrc/kernel/hccl/hcom_all_gather.cc
浏览文件 @
5845c4ad
...
...
@@ -31,6 +31,10 @@ bool HcomAllGatherKernel::Launch(const std::vector<AddressPtr> &inputs, const st
if
(
context_ptr
->
enable_task_sink
())
{
return
true
;
}
if
(
inputs
.
empty
()
||
hccl_data_type_list_
.
empty
())
{
MS_LOG
(
ERROR
)
<<
"AllGather param is empty"
;
return
false
;
}
const
char
*
tag
=
"Hccl-AllGather"
;
hcclResult_t
ret
=
hcom_all_gather
(
tag
,
inputs
[
0
]
->
addr
,
outputs
[
0
]
->
addr
,
hccl_count_
,
hccl_data_type_list_
[
0
],
nullptr
,
stream_ptr
);
...
...
mindspore/ccsrc/kernel/hccl/hcom_all_reduce.cc
浏览文件 @
5845c4ad
...
...
@@ -31,6 +31,10 @@ bool HcomAllReduceKernel::Launch(const std::vector<AddressPtr> &inputs, const st
if
(
context_ptr
->
enable_task_sink
())
{
return
true
;
}
if
(
inputs
.
empty
()
||
outputs
.
empty
()
||
hccl_data_type_list_
.
empty
())
{
MS_LOG
(
ERROR
)
<<
"AllReduce param is empty"
;
return
false
;
}
const
char
*
tag
=
"Hccl-AllReduce"
;
hcclResult_t
ret
=
hcom_all_reduce
(
tag
,
inputs
[
0
]
->
addr
,
outputs
[
0
]
->
addr
,
hccl_count_
,
hccl_data_type_list_
[
0
],
op_type_
,
nullptr
,
stream_ptr
);
...
...
mindspore/ccsrc/kernel/hccl/hcom_all_reduce_scatter.cc
浏览文件 @
5845c4ad
...
...
@@ -32,6 +32,10 @@ bool HcomAllReduceScatterKernel::Launch(const std::vector<AddressPtr> &inputs,
if
(
context_ptr
->
enable_task_sink
())
{
return
true
;
}
if
(
inputs
.
empty
()
||
outputs
.
empty
()
||
hccl_data_type_list_
.
empty
())
{
MS_LOG
(
ERROR
)
<<
"ReduceScatter param is empty"
;
return
false
;
}
const
char
*
tag
=
"Hccl-ReduceScatter"
;
hcclResult_t
ret
=
hcom_reduce_scatter
(
tag
,
inputs
[
0
]
->
addr
,
outputs
[
0
]
->
addr
,
hccl_count_
,
hccl_data_type_list_
[
0
],
op_type_
,
nullptr
,
stream_ptr
);
...
...
mindspore/ccsrc/kernel/hccl/hcom_util.cc
浏览文件 @
5845c4ad
...
...
@@ -66,6 +66,7 @@ bool HcomUtil::GetHcomDataType(const AnfNodePtr &anf_node, vector<hcclDataType_t
}
bool
HcomUtil
::
GetHcclOpSize
(
const
hcclDataType_t
&
data_type
,
const
vector
<
size_t
>
&
shape
,
size_t
*
size
)
{
MS_EXCEPTION_IF_NULL
(
size
);
int
tmp_size
=
1
;
uint32_t
type_size
=
4
;
for
(
size_t
i
=
0
;
i
<
shape
.
size
();
i
++
)
{
...
...
@@ -84,6 +85,7 @@ bool HcomUtil::GetHcclOpSize(const hcclDataType_t &data_type, const vector<size_
}
bool
HcomUtil
::
GetHcomTypeSize
(
const
hcclDataType_t
&
data_type
,
uint32_t
*
size
)
{
MS_EXCEPTION_IF_NULL
(
size
);
auto
iter
=
CONST_OP_HCOM_DATA_TYPE_SIZE_MAP
.
find
(
data_type
);
if
(
iter
==
CONST_OP_HCOM_DATA_TYPE_SIZE_MAP
.
end
())
{
MS_LOG
(
ERROR
)
<<
"HcomUtil::HcomDataTypeSize, No DataTypeSize!"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录