Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
兔爷不爱我
mindspore
提交
246fc290
M
mindspore
项目概览
兔爷不爱我
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
0
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
246fc290
编写于
4月 23, 2020
作者:
C
caifubi
提交者:
jojobugfree
4月 23, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean runtime codex
上级
496ffff3
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
15 addition
and
12 deletion
+15
-12
mindspore/ccsrc/device/ascend/ascend_kernel_runtime.cc
mindspore/ccsrc/device/ascend/ascend_kernel_runtime.cc
+8
-7
mindspore/ccsrc/device/ascend/profiling/profiling_utils.cc
mindspore/ccsrc/device/ascend/profiling/profiling_utils.cc
+1
-1
mindspore/ccsrc/device/ascend/profiling/profiling_utils.h
mindspore/ccsrc/device/ascend/profiling/profiling_utils.h
+1
-1
mindspore/ccsrc/device/ascend/tasksink/task_generator.cc
mindspore/ccsrc/device/ascend/tasksink/task_generator.cc
+4
-2
mindspore/ccsrc/kernel/hccl/hcom_util.cc
mindspore/ccsrc/kernel/hccl/hcom_util.cc
+1
-1
未找到文件。
mindspore/ccsrc/device/ascend/ascend_kernel_runtime.cc
浏览文件 @
246fc290
...
...
@@ -453,25 +453,26 @@ bool AscendKernelRuntime::HcclInit() {
}
MS_LOG
(
INFO
)
<<
"do hcom init"
;
std
::
string
path
;
const
char
*
config_path_str
=
std
::
getenv
(
"MINDSPORE_HCCL_CONFIG_PATH"
);
if
(
config_path_str
==
nullptr
)
{
MS_LOG
(
ERROR
)
<<
"get hccl json config failed, please set env MINDSPORE_HCCL_CONFIG_PATH"
;
return
false
;
}
path
=
config_path_str
;
char
fullPath
[
PATH_MAX
]
=
{
0
};
if
(
path
.
size
()
>
PATH_MAX
||
realpath
(
path
.
c_str
(),
fullPath
)
==
nullptr
)
{
MS_LOG
(
ERROR
)
<<
"file "
<<
path
<<
" is not exist"
;
auto
full_path
=
realpath
(
config_path_str
,
nullptr
);
if
(
full_path
==
nullptr
)
{
MS_LOG
(
ERROR
)
<<
"file path "
<<
config_path_str
<<
" does not exist"
;
return
false
;
}
const
char
*
identify
=
std
::
getenv
(
"RANK_ID"
);
if
(
identify
==
nullptr
)
{
MS_LOG
(
ERROR
)
<<
"get hccl rankid failed, please set env RANK_ID"
;
free
(
full_path
);
return
false
;
}
MS_LOG
(
INFO
)
<<
"MINDSPORE_HCCL_CONFIG_PATH : "
<<
fullPath
<<
", RANK_ID: "
<<
identify
;
hcclResult_t
res
=
hcom_init
(
fullPath
,
identify
);
MS_LOG
(
INFO
)
<<
"MINDSPORE_HCCL_CONFIG_PATH : "
<<
full_path
<<
", RANK_ID: "
<<
identify
;
hcclResult_t
res
=
hcom_init
(
full_path
,
identify
);
free
(
full_path
);
if
(
res
!=
HCCL_SUCCESS
)
{
MS_LOG
(
ERROR
)
<<
"hcom init failed, res is "
<<
static_cast
<
int
>
(
res
);
return
false
;
...
...
mindspore/ccsrc/device/ascend/profiling/profiling_utils.cc
浏览文件 @
246fc290
...
...
@@ -33,7 +33,7 @@ constexpr char kIterEndNode[] = "PROFILING_ITER_END";
std
::
unordered_map
<
uint32_t
,
std
::
vector
<
std
::
string
>>
ProfilingUtils
::
graph_kernel_name_
;
uint32_t
ProfilingUtils
::
custom_node_index_
=
1
;
ProfilingTraceInfo
ProfilingUtils
::
GetProfilingTraceFromEnv
(
NotNull
<
session
::
KernelGraph
*>
graph_ptr
)
{
ProfilingTraceInfo
ProfilingUtils
::
GetProfilingTraceFromEnv
(
const
NotNull
<
session
::
KernelGraph
*>
graph_ptr
)
{
MS_LOG
(
INFO
)
<<
"get env start"
;
custom_node_index_
=
1
;
auto
&
cnode_exec_order
=
graph_ptr
->
execution_order
();
...
...
mindspore/ccsrc/device/ascend/profiling/profiling_utils.h
浏览文件 @
246fc290
...
...
@@ -94,7 +94,7 @@ class ProfilingUtils {
// And other cnode, like AllReduce, export PROFILING_CUSTOM_1='full name of AllReduce cnode'
// GetNext, export PROFIFLING_CUSTOM_2='full name fo GetNext cnode'
// The variable i in PROFILING_CUSTOM_i should start from 1 without interruption.
static
ProfilingTraceInfo
GetProfilingTraceFromEnv
(
NotNull
<
session
::
KernelGraph
*>
graph_ptr
);
static
ProfilingTraceInfo
GetProfilingTraceFromEnv
(
const
NotNull
<
session
::
KernelGraph
*>
graph_ptr
);
// Insert two profiling trace points, one in front and one behind
static
void
ProfilingCustomOp
(
const
mindspore
::
AnfNodePtr
&
anf_node
,
const
ProfilingTraceInfo
&
profiling_trace_info
,
...
...
mindspore/ccsrc/device/ascend/tasksink/task_generator.cc
浏览文件 @
246fc290
...
...
@@ -121,8 +121,10 @@ bool TaskGenerator::LaunchKernel(const CNodePtr &anf_node_ptr, uint32_t stream_i
LaunchAddrCleanKernel
(
anf_node_ptr
,
&
kernel_inputs
);
}
std
::
vector
<
TaskInfoPtr
>
task_info_ptrs
=
dynamic_cast
<
kernel
::
AscendKernelMod
*>
(
kernel_mod
)
->
GenTask
(
kernel_inputs
,
kernel_workspaces
,
kernel_outputs
,
stream_id
);
auto
ascend_kernel_mod
=
dynamic_cast
<
kernel
::
AscendKernelMod
*>
(
kernel_mod
);
MS_EXCEPTION_IF_NULL
(
ascend_kernel_mod
);
std
::
vector
<
TaskInfoPtr
>
task_info_ptrs
=
ascend_kernel_mod
->
GenTask
(
kernel_inputs
,
kernel_workspaces
,
kernel_outputs
,
stream_id
);
task_info_list
->
insert
(
task_info_list
->
end
(),
task_info_ptrs
.
begin
(),
task_info_ptrs
.
end
());
return
true
;
}
...
...
mindspore/ccsrc/kernel/hccl/hcom_util.cc
浏览文件 @
246fc290
...
...
@@ -136,7 +136,7 @@ bool HcomUtil::GetHcomCount(const AnfNodePtr &anf_node, const vector<hcclDataTyp
}
}
if
(
total_size
%
type_size
!=
0
)
{
if
(
t
ype_size
==
0
||
t
otal_size
%
type_size
!=
0
)
{
MS_LOG
(
ERROR
)
<<
"Total_size["
<<
total_size
<<
"],Type_size["
<<
type_size
<<
"] != 0, fail!"
;
return
false
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录