You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.
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
Performance optimization
PR changes
Others
Description
PCard-71568
本PR主要是增加了一种在pp策略下的子图编排策略,用来 overlap pp不同stage之间forward-job的send/recv和计算,提升大模型推训端到端性能。主要工作如下:
_overlap_send_recv
函数,用于升级_insert_sync_for_fthenb_1f1b
,去除借助c_sync_calc_stream
和c_sync_comm_stream
来同步程序的逻辑,但是该函数可能会增加显存峰值,所以增加enable_send_recv_overlap
参数进行控制,并默认关闭。pipeline_scheduler_Eager1F1B
的pipeline pass,在enable_send_recv_overlap==True
的前提下,提升大模型执行速度,但是会增加显存峰值。综上:在显存不是瓶颈的情况下,开启
Eager1F1B
能够单机下可获得1%的性能提升,多机下可获得2%~6%的提升(提升的幅度跟send/recv的通信耗时有关),可以根据具体的模型使能该策略。相关论文On Optimizing the Communication of Model Parallelism