Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
8149a07a
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8149a07a
编写于
12月 21, 2018
作者:
M
minqiyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix wait stream two times bug
test=develop
上级
6fabbd8f
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
15 addition
and
9 deletion
+15
-9
paddle/fluid/framework/details/execution_strategy.h
paddle/fluid/framework/details/execution_strategy.h
+1
-1
paddle/fluid/framework/details/scope_buffered_ssa_graph_executor.cc
...id/framework/details/scope_buffered_ssa_graph_executor.cc
+5
-7
paddle/fluid/framework/details/scope_buffered_ssa_graph_executor.h
...uid/framework/details/scope_buffered_ssa_graph_executor.h
+8
-0
paddle/fluid/pybind/pybind.cc
paddle/fluid/pybind/pybind.cc
+1
-1
未找到文件。
paddle/fluid/framework/details/execution_strategy.h
浏览文件 @
8149a07a
...
@@ -25,7 +25,7 @@ struct ExecutionStrategy {
...
@@ -25,7 +25,7 @@ struct ExecutionStrategy {
size_t
num_threads_
{
0
};
size_t
num_threads_
{
0
};
bool
use_cuda_
{
true
};
bool
use_cuda_
{
true
};
bool
allow_op_delay_
{
false
};
bool
allow_op_delay_
{
false
};
size_t
num_iteration_per_drop_scope_
{
1
};
size_t
num_iteration_per_drop_scope_
{
1
00
};
ExecutorType
type_
{
kDefault
};
ExecutorType
type_
{
kDefault
};
bool
dry_run_
{
false
};
bool
dry_run_
{
false
};
};
};
...
...
paddle/fluid/framework/details/scope_buffered_ssa_graph_executor.cc
浏览文件 @
8149a07a
...
@@ -66,17 +66,15 @@ FeedFetchList ScopeBufferedSSAGraphExecutor::Run(
...
@@ -66,17 +66,15 @@ FeedFetchList ScopeBufferedSSAGraphExecutor::Run(
platform
::
RecordEvent
e
(
"ScopeBufferedSSAGraphExecutorAfterRun"
,
nullptr
);
platform
::
RecordEvent
e
(
"ScopeBufferedSSAGraphExecutorAfterRun"
,
nullptr
);
++
drop_scope_counter_
;
++
drop_scope_counter_
;
bool
stream_end
=
false
;
if
(
!
fetch_tensors
.
empty
())
{
if
(
!
fetch_tensors
.
empty
())
{
// Wait All computational streams
WaitComputationalStreams
();
for
(
auto
p
:
places_
)
{
stream_end
=
true
;
platform
::
DeviceContextPool
::
Instance
().
Get
(
p
)
->
Wait
();
}
}
}
if
(
drop_scope_counter_
==
strategy_
.
num_iteration_per_drop_scope_
)
{
if
(
drop_scope_counter_
==
strategy_
.
num_iteration_per_drop_scope_
)
{
// Wait All computational streams
if
(
!
stream_end
)
{
for
(
auto
p
:
places_
)
{
WaitComputationalStreams
();
platform
::
DeviceContextPool
::
Instance
().
Get
(
p
)
->
Wait
();
}
}
for
(
auto
&
scope
:
local_scopes_
)
{
for
(
auto
&
scope
:
local_scopes_
)
{
...
...
paddle/fluid/framework/details/scope_buffered_ssa_graph_executor.h
浏览文件 @
8149a07a
...
@@ -47,6 +47,14 @@ class ScopeBufferedSSAGraphExecutor : public SSAGraphExecutor {
...
@@ -47,6 +47,14 @@ class ScopeBufferedSSAGraphExecutor : public SSAGraphExecutor {
FeedFetchList
Run
(
const
std
::
vector
<
std
::
string
>&
fetch_tensors
)
override
;
FeedFetchList
Run
(
const
std
::
vector
<
std
::
string
>&
fetch_tensors
)
override
;
private:
inline
void
WaitComputationalStreams
()
{
// Wait All computational streams
for
(
auto
p
:
places_
)
{
platform
::
DeviceContextPool
::
Instance
().
Get
(
p
)
->
Wait
();
}
}
private:
private:
size_t
drop_scope_counter_
{
0
};
size_t
drop_scope_counter_
{
0
};
...
...
paddle/fluid/pybind/pybind.cc
浏览文件 @
8149a07a
...
@@ -815,7 +815,7 @@ All parameter, weight, gradient are variables in Paddle.
...
@@ -815,7 +815,7 @@ All parameter, weight, gradient are variables in Paddle.
R"DOC(The type is INT, num_iteration_per_drop_scope indicates how
R"DOC(The type is INT, num_iteration_per_drop_scope indicates how
many iterations to clean up the temp variables which
many iterations to clean up the temp variables which
is generated during execution. It may make the execution faster,
is generated during execution. It may make the execution faster,
because the temp variable's shape maybe the same between two iterations. Default 1.
because the temp variable's shape maybe the same between two iterations. Default 1
00
.
NOTES:
NOTES:
1. If you fetch data when calling the 'run', the ParallelExecutor
1. If you fetch data when calling the 'run', the ParallelExecutor
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录