Support both use_calc_stream and sync_op in collective communication API#46761
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
LiYuRio
reviewed
Oct 8, 2022
LiYuRio
reviewed
Oct 8, 2022
LiYuRio
reviewed
Oct 8, 2022
b5cad1a to
447a6e8
Compare
LiYuRio
previously approved these changes
Oct 9, 2022
LiYuRio
reviewed
Oct 10, 2022
7069753 to
5a2685a
Compare
LiYuRio
approved these changes
Oct 11, 2022
liuTINA0907
approved these changes
Oct 11, 2022
HermitSun
added a commit
to HermitSun/Paddle
that referenced
this pull request
Oct 12, 2022
XiaoguangHu01
pushed a commit
that referenced
this pull request
Oct 17, 2022
* Support both use_calc_stream and sync_op in send recv APIs (#46023) * Support both use_calc_stream and sync_op in allgather API (#46295) * Support both use_calc_stream and sync_op in collective communication API (#46761) * Move group and all reduce from collective to communication (#45848) * Completes bfloat16 dtype for collective api in eager mode (#45844) * Fix collective APIs cannot be recognized when building docs (#46962) Co-authored-by: LiYuRio <63526175+LiYuRio@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
New features
PR changes
APIs
Describe
In the new communication library, we designed ProcessGroup to manage different communication group. Inside each process_group has its own stream which all communications in this group will be done on this stream. For high level API, like
distributed.all_reduce, we useuse_calc_streamto indicate whether this operation is sync or not. Notice that frequently add unnecessary cuda events may lead to low performance on some model. In order to achieve high performance, this pr add a new API name distributed.stream.all_reduce. This new API provideduse_calc_streamandsync_opboth.sync_op, indicate whether communication is sync or not.use_calc_stream, do communicate on calc stream, save the time of switching stream. Only work whensync_opis true.对应文档的中文api修改,见 PaddlePaddle/docs#5237
TODO: