-
Notifications
You must be signed in to change notification settings - Fork 825
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
Auto FixPipelineStageIdPass #6204
Merged
Merged
Conversation
This file contains 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
strint
reviewed
Sep 9, 2021
leaves-zwx
reviewed
Sep 9, 2021
…dev_cc_fix_pipeline_stage
chengtbf
commented
Sep 10, 2021
CHECK_GE_OR_RETURN(max_stage_id, 0); | ||
for (const OpNode* this_node : pair.second) { | ||
int64_t this_stage_id = GetStageIdHint(this_node); | ||
if (this_stage_id != max_stage_id) { |
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.
重构了算法,现在主体逻辑大幅简化:
每个 Placement Group 寻找最大的 stage id,将其余的 op,如果 stage id 小于这个 最大值,就 merge 到最大值
自己本地测试是没问题的
leaves-zwx
reviewed
Sep 10, 2021
leaves-zwx
approved these changes
Sep 10, 2021
strint
approved these changes
Sep 10, 2021
CI failed, removing label automerge |
Speed stats:
|
CI failed, removing label automerge |
Speed stats:
|
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.
用户配置 Pipeline stage id 并不一定可以严格的保证 stage 连续(尤其是 module 衔接处的 op,如 to_consistent),因此我们需要有个算法来自动修复出错的 stage id。(本身 用户配置的实际上也是 pipeline stage id hint,oneflow 内部有权修改为更合适的值)
算法: