-
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
Fix reduce func bug in process_group_bkcl #49749
Conversation
Also catch up with a recent process_group PR that failed to add XPU branch. Note that reduce is still accomplished by allreduce for xpu. Fix this should xccl lib be updated.
你的PR提交成功,感谢你对开源项目的贡献! |
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
@@ -277,7 +277,8 @@ std::shared_ptr<ProcessGroup::Task> ProcessGroupBKCL::Reduce( | |||
const phi::DenseTensor& input, | |||
BKCLContext_t comm, | |||
const XPUStream& stream) { | |||
phi::DenseTensor output_t(*output); | |||
phi::DenseTensor output_t; | |||
paddle::framework::TensorCopy(*output, platform::XPUPlace(), &output_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.
TensorCopy会自己分配空间,对吧?
之后可以考虑直接实现一个Reduce,在模型并行sharding中Reduce用的比较多;
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.
会自己分配空间,reduce等xccl kernel实现后我更新一下
你的PR已合入Paddle库,请关注后续测试结果。 |
* Fix reduce func bug in process_group_bkcl Also catch up with a recent process_group PR that failed to add XPU branch. Note that reduce is still accomplished by allreduce for xpu. Fix this should xccl lib be updated. * fix compile issue for non-XPU
PR types
Bug fixes
PR changes
Others
Describe
Fix reduce func bug in process_group_bkcl. Also catch up with a recent process_group PR that failed to add XPU branch. Note that reduce is still accomplished by allreduce for xpu. Fix this should xccl lib be updated.