未验证 提交 5365cd2f 编写于 作者: L Li Fuchen 提交者: GitHub

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

* Set lod level of sequence_unpad's output to 1 in compile time
上级 425279a5
...@@ -57,6 +57,11 @@ class SequenceUnpadOp : public framework::OperatorWithKernel { ...@@ -57,6 +57,11 @@ class SequenceUnpadOp : public framework::OperatorWithKernel {
} }
} }
ctx->SetOutputDim("Out", framework::make_ddim(out_dims_vec)); 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: protected:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册