-
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][PHI Kernels] support fused_rotary_position_embedding for xpu #59480
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
if (use_neox_rotary_style) { | ||
// TODO(lijin23): support rotary_embedding every_two. | ||
PADDLE_THROW(phi::errors::Unimplemented( | ||
"XPU do not support rotary_embedding with use_neox_rotary_style set.")); |
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.
相关API算子暂不支持fp16输入的sin、cos,待后续api支持后下个PR更新
p_fw, p_bw = self.get_forward_backward( | ||
paddle_fused_rotary_position_embedding, | ||
seed=self.seed, | ||
use_neox_rotary_style=False, |
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.
所有单测暂时指定use_neox_rotary_style=False
,待后续支持后完善
from paddle.incubate.nn.functional import fused_rotary_position_embedding | ||
|
||
|
||
def deal_qkv(init_q, init_k, init_v): |
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.
后续提交可以改个名字,permute_qkv类似这种
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.
OK
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
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
PR types
New features
PR changes
OPs
Description
support fused_rotary_position_embedding for xpu. Do not support
use_neox_rotary_style=True
temporarily