提交 e5e699ec 编写于 作者: L Liufang Sang 提交者: whs

set lod level for compile time test=develop (#21022)

上级 226bc22a
......@@ -39,6 +39,12 @@ class Im2SequenceOp : public framework::OperatorWithKernel {
auto kernels = ctx->Attrs().Get<std::vector<int>>("kernels");
auto strides = ctx->Attrs().Get<std::vector<int>>("strides");
auto paddings = ctx->Attrs().Get<std::vector<int>>("paddings");
if (!ctx->IsRuntime()) {
// set lod level for compile-time
framework::VarDesc* out_desc =
boost::get<framework::VarDesc*>(ctx->GetOutputVarPtrs("Out")[0]);
out_desc->SetLoDLevel(1);
}
ctx->SetOutputDim("Out",
{in_dim[0], img_channels * kernels[0] * kernels[1]});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册