提交 0af85497 编写于 作者: Z Zeng Jinle 提交者: gongweibao

fix seg fault of share lod, test=develop (#19573)

上级 cef95ee3
......@@ -648,7 +648,7 @@ class RuntimeInferShapeContext : public InferShapeContext {
Variable* out_var = out_it->second.at(j);
PADDLE_ENFORCE(out_var->IsType<LoDTensor>(),
"The %d-th output of Output(%s) must be LoDTensor.", j, out);
auto in_tensor = in_var->Get<LoDTensor>();
auto& in_tensor = in_var->Get<LoDTensor>();
auto* out_tensor = out_var->GetMutable<LoDTensor>();
out_tensor->set_lod(in_tensor.lod());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册