【训练营】Pipeline 并行自定义布局 - #223
Open
CuiLingyunCrispy wants to merge 4 commits into
Open
CuiLingyunCrispy wants to merge 4 commits into
CuiLingyunCrispy wants to merge 4 commits into
Conversation
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.
背景
为 InfiniTrain 增加统一的 Pipeline 并行自定义布局(Pipeline Layout)能力:用户可通过命令行显式配置各 Pipeline Stage 的 Transformer 层范围及 Embedding / FinalNorm / LMHead 的归属,并支持自动负载均衡布局建议与 Pipeline 负载分析。
主要改动
统一 PipelineLayout 数据结构,按用户提供的每层计算代价或按每层参数量等自动建议布局;对布局合法性进行校验以及分析Pipeline 负载分析
对标标准
测试
(1)单元测试:
tests/distributed/test_pipeline_layout.cc(12 用例)+test_pipeline_layout_suggest.cc(22 用例),全部通过(2)端到端:
scripts/verify_pipeline_layout_correctness.sh(PP=1 单卡 vs PP=27,5,逐 step loss 对比)文档
docs/pipeline_layout_guide.mddocs/pipeline_layout_demo.cc