diff --git a/paddle/phi/infermeta/unary.cc b/paddle/phi/infermeta/unary.cc index 2fdb32644adde6a2c5b369041431f606b229bad9..b68d4ab0a17b1b9884202d9bf1ed2e6838f126ab 100644 --- a/paddle/phi/infermeta/unary.cc +++ b/paddle/phi/infermeta/unary.cc @@ -3184,11 +3184,11 @@ void FillSplitOutDims(const MetaTensor& x, (*out)[i]->set_dtype(x.dtype()); (*out)[i]->set_dims(out_dims[i]); (*out)[i]->set_layout(x.layout()); + (*out)[i]->share_lod(x); } else { (*out)[i]->set_dtype(x.dtype()); (*out)[i]->set_dims(out_dims[i]); (*out)[i]->set_layout(x.layout()); - (*out)[i]->share_lod(x); } } } @@ -3219,11 +3219,11 @@ void SplitInferMeta(const MetaTensor& x, out[i]->set_dtype(x.dtype()); out[i]->set_dims(out_dims[i]); out[i]->set_layout(x.layout()); + out[i]->share_lod(x); } else { out[i]->set_dtype(x.dtype()); out[i]->set_dims(out_dims[i]); out[i]->set_layout(x.layout()); - out[i]->share_lod(x); } } } else { @@ -3310,11 +3310,11 @@ void SplitWithNumInferMeta(const MetaTensor& x, out[i]->set_dtype(x.dtype()); out[i]->set_dims(out_dims[i]); out[i]->set_layout(x.layout()); + out[i]->share_lod(x); } else { out[i]->set_dtype(x.dtype()); out[i]->set_dims(out_dims[i]); out[i]->set_layout(x.layout()); - out[i]->share_lod(x); } } } else {