-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[XPU] AdamW: fp16 for moment1/moment2 #62688
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
Sorry to inform you that 125b6a1's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
moment1_output_for_xdnn, | ||
buffer_for_findmax, | ||
moment1_out->numel()); | ||
float moment1_scale_value = 65504.0f / moment1_max / 2.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请教一下珏爷,这里固定的这个值不会有问题嘛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参考per tensor scale设计。内部文档就不往外面贴了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* [XPU] AdamW: fp16 for moment1/moment2 on KL3 * fix function name typo.
PR types
New features
PR changes
OPs
Description
类似于 #57077 ,增加对“用fp16来存
moment1
和moment2
”的支持。使用方式和之前一样:目前仅在XPU下生效,通过
export xpu_adamw_moment_dtype="fp16"
来打开此功能。