提交 3b49372f 编写于 作者: L Li Fuchen 提交者: Yibing Liu

Set lod level of sequence_unpad's output to 1 in compile time (#20068) (#20137)

* Set lod level of sequence_unpad's output to 1 in compile time

test=release/1.6
上级 c5fe228c
......@@ -57,6 +57,11 @@ class SequenceUnpadOp : public framework::OperatorWithKernel {
}
}
ctx->SetOutputDim("Out", framework::make_ddim(out_dims_vec));
if (!ctx->IsRuntime()) {
framework::VarDesc* out_desc =
boost::get<framework::VarDesc*>(ctx->GetOutputVarPtrs("Out")[0]);
out_desc->SetLoDLevel(1);
}
}
protected:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册