Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
85364d59
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看板
提交
85364d59
编写于
8月 12, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 12, 2020
浏览文件
操作
浏览文件
下载
差异文件
!4316 fix debugger d-chip watchpoints and ensure GPU updated tensor values
Merge pull request !4316 from john_tzanakakis/master_ms1_grpc
上级
196fdbe1
35695132
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
22 deletion
+25
-22
mindspore/ccsrc/debug/debugger/debugger.cc
mindspore/ccsrc/debug/debugger/debugger.cc
+7
-2
mindspore/ccsrc/debug/tensor_load.h
mindspore/ccsrc/debug/tensor_load.h
+1
-1
mindspore/ccsrc/runtime/device/gpu/gpu_kernel_runtime.cc
mindspore/ccsrc/runtime/device/gpu/gpu_kernel_runtime.cc
+17
-19
未找到文件。
mindspore/ccsrc/debug/debugger/debugger.cc
浏览文件 @
85364d59
...
...
@@ -172,8 +172,13 @@ void Debugger::PostExecute() {
return
;
}
if
(
debugger_enabled_
&&
!
is_dataset_graph_
)
{
MS_LOG
(
INFO
)
<<
"Debugger suspend at end of step; number of steps executed: "
<<
num_step_
;
CommandLoop
();
if
(
device_target_
!=
kGPUDevice
)
{
num_step_
++
;
MS_LOG
(
INFO
)
<<
"Debugger suspend at end of step; number of steps executed: "
<<
num_step_
;
SendWatchpointsAndSuspend
(
CheckWatchpoints
());
}
else
{
CommandLoop
();
}
}
}
...
...
mindspore/ccsrc/debug/tensor_load.h
浏览文件 @
85364d59
...
...
@@ -46,7 +46,7 @@ class TensorLoader {
}
}
tensor_list
.
push_back
(
tensor
);
tensor_list_map
.
insert
({
tensor
->
GetName
(),
tensor
});
tensor_list_map
[
tensor
->
GetName
()]
=
tensor
;
// use [] instead of insert to ensure latest value
auto
node_name
=
tensor
->
GetName
();
node_name
=
node_name
.
substr
(
0
,
node_name
.
find_first_of
(
":"
));
node_tensor_map
.
insert
({
node_name
,
tensor
});
...
...
mindspore/ccsrc/runtime/device/gpu/gpu_kernel_runtime.cc
浏览文件 @
85364d59
...
...
@@ -241,25 +241,23 @@ void LoadKernelData(Debugger *debugger, const CNodePtr &kernel,
}
// get inputs
if
(
!
dump_enabled
)
{
auto
input_size
=
AnfAlgo
::
GetInputTensorNum
(
kernel
);
for
(
size_t
j
=
0
;
j
<
input_size
;
++
j
)
{
auto
input_kernel
=
kernel
->
input
(
j
+
1
);
std
::
string
input_kernel_name
=
input_kernel
->
fullname_with_scope
();
auto
addr
=
kernel_inputs
[
j
];
auto
type
=
AnfAlgo
::
GetOutputInferDataType
(
input_kernel
,
PARAMETER_OUTPUT_INDEX
);
auto
format
=
kOpFormat_DEFAULT
;
auto
gpu_addr
=
std
::
make_unique
<
GPUDeviceAddress
>
(
addr
->
addr
,
addr
->
size
,
format
,
type
);
string
input_tensor_name
=
input_kernel_name
+
':'
+
"0"
;
std
::
vector
<
int
>
int_shapes
;
auto
shape
=
AnfAlgo
::
GetOutputDeviceShape
(
input_kernel
,
PARAMETER_OUTPUT_INDEX
);
(
void
)
std
::
transform
(
shape
.
begin
(),
shape
.
end
(),
std
::
back_inserter
(
int_shapes
),
[](
size_t
inner_item
)
{
return
SizeToInt
(
inner_item
);
});
auto
ret
=
gpu_addr
->
LoadMemToHost
(
input_tensor_name
,
exec_order
,
format
,
int_shapes
,
type
,
0
,
debugger
,
false
);
if
(
!
ret
)
{
MS_LOG
(
ERROR
)
<<
"LoadMemToHost:"
<<
", tensor_name:"
<<
input_tensor_name
<<
", host_format:"
<<
format
<<
".!"
;
}
auto
input_size
=
AnfAlgo
::
GetInputTensorNum
(
kernel
);
for
(
size_t
j
=
0
;
j
<
input_size
;
++
j
)
{
auto
input_kernel
=
kernel
->
input
(
j
+
1
);
std
::
string
input_kernel_name
=
input_kernel
->
fullname_with_scope
();
auto
addr
=
kernel_inputs
[
j
];
auto
type
=
AnfAlgo
::
GetOutputInferDataType
(
input_kernel
,
PARAMETER_OUTPUT_INDEX
);
auto
format
=
kOpFormat_DEFAULT
;
auto
gpu_addr
=
std
::
make_unique
<
GPUDeviceAddress
>
(
addr
->
addr
,
addr
->
size
,
format
,
type
);
string
input_tensor_name
=
input_kernel_name
+
':'
+
"0"
;
std
::
vector
<
int
>
int_shapes
;
auto
shape
=
AnfAlgo
::
GetOutputDeviceShape
(
input_kernel
,
PARAMETER_OUTPUT_INDEX
);
(
void
)
std
::
transform
(
shape
.
begin
(),
shape
.
end
(),
std
::
back_inserter
(
int_shapes
),
[](
size_t
inner_item
)
{
return
SizeToInt
(
inner_item
);
});
auto
ret
=
gpu_addr
->
LoadMemToHost
(
input_tensor_name
,
exec_order
,
format
,
int_shapes
,
type
,
0
,
debugger
,
false
);
if
(
!
ret
)
{
MS_LOG
(
ERROR
)
<<
"LoadMemToHost:"
<<
", tensor_name:"
<<
input_tensor_name
<<
", host_format:"
<<
format
<<
".!"
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录