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

layer.to api support numpy.dtype and paddle.dtype #38018

Merged

Conversation

MingMingShangTian
Copy link
Contributor

@MingMingShangTian MingMingShangTian commented Dec 9, 2021

PR types

New features

PR changes

APIs

Describe

Issue37932 反馈 layer.to 不支持paddle.dtype类型的问题,新增了对这类型的支持。

issue反馈的是release2.2版本情况,但是develop 分支与release2.2 相比,可以支持paddle.float16 这类的类型,却不支持np.float16 这类的类型。
其原因是develop分支合入的PR #36862 #37156 修改了类型转化为paddle.dtype的规则,没对numpy.dtype的类型转换为paddle.dtype类型。在此一并进行了修复。

@paddle-bot-old
Copy link

paddle-bot-old bot commented Dec 9, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

zhangbo9674
zhangbo9674 previously approved these changes Dec 10, 2021
Copy link
Contributor

@zhangbo9674 zhangbo9674 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@zhangbo9674 zhangbo9674 left a comment

Choose a reason for hiding this comment

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

LGTM

@MingMingShangTian MingMingShangTian merged commit f1c2823 into PaddlePaddle:develop Dec 14, 2021
@MingMingShangTian MingMingShangTian deleted the layer_to_support_type branch December 14, 2021 03:38
MingMingShangTian added a commit to MingMingShangTian/Paddle that referenced this pull request Dec 14, 2021
* layer.to api support numpy.dtype and paddle.dtype

* skip the layer to eaxmple code executing for env not support
lanxianghit pushed a commit that referenced this pull request Dec 15, 2021
Issue37932 反馈 layer.to 不支持paddle.dtype类型的问题,新增了对这类型的支持。详情见:#38018
同时,也一并cherry-pick了遗漏的 PR 36779 的commit。

修改内容:
Cherry-pick #36779
cherrry-pick #38018
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.

5 participants