-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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] reduce_xxx and broadcast_xxx use int64_t shape #71361
[XPU] reduce_xxx and broadcast_xxx use int64_t shape #71361
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
… xpu_reduce_and_broadcast_int64_shape
LGTM |
@@ -40,8 +40,8 @@ struct SumFunctor { | |||
ctx, | |||
reinterpret_cast<const XPUType*>(x), | |||
reinterpret_cast<XPUType*>(y), | |||
xdims, | |||
reduce_dims); | |||
std::vector<int>(xdims.begin(), xdims.end()), |
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.
43,44是否要改成int64_t?
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::plugin,之前的一套实验性算子接口,没有std::vector<int64_t>的参数形式,我们一般也不会编译也不会开这个编译选项PADDLE_WITH_XPU_PLUGIN
,所以就保持其原状即可
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 Category
Custom Device
PR Types
Bug fixes
Description
reduce_xxx and broadcast_xxx use int64_t shape to prevent overflow
example:
after fixed: