Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
676dfd18
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
676dfd18
编写于
5月 07, 2018
作者:
C
chengduoZH
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
follow comments
上级
aff8a26d
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
9 addition
and
8 deletion
+9
-8
paddle/fluid/framework/details/fetch_op_handle.cc
paddle/fluid/framework/details/fetch_op_handle.cc
+3
-6
paddle/fluid/framework/details/nccl_all_reduce_op_handle.cc
paddle/fluid/framework/details/nccl_all_reduce_op_handle.cc
+3
-1
paddle/fluid/framework/details/send_op_handle.cc
paddle/fluid/framework/details/send_op_handle.cc
+3
-1
未找到文件。
paddle/fluid/framework/details/fetch_op_handle.cc
浏览文件 @
676dfd18
...
@@ -49,7 +49,9 @@ void FetchOpHandle::RunImpl() {
...
@@ -49,7 +49,9 @@ void FetchOpHandle::RunImpl() {
platform
::
DeviceContextPool
::
Instance
().
Get
(
platform
::
CPUPlace
());
platform
::
DeviceContextPool
::
Instance
().
Get
(
platform
::
CPUPlace
());
for
(
auto
*
input
:
inputs_
)
{
for
(
auto
*
input
:
inputs_
)
{
auto
*
var
=
static_cast
<
VarHandle
*>
(
input
);
auto
*
var
=
static_cast
<
VarHandle
*>
(
input
);
if
(
var
->
generated_op_
)
var
->
generated_op_
->
Wait
(
cpu_ctx
);
if
(
var
->
generated_op_
)
{
var
->
generated_op_
->
Wait
(
cpu_ctx
);
}
}
}
tensors_
.
resize
(
inputs_
.
size
());
tensors_
.
resize
(
inputs_
.
size
());
auto
*
var_handle
=
static_cast
<
VarHandle
*>
(
inputs_
[
0
]);
auto
*
var_handle
=
static_cast
<
VarHandle
*>
(
inputs_
[
0
]);
...
@@ -61,14 +63,9 @@ void FetchOpHandle::RunImpl() {
...
@@ -61,14 +63,9 @@ void FetchOpHandle::RunImpl() {
auto
&
scope
=
scopes
[
i
];
auto
&
scope
=
scopes
[
i
];
auto
*
var
=
auto
*
var
=
scope
->
FindVar
(
kLocalExecScopeName
)
->
Get
<
Scope
*>
()
->
FindVar
(
var_name
);
scope
->
FindVar
(
kLocalExecScopeName
)
->
Get
<
Scope
*>
()
->
FindVar
(
var_name
);
if
(
var
==
nullptr
)
{
scope
->
FindVar
(
var_name
);
}
PADDLE_ENFORCE_NOT_NULL
(
var
,
"Cannot find variable %s in execution scope"
,
PADDLE_ENFORCE_NOT_NULL
(
var
,
"Cannot find variable %s in execution scope"
,
var_name
);
var_name
);
auto
&
t
=
var
->
Get
<
framework
::
LoDTensor
>
();
auto
&
t
=
var
->
Get
<
framework
::
LoDTensor
>
();
if
(
platform
::
is_gpu_place
(
t
.
place
()))
{
if
(
platform
::
is_gpu_place
(
t
.
place
()))
{
#ifdef PADDLE_WITH_CUDA
#ifdef PADDLE_WITH_CUDA
TensorCopySync
(
t
,
cpu
,
&
tensors_
[
i
]);
TensorCopySync
(
t
,
cpu
,
&
tensors_
[
i
]);
...
...
paddle/fluid/framework/details/nccl_all_reduce_op_handle.cc
浏览文件 @
676dfd18
...
@@ -36,7 +36,9 @@ void NCCLAllReduceOpHandle::RunImpl() {
...
@@ -36,7 +36,9 @@ void NCCLAllReduceOpHandle::RunImpl() {
// Wait input done
// Wait input done
for
(
auto
*
in
:
inputs_
)
{
for
(
auto
*
in
:
inputs_
)
{
auto
&
p
=
static_cast
<
VarHandle
*>
(
in
)
->
place_
;
auto
&
p
=
static_cast
<
VarHandle
*>
(
in
)
->
place_
;
if
(
in
->
generated_op_
)
in
->
generated_op_
->
Wait
(
dev_ctxes_
[
p
]);
if
(
in
->
generated_op_
)
{
in
->
generated_op_
->
Wait
(
dev_ctxes_
[
p
]);
}
}
}
auto
&
var_name
=
static_cast
<
VarHandle
*>
(
this
->
inputs_
[
0
])
->
name_
;
auto
&
var_name
=
static_cast
<
VarHandle
*>
(
this
->
inputs_
[
0
])
->
name_
;
...
...
paddle/fluid/framework/details/send_op_handle.cc
浏览文件 @
676dfd18
...
@@ -32,7 +32,9 @@ void SendOpHandle::RunImpl() {
...
@@ -32,7 +32,9 @@ void SendOpHandle::RunImpl() {
if
(
in
->
DebugString
()
==
"dummy"
)
{
// HACK
if
(
in
->
DebugString
()
==
"dummy"
)
{
// HACK
continue
;
continue
;
}
}
if
(
in
->
generated_op_
)
in
->
generated_op_
->
Wait
(
dev_ctxes_
[
p
]);
if
(
in
->
generated_op_
)
{
in
->
generated_op_
->
Wait
(
dev_ctxes_
[
p
]);
}
}
}
auto
&
tmp_scope
=
local_scope_
->
FindVar
(
kLocalExecScopeName
)
->
Get
<
Scope
*>
();
auto
&
tmp_scope
=
local_scope_
->
FindVar
(
kLocalExecScopeName
)
->
Get
<
Scope
*>
();
// FIXME(wuyi): can not use RunAndRecordEvent here, for it will cause dead
// FIXME(wuyi): can not use RunAndRecordEvent here, for it will cause dead
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录