Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
04decda0
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看板
提交
04decda0
编写于
8月 22, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
!4951 Fix missing symbol, build failure issue with -B on
Merge pull request !4951 from HarshvardhanGupta/multi_fix
上级
9d7250c4
ac457f31
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
28 deletion
+29
-28
mindspore/ccsrc/debug/debug_services.cc
mindspore/ccsrc/debug/debug_services.cc
+2
-1
mindspore/ccsrc/debug/debugger/debugger.cc
mindspore/ccsrc/debug/debugger/debugger.cc
+26
-26
mindspore/ccsrc/debug/debugger/grpc_client.cc
mindspore/ccsrc/debug/debugger/grpc_client.cc
+1
-1
未找到文件。
mindspore/ccsrc/debug/debug_services.cc
浏览文件 @
04decda0
...
...
@@ -73,6 +73,7 @@ void DebugServices::CheckWatchpoints(std::vector<std::string> *name, std::vector
std
::
string
current_tensor_name
;
std
::
unordered_map
<
unsigned
int
,
watchpoint_t
>
watchpoints_to_check_table
;
const
size_t
location
=
0
;
for
(
std
::
size_t
i
=
0
;
i
<
tensor_list
.
size
();
i
++
)
{
current_tensor_name
=
tensor_list
[
i
]
->
GetName
();
...
...
@@ -102,7 +103,7 @@ void DebugServices::CheckWatchpoints(std::vector<std::string> *name, std::vector
// check if the current node tensor name is included the watchpoint
std
::
string
current_node_name
=
current_tensor_name
.
substr
(
0
,
current_tensor_name
.
find_first_of
(
":"
));
if
((
w_type
==
true
&&
(
current_tensor_name
.
find
(
w_name
)
!=
string
::
npos
||
w_name
==
"*"
))
||
if
((
w_type
==
true
&&
(
current_tensor_name
.
find
(
w_name
)
==
location
||
w_name
==
"*"
))
||
(
w_type
==
false
&&
current_node_name
==
w_name
))
{
watchpoints_to_check_table
[
w_table_item
.
second
.
id
]
=
w_table_item
.
second
;
break
;
...
...
mindspore/ccsrc/debug/debugger/debugger.cc
浏览文件 @
04decda0
...
...
@@ -151,35 +151,34 @@ void Debugger::EnableDebugger() {
MS_LOG
(
WARNING
)
<<
"Memory Reuse is disabled. Set environment variable MS_DEBUGGER_PARTIAL_MEM=1 to reduce memory "
"usage for large models."
;
}
if
(
device_target_
==
kAscendDevice
)
{
// set operation overflow info
overflow_bin_path_
=
DataDumpParser
::
GetInstance
().
GetOpOverflowBinPath
(
graph_ptr_
->
graph_id
(),
device_id_
);
// new overflow dump files will have a timestamp greater than last_overflow_bin_
last_overflow_bin_
=
0
;
DIR
*
d
;
d
=
opendir
(
overflow_bin_path_
.
c_str
());
if
(
d
!=
nullptr
)
{
struct
dirent
*
dir
;
while
((
dir
=
readdir
(
d
))
!=
NULL
)
{
if
(
dir
->
d_type
==
DT_REG
)
{
std
::
string
file_path
=
overflow_bin_path_
;
file_path
.
append
(
dir
->
d_name
);
std
::
size_t
found
=
file_path
.
find_last_of
(
"."
);
if
(
found
==
std
::
string
::
npos
)
{
continue
;
}
std
::
string
overflow_time
=
file_path
.
substr
(
found
+
1
);
if
(
stod
(
overflow_time
)
<=
last_overflow_bin_
)
{
MS_LOG
(
INFO
)
<<
"Old op overflow bin folder"
<<
file_path
;
continue
;
}
last_overflow_bin_
=
stod
(
overflow_time
);
#ifdef ENABLE_D
// set operation overflow info
overflow_bin_path_
=
DataDumpParser
::
GetInstance
().
GetOpOverflowBinPath
(
graph_ptr_
->
graph_id
(),
device_id_
);
// new overflow dump files will have a timestamp greater than last_overflow_bin_
last_overflow_bin_
=
0
;
DIR
*
d
;
d
=
opendir
(
overflow_bin_path_
.
c_str
());
if
(
d
!=
nullptr
)
{
struct
dirent
*
dir
;
while
((
dir
=
readdir
(
d
))
!=
NULL
)
{
if
(
dir
->
d_type
==
DT_REG
)
{
std
::
string
file_path
=
overflow_bin_path_
;
file_path
.
append
(
dir
->
d_name
);
std
::
size_t
found
=
file_path
.
find_last_of
(
"."
);
if
(
found
==
std
::
string
::
npos
)
{
continue
;
}
std
::
string
overflow_time
=
file_path
.
substr
(
found
+
1
);
if
(
stod
(
overflow_time
)
<=
last_overflow_bin_
)
{
MS_LOG
(
INFO
)
<<
"Old op overflow bin folder"
<<
file_path
;
continue
;
}
last_overflow_bin_
=
stod
(
overflow_time
);
}
MS_LOG
(
INFO
)
<<
"last op overflow bin folder"
<<
last_overflow_bin_
;
}
MS_LOG
(
INFO
)
<<
"last op overflow bin folder"
<<
last_overflow_bin_
;
}
#endif
// initialize grpc client
if
(
debugger_enabled_
)
{
...
...
@@ -554,8 +553,9 @@ std::list<WatchpointHit> Debugger::CheckWatchpoints() {
std
::
vector
<
int
>
condition
;
std
::
vector
<
unsigned
int
>
watchpoint_id
;
std
::
vector
<
std
::
string
>
overflow_ops
;
#ifdef ENABLE_D
overflow_ops
=
CheckOpOverflow
();
#endif
debug_services_
->
CheckWatchpoints
(
&
name
,
&
slot
,
&
condition
,
&
watchpoint_id
,
overflow_ops
);
std
::
list
<
WatchpointHit
>
hits
;
for
(
unsigned
int
i
=
0
;
i
<
name
.
size
();
i
++
)
{
...
...
mindspore/ccsrc/debug/debugger/grpc_client.cc
浏览文件 @
04decda0
...
...
@@ -117,7 +117,7 @@ void GrpcClient::Init(const std::string &host, const std::string &port, const bo
int
dwcaLen
=
i2d_X509
(
sk_X509_value
(
ca
,
0
),
NULL
);
// get the length of private key
unsigned
char
*
cabuf
=
(
unsigned
char
*
)
malloc
(
sizeof
(
unsigned
char
)
*
dwcaLen
);
i2d_X509
(
sk_X509_value
(
ca
,
0
),
&
cabuf
);
// PrivateKey DER code
strca
t
=
std
::
string
(
reinterpret_cast
<
char
const
*>
(
cabuf
),
dwcaLen
);
strca
=
std
::
string
(
reinterpret_cast
<
char
const
*>
(
cabuf
),
dwcaLen
);
free
(
pribuf
);
free
(
certbuf
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录