Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG FIX]Fix MetaTensor's bug when run infermeta #46265

Merged
merged 4 commits into from
Sep 22, 2022

Conversation

YuanRisheng
Copy link
Contributor

@YuanRisheng YuanRisheng commented Sep 20, 2022

PR types

Bug fixes

PR changes

Others

Describe

迁移了sum算子后,dsin模型在执行infermeta的时候出现了断言错误如下:
image

原因是在获取dim的时候,selectedrows的Tensor未拿到正确的dim,该pr进行了修复

@paddle-bot
Copy link

paddle-bot bot commented Sep 20, 2022

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@@ -92,7 +92,15 @@ int64_t Tensor::numel() const { return impl_->numel(); }

int64_t Tensor::size() const { return impl_->numel(); }

const phi::DDim &Tensor::dims() const { return impl_->dims(); }
const phi::DDim &Tensor::dims() const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下面selected_rows的dims实现没有变的话,这里是不是也不需要变

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done,3q

return impl_->dims();
// return phi::make_ddim(dims);
}
const DDim& dims() const noexcept override { return impl_->dims(); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里语义不正确的问题暂时没办法解决?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

后期解决

@YuanRisheng YuanRisheng merged commit f30ead1 into PaddlePaddle:develop Sep 22, 2022
YuanRisheng added a commit to YuanRisheng/Paddle that referenced this pull request Dec 26, 2022
* fix sum bug

* fix ci bugs

* fix ci bugs

* update code according comment
XiaoguangHu01 pushed a commit that referenced this pull request Dec 29, 2022
…rmeta (#49342)

* cherry-pick 45860

* [BUG FIX]Fix MetaTensor's bug when run infermeta (#46265)

* fix sum bug

* fix ci bugs

* fix ci bugs

* update code according comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants