From 3fb4a08c016ee1ae96cf052576c5d67418d837fe Mon Sep 17 00:00:00 2001 From: xiaoxiaohehe001 <49090790+xiaoxiaohehe001@users.noreply.github.com> Date: Thu, 12 Jan 2023 15:02:45 +0800 Subject: [PATCH] fix_split (#49743) --- paddle/phi/infermeta/unary.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/phi/infermeta/unary.cc b/paddle/phi/infermeta/unary.cc index da24fed946..04373fa29e 100644 --- a/paddle/phi/infermeta/unary.cc +++ b/paddle/phi/infermeta/unary.cc @@ -3437,11 +3437,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); } } } @@ -3472,11 +3472,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 { @@ -3563,11 +3563,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 { -- GitLab