Skip to content

fix a bug, create_parameter not supprot paddle.bfloat16 #72451

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

Merged

Conversation

wanghuancoder
Copy link
Contributor

@wanghuancoder wanghuancoder commented Apr 24, 2025

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

create_parameter只支持VarType和字符串类型。如果传入Dtype类型,早期是把他转为字符串类型。而为了适配numpy没有bfloat16的情况,convert_dtype将paddle.bfloat16转为了"uint16"。
修改create_parameter,如果为Dtype类型,则转为VarType类型。

修复后:

1745479735174

Pcard-67164

Copy link

paddle-bot bot commented Apr 24, 2025

你的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.

@wanghuancoder wanghuancoder merged commit e21615a into PaddlePaddle:develop Apr 25, 2025
43 of 44 checks passed
YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request May 7, 2025
…#72451)

* fix a bug, create_parameter not supprot paddle.bfloat16
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