未验证 提交 ba140222 编写于 作者: G GaoWei8 提交者: GitHub

fix compile&runtime lod_equality of lod_reset (#22737)

上级 175954d8
......@@ -41,6 +41,20 @@ class LoDResetOp : public framework::OperatorWithKernel {
if (append) {
ctx->ShareLoD("X", /*->*/ "Out");
}
if (ctx->HasInput("Y")) {
if (!ctx->IsRuntime()) {
ctx->SetLoDLevel("Out", std::max(ctx->GetLoDLevel("Y"), 1));
}
} else if (append) {
if (!ctx->IsRuntime()) {
ctx->SetLoDLevel("Out", std::max(ctx->GetLoDLevel("X") + 1, 1));
}
} else {
if (!ctx->IsRuntime()) {
ctx->SetLoDLevel("Out", 1);
}
}
ctx->SetOutputDim("Out", ctx->GetInputDim("X"));
}
......
......@@ -19,7 +19,6 @@
# 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', \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册