Repository navigation
【训练营】Pipeline 并行自定义布局 - #223
Open
CuiLingyunCrispy wants to merge 5 commits into
Open
CuiLingyunCrispy wants to merge 5 commits into
CuiLingyunCrispy wants to merge 5 commits into
Conversation
JYMiracle305
self-requested a review
September 20, 2026 01:47
| @@ -0,0 +1,114 @@ | |||
| // Demonstration for excellent-standard #4: compare the default uniform pipeline | |||
Comment on lines
+118
to
+121
| const double efficiency = bottleneck > 0.0 ? average / bottleneck : 0.0; | ||
| const double imbalance_bubble = 1.0 - efficiency; | ||
|
|
||
| // Use LOG(ERROR) so the summary reaches stderr even when glog's stderrthreshold |
Contributor
There was a problem hiding this comment.
出于什么考虑,性能打印要设置LOG(ERROR) 级别打印
Author
There was a problem hiding this comment.
一是main.cc里用的也是log(error),二是根据我的理解, glog 默认 stderrthreshold=2,只有 ERROR 及以上级别才会打到 stderr,INFO 只会进日志文件。如果这里有需要改动的话,我也可以进行修改。
| > Both options are optional and can be disabled for CPU-only builds. | ||
|
|
||
| ## ✨ InfiniTrain Overview | ||
| ## ✨ InfiniTrain Overview |
Contributor
There was a problem hiding this comment.
请恢复 README.md 没有实际改动的修改
| @@ -0,0 +1,111 @@ | |||
| #!/usr/bin/env bash | |||
Contributor
There was a problem hiding this comment.
不建议设置一个脚本验证 pipeline 非均匀切分,可以单独添加测例的配置到 test_config.json,同时能验证到 GPT2 和 LLaMA3
…e test into test_config
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