Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
9e29d3eb
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2310
Star
20933
Fork
5423
代码
文件
提交
分支
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看板
未验证
提交
9e29d3eb
编写于
2月 11, 2020
作者:
H
huzhiqiang
提交者:
GitHub
2月 11, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【OpPorting Example】DEMO OF FIX COMPILE&RUNTIME LOD_EQUALITY (#22460)
上级
00c110f3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
7 deletion
+33
-7
paddle/fluid/operators/sequence_ops/sequence_erase_op.cc
paddle/fluid/operators/sequence_ops/sequence_erase_op.cc
+9
-0
paddle/fluid/operators/sequence_ops/sequence_reshape_op.cc
paddle/fluid/operators/sequence_ops/sequence_reshape_op.cc
+3
-0
python/paddle/fluid/tests/unittests/white_list/compile_vs_runtime_white_list.py
...sts/unittests/white_list/compile_vs_runtime_white_list.py
+21
-7
未找到文件。
paddle/fluid/operators/sequence_ops/sequence_erase_op.cc
浏览文件 @
9e29d3eb
...
...
@@ -32,6 +32,15 @@ class SequenceEraseOp : public framework::OperatorWithKernel {
"Input(X) of SequenceEraseOp should be a 2-D LoDTensor "
"with the 2nd dimension equal to 1."
);
ctx
->
SetOutputDim
(
"Out"
,
x_dims
);
// The output LoDTensor's lod_level should be input X's lod_level.
// For compile-time, we call SetLoDLevel to set output's lod_level.
// For runtime, output LoDTensor's lod is determined by input X's lod and
// the level specified by input RandTable.
// We cannot get X's detail lod and RankTable's level in this function, so
// leave this work to the detail kernel implementation.
if
(
!
ctx
->
IsRuntime
())
{
ctx
->
SetLoDLevel
(
"Out"
,
ctx
->
GetLoDLevel
(
"X"
));
}
}
};
...
...
paddle/fluid/operators/sequence_ops/sequence_reshape_op.cc
浏览文件 @
9e29d3eb
...
...
@@ -37,6 +37,9 @@ class SequenceReshapeOp : public framework::OperatorWithKernel {
}
else
{
// when compiling, the batch size is undetermined, just set to -1
ctx
->
SetOutputDim
(
"Out"
,
{
-
1
,
static_cast
<
int64_t
>
(
new_dim
)});
// when compiling, the LodLevel of Out is set to be 1, which is consistent
// with that in running time.
ctx
->
SetLoDLevel
(
"Out"
,
1
);
}
}
};
...
...
python/paddle/fluid/tests/unittests/white_list/compile_vs_runtime_white_list.py
浏览文件 @
9e29d3eb
...
...
@@ -19,11 +19,25 @@
# reasons for skipping compile_vs_runtime test or be fixed later.
COMPILE_RUN_OP_WHITE_LIST
=
[
'lod_reset'
,
'sequence_pool'
,
'sequence_slice'
,
'generate_mask_labels'
,
'sequence_reshape'
,
'generate_proposals'
,
'mine_hard_examples'
,
'retinanet_detection_output'
,
'ctc_align'
,
'fusion_seqpool_cvm_concat'
,
'gru'
,
'sequence_erase'
,
'rpn_target_assign'
,
'retinanet_target_assign'
,
'filter_by_instag'
,
'multiclass_nms'
,
'multiclass_nms2'
,
'im2sequence'
,
'generate_proposal_labels'
,
'distribute_fpn_proposals'
,
'detection_map'
,
'locality_aware_nms'
,
'var_conv_2d'
'lod_reset'
,
\
'sequence_pool'
,
\
'sequence_slice'
,
\
'generate_mask_labels'
,
\
'generate_proposals'
,
\
'mine_hard_examples'
,
\
'retinanet_detection_output'
,
\
'ctc_align'
,
\
'fusion_seqpool_cvm_concat'
,
\
'gru'
,
\
'rpn_target_assign'
,
\
'retinanet_target_assign'
,
\
'filter_by_instag'
,
\
'multiclass_nms'
,
\
'multiclass_nms2'
,
\
'im2sequence'
,
\
'generate_proposal_labels'
,
\
'distribute_fpn_proposals'
,
\
'detection_map'
,
\
'locality_aware_nms'
,
\
'var_conv_2d'
]
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录