Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
8b1672fe
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8b1672fe
编写于
2月 25, 2019
作者:
X
Xin Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
follow comments
test=develop
上级
0362ef75
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
4 addition
and
3 deletion
+4
-3
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+1
-0
python/paddle/fluid/compiler.py
python/paddle/fluid/compiler.py
+2
-3
python/paddle/fluid/executor.py
python/paddle/fluid/executor.py
+1
-0
未找到文件。
paddle/scripts/paddle_build.sh
浏览文件 @
8b1672fe
...
@@ -444,6 +444,7 @@ function assert_api_spec_approvals() {
...
@@ -444,6 +444,7 @@ function assert_api_spec_approvals() {
"paddle/fluid/framework/ir/node.h"
"paddle/fluid/framework/ir/node.h"
"paddle/fluid/framework/ir/graph.h"
"paddle/fluid/framework/ir/graph.h"
"paddle/fluid/framework/framework.proto"
"paddle/fluid/framework/framework.proto"
"python/paddle/fluid/compiler.py"
"paddle/fluid/operators/distributed/send_recv.proto.in"
)
"paddle/fluid/operators/distributed/send_recv.proto.in"
)
for
API_FILE
in
${
API_FILES
[*]
}
;
do
for
API_FILE
in
${
API_FILES
[*]
}
;
do
API_CHANGE
=
`
git diff
--name-only
upstream/
$BRANCH
|
grep
"
${
API_FILE
}
"
||
true
`
API_CHANGE
=
`
git diff
--name-only
upstream/
$BRANCH
|
grep
"
${
API_FILE
}
"
||
true
`
...
...
python/paddle/fluid/compiler.py
浏览文件 @
8b1672fe
...
@@ -136,7 +136,7 @@ class CompiledProgram(object):
...
@@ -136,7 +136,7 @@ class CompiledProgram(object):
Returns:
Returns:
self
self
"""
"""
assert
not
self
.
_is_data_parallel
,
"Cannot compile both data parallel and inference
.
"
assert
not
self
.
_is_data_parallel
,
"Cannot compile both data parallel and inference"
assert
not
self
.
_is_inference
,
"Already compiled with inference"
assert
not
self
.
_is_inference
,
"Already compiled with inference"
assert
any
([
assert
any
([
...
@@ -218,13 +218,12 @@ class CompiledProgram(object):
...
@@ -218,13 +218,12 @@ class CompiledProgram(object):
places
=
list
(
map
(
_place_obj
,
self
.
_places
))
places
=
list
(
map
(
_place_obj
,
self
.
_places
))
pe
=
core
.
ParallelExecutor
(
return
core
.
ParallelExecutor
(
places
,
places
,
set
(
self
.
_persistable_vars
),
set
(
self
.
_persistable_vars
),
cpt
.
to_text
(
self
.
_loss_name
)
cpt
.
to_text
(
self
.
_loss_name
)
if
self
.
_loss_name
else
six
.
u
(
''
),
self
.
_scope
,
self
.
_local_scopes
,
if
self
.
_loss_name
else
six
.
u
(
''
),
self
.
_scope
,
self
.
_local_scopes
,
self
.
_exec_strategy
,
self
.
_build_strategy
,
self
.
_graph
)
self
.
_exec_strategy
,
self
.
_build_strategy
,
self
.
_graph
)
return
pe
def
_compile_inference
(
self
):
def
_compile_inference
(
self
):
return
core
.
create_paddle_predictor
(
self
.
_infer_config
)
return
core
.
create_paddle_predictor
(
self
.
_infer_config
)
...
...
python/paddle/fluid/executor.py
浏览文件 @
8b1672fe
...
@@ -538,6 +538,7 @@ class Executor(object):
...
@@ -538,6 +538,7 @@ class Executor(object):
else
:
else
:
# TODO(panyx0718): Can compile program to optimize executor
# TODO(panyx0718): Can compile program to optimize executor
# performance.
# performance.
# TODO(panyx0718): executor should be able to run graph.
assert
program
.
_program
,
"CompiledProgram is compiled from graph, can only run with_data_parallel."
assert
program
.
_program
,
"CompiledProgram is compiled from graph, can only run with_data_parallel."
return
self
.
_run
(
return
self
.
_run
(
program
.
_program
,
program
.
_program
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录