-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix paddle.where #9652
Fix paddle.where #9652
Conversation
Thanks for your contribution! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9652 +/- ##
===========================================
- Coverage 52.81% 52.81% -0.01%
===========================================
Files 710 710
Lines 111238 111241 +3
===========================================
Hits 58749 58749
- Misses 52489 52492 +3 ☔ View full report in Codecov by Sentry. |
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
expanded_attn_mask = paddle.where(expanded_attn_mask.cast("bool"), x, y).astype(dtype) | ||
elif get_env_device() == "xpu": | ||
x = paddle.to_tensor(0.0, dtype="float32") | ||
y = paddle.to_tensor(-1.7005809656952787e38, dtype="float32") |
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.
这里默认fp32吗?结束之后缺少.astype(dtype),是否结果一致?
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.
是的,xpu的fa算子需要输入mask为fp32数据类型
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.
已确认,XPU使用fp32
PR types
Bug fixes
PR changes
Models
Description
Force condition of
padlde.where
to be a boolean tensor.