fix compile&runtime lod_equality of lod_reset (#22737)

revert-22710-feature/integrated_ps_api
GaoWei8 5 years ago committed by GitHub
parent 175954d894
commit ba140222d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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', \

Loading…
Cancel
Save