Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
5622a9ee
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看板
提交
5622a9ee
编写于
6月 15, 2020
作者:
J
jjfeing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify log level from debug to info
上级
ad035c4c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
12 deletion
+12
-12
mindspore/ccsrc/kernel/tbe/tbe_convert_utils.cc
mindspore/ccsrc/kernel/tbe/tbe_convert_utils.cc
+2
-2
mindspore/ccsrc/kernel/tbe/tbe_kernel_parallel_build.cc
mindspore/ccsrc/kernel/tbe/tbe_kernel_parallel_build.cc
+2
-2
mindspore/ccsrc/kernel/tbe/tbe_utils.cc
mindspore/ccsrc/kernel/tbe/tbe_utils.cc
+8
-8
未找到文件。
mindspore/ccsrc/kernel/tbe/tbe_convert_utils.cc
浏览文件 @
5622a9ee
...
@@ -101,7 +101,7 @@ size_t GetDtypeNbyte(const std::string &dtypes) {
...
@@ -101,7 +101,7 @@ size_t GetDtypeNbyte(const std::string &dtypes) {
FusionType
GetFusionType
(
const
std
::
string
&
pattern
)
{
FusionType
GetFusionType
(
const
std
::
string
&
pattern
)
{
auto
iter
=
fusion_type_maps
.
find
(
pattern
);
auto
iter
=
fusion_type_maps
.
find
(
pattern
);
if
(
iter
==
fusion_type_maps
.
end
())
{
if
(
iter
==
fusion_type_maps
.
end
())
{
MS_LOG
(
DEBUG
)
<<
"Illegal fusion pattern: "
<<
pattern
;
MS_LOG
(
INFO
)
<<
"Illegal fusion pattern: "
<<
pattern
;
return
UNKNOWN_FUSION_TYPE
;
return
UNKNOWN_FUSION_TYPE
;
}
}
return
iter
->
second
;
return
iter
->
second
;
...
@@ -115,7 +115,7 @@ std::string GetProcessor(const AnfNodePtr &anf_node) {
...
@@ -115,7 +115,7 @@ std::string GetProcessor(const AnfNodePtr &anf_node) {
device
=
kProcessorAiCore
;
device
=
kProcessorAiCore
;
break
;
break
;
default:
default:
MS_LOG
(
DEBUG
)
<<
"Unknown processor type."
<<
anf_node
->
fullname_with_scope
();
MS_LOG
(
INFO
)
<<
"Unknown processor type."
<<
anf_node
->
fullname_with_scope
();
break
;
break
;
}
}
return
device
;
return
device
;
...
...
mindspore/ccsrc/kernel/tbe/tbe_kernel_parallel_build.cc
浏览文件 @
5622a9ee
...
@@ -220,7 +220,7 @@ std::pair<int32_t, KernelModPtr> ParallelBuildManager::TaskFinishProcess(int32_t
...
@@ -220,7 +220,7 @@ std::pair<int32_t, KernelModPtr> ParallelBuildManager::TaskFinishProcess(int32_t
if
(
set_kernel_mod
)
{
if
(
set_kernel_mod
)
{
MS_EXCEPTION
(
ArgumentError
)
<<
"build kernel name:"
<<
task_iter
->
second
.
json_name
<<
" failed."
;
MS_EXCEPTION
(
ArgumentError
)
<<
"build kernel name:"
<<
task_iter
->
second
.
json_name
<<
" failed."
;
}
else
{
}
else
{
MS_LOG
(
DEBUG
)
<<
"fusion build kernel name:"
<<
task_iter
->
second
.
json_name
<<
"failed."
;
MS_LOG
(
INFO
)
<<
"fusion build kernel name:"
<<
task_iter
->
second
.
json_name
<<
"failed."
;
auto
ret
=
std
::
make_pair
(
task_iter
->
second
.
scope_id
,
nullptr
);
auto
ret
=
std
::
make_pair
(
task_iter
->
second
.
scope_id
,
nullptr
);
(
void
)
task_map_
.
erase
(
task_iter
);
(
void
)
task_map_
.
erase
(
task_iter
);
return
ret
;
return
ret
;
...
@@ -255,7 +255,7 @@ bool ParallelBuildManager::GenSameOpKernelMod() const {
...
@@ -255,7 +255,7 @@ bool ParallelBuildManager::GenSameOpKernelMod() const {
bool
ret
=
SearchInCache
(
task_info
.
json_name
,
task_info
.
processor
,
task_info
.
input_size_list
,
bool
ret
=
SearchInCache
(
task_info
.
json_name
,
task_info
.
processor
,
task_info
.
input_size_list
,
task_info
.
output_size_list
,
task_info
.
node
);
task_info
.
output_size_list
,
task_info
.
node
);
if
(
!
ret
)
{
if
(
!
ret
)
{
MS_LOG
(
DEBUG
)
<<
"can't find "
<<
task_info
.
json_name
<<
" in cache."
;
MS_LOG
(
INFO
)
<<
"can't find "
<<
task_info
.
json_name
<<
" in cache."
;
return
false
;
return
false
;
}
}
}
}
...
...
mindspore/ccsrc/kernel/tbe/tbe_utils.cc
浏览文件 @
5622a9ee
...
@@ -67,12 +67,12 @@ void TbeUtils::SaveJsonInfo(const std::string &json_name, const std::string &inf
...
@@ -67,12 +67,12 @@ void TbeUtils::SaveJsonInfo(const std::string &json_name, const std::string &inf
filewrite
<<
info
<<
std
::
endl
;
filewrite
<<
info
<<
std
::
endl
;
filewrite
.
close
();
filewrite
.
close
();
if
(
nullptr
==
realpath
(
path
.
c_str
(),
real_path
))
{
if
(
nullptr
==
realpath
(
path
.
c_str
(),
real_path
))
{
MS_LOG
(
DEBUG
)
<<
"dir: "
<<
path
<<
"does not exit."
;
MS_LOG
(
INFO
)
<<
"dir: "
<<
path
<<
"does not exit."
;
return
;
return
;
}
}
MS_LOG
(
INFO
)
<<
"real path is: "
<<
real_path
;
MS_LOG
(
INFO
)
<<
"real path is: "
<<
real_path
;
if
(
chmod
(
real_path
,
S_IRUSR
)
==
-
1
)
{
if
(
chmod
(
real_path
,
S_IRUSR
)
==
-
1
)
{
MS_LOG
(
DEBUG
)
<<
"modify file: "
<<
real_path
<<
"to read only fail."
;
MS_LOG
(
INFO
)
<<
"modify file: "
<<
real_path
<<
"to read only fail."
;
}
}
}
}
...
@@ -93,7 +93,7 @@ KernelPackPtr TbeUtils::SearchCache(const std::string &kernel_name, const std::s
...
@@ -93,7 +93,7 @@ KernelPackPtr TbeUtils::SearchCache(const std::string &kernel_name, const std::s
// search cache.
// search cache.
KernelMeta
*
bin_map
=
KernelMeta
::
GetInstance
();
KernelMeta
*
bin_map
=
KernelMeta
::
GetInstance
();
if
(
bin_map
==
nullptr
)
{
if
(
bin_map
==
nullptr
)
{
MS_LOG
(
DEBUG
)
<<
"kernel cache is invalid."
;
MS_LOG
(
INFO
)
<<
"kernel cache is invalid."
;
return
nullptr
;
return
nullptr
;
}
}
return
bin_map
->
GetKernelPack
(
kernel_name
,
processor
);
return
bin_map
->
GetKernelPack
(
kernel_name
,
processor
);
...
@@ -118,14 +118,14 @@ int KernelManager::BinaryRegister(const mindspore::kernel::FlexArray &kernel_buf
...
@@ -118,14 +118,14 @@ int KernelManager::BinaryRegister(const mindspore::kernel::FlexArray &kernel_buf
dev_bin
.
data
=
kernel_buffer
.
contents
;
dev_bin
.
data
=
kernel_buffer
.
contents
;
auto
iter
=
magic_maps
.
find
(
magic
);
auto
iter
=
magic_maps
.
find
(
magic
);
if
(
iter
==
magic_maps
.
end
())
{
if
(
iter
==
magic_maps
.
end
())
{
MS_LOG
(
DEBUG
)
<<
"Invalid magic number: "
<<
magic
;
MS_LOG
(
INFO
)
<<
"Invalid magic number: "
<<
magic
;
return
-
1
;
return
-
1
;
}
}
dev_bin
.
magic
=
iter
->
second
;
dev_bin
.
magic
=
iter
->
second
;
dev_bin
.
length
=
kernel_buffer
.
len
;
dev_bin
.
length
=
kernel_buffer
.
len
;
dev_bin
.
version
=
2
;
dev_bin
.
version
=
2
;
if
(
RT_ERROR_NONE
!=
rtDevBinaryRegister
(
&
dev_bin
,
module
))
{
if
(
RT_ERROR_NONE
!=
rtDevBinaryRegister
(
&
dev_bin
,
module
))
{
MS_LOG
(
DEBUG
)
<<
"Call runtime rtDevBinaryRegister error."
;
MS_LOG
(
INFO
)
<<
"Call runtime rtDevBinaryRegister error."
;
return
-
1
;
return
-
1
;
}
}
return
0
;
return
0
;
...
@@ -158,14 +158,14 @@ uintptr_t KernelManager::GenFuncStub(const mindspore::kernel::KernelPack &kernel
...
@@ -158,14 +158,14 @@ uintptr_t KernelManager::GenFuncStub(const mindspore::kernel::KernelPack &kernel
}
}
void
*
module
=
nullptr
;
void
*
module
=
nullptr
;
if
(
0
!=
BinaryRegister
((
*
kernel_pack
.
GetKernel
()),
&
module
,
magic
))
{
if
(
0
!=
BinaryRegister
((
*
kernel_pack
.
GetKernel
()),
&
module
,
magic
))
{
MS_LOG
(
DEBUG
)
<<
"Call runtime BinaryRegister error."
;
MS_LOG
(
INFO
)
<<
"Call runtime BinaryRegister error."
;
return
0
;
return
0
;
}
}
// to diff different funcs.
// to diff different funcs.
uintptr_t
funcstub
=
++
kernel_stub_gen_
;
uintptr_t
funcstub
=
++
kernel_stub_gen_
;
if
(
RT_ERROR_NONE
!=
if
(
RT_ERROR_NONE
!=
rtFunctionRegister
(
module
,
reinterpret_cast
<
void
*>
(
funcstub
),
funcname
.
c_str
(),
funcname
.
c_str
(),
0
))
{
rtFunctionRegister
(
module
,
reinterpret_cast
<
void
*>
(
funcstub
),
funcname
.
c_str
(),
funcname
.
c_str
(),
0
))
{
MS_LOG
(
DEBUG
)
<<
"Call runtime rtFunctionRegister error."
;
MS_LOG
(
INFO
)
<<
"Call runtime rtFunctionRegister error."
;
return
0
;
return
0
;
}
}
// cache the registered kernelmeta.
// cache the registered kernelmeta.
...
@@ -236,7 +236,7 @@ KernelPackPtr KernelMeta::GetKernelPack(const std::string &kernel_name, const st
...
@@ -236,7 +236,7 @@ KernelPackPtr KernelMeta::GetKernelPack(const std::string &kernel_name, const st
(
void
)
cce_json
.
append
(
kernel_name
).
append
(
kJsonSuffix
);
(
void
)
cce_json
.
append
(
kernel_name
).
append
(
kJsonSuffix
);
ret
=
std
::
make_shared
<
KernelPack
>
();
ret
=
std
::
make_shared
<
KernelPack
>
();
if
(
!
ret
->
LoadKernelMeta
(
cce_json
,
processor
))
{
if
(
!
ret
->
LoadKernelMeta
(
cce_json
,
processor
))
{
MS_LOG
(
DEBUG
)
<<
"Read cache json and bin file failed["
<<
cce_json
<<
"]"
;
MS_LOG
(
INFO
)
<<
"Read cache json and bin file failed["
<<
cce_json
<<
"]"
;
return
nullptr
;
return
nullptr
;
}
}
kernel_pack_map_
[
kernel_name
]
=
ret
;
kernel_pack_map_
[
kernel_name
]
=
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录