-
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
add launcher, update multi client launch and exit #5414
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
Signed-off-by: daquexian <daquexian566@gmail.com>
Signed-off-by: daquexian <daquexian566@gmail.com>
Signed-off-by: daquexian <daquexian566@gmail.com>
lixinqi
reviewed
Jul 8, 2021
Signed-off-by: daquexian <daquexian566@gmail.com>
lixinqi
reviewed
Jul 8, 2021
Signed-off-by: daquexian <daquexian566@gmail.com>
daquexian
commented
Jul 8, 2021
Signed-off-by: daquexian <daquexian566@gmail.com>
lixinqi
approved these changes
Jul 8, 2021
chengtbf
reviewed
Jul 9, 2021
@@ -62,11 +62,6 @@ bool GlobalProcessCtx::IsThisProcessMaster() { | |||
return Global<ProcessCtx>::Get()->rank() == 0; | |||
} | |||
|
|||
bool GlobalProcessCtx::IsMultiClient() { | |||
CHECK_NOTNULL(Global<ProcessCtx>::Get()); | |||
return Global<ProcessCtx>::Get()->is_multi_client(); |
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.
这里只删除了 IsMultiClient 的 实现,但是没有删除 .h 里的接口? @daquexian
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.
从 PyTorch 搬运了 launcher 的实现,和 PyTorch 相比做了修改:
--use_env
参数(因为我们只支持 use_env=True)--logdir
参数的含义(从重定向 stdout 和 stderr 到 logdir 改为把日志文件保存在 logdir,通过第三条提到的 GLOG_log_dir 环境变量),增加了--redirect_stdout_and_stderr
参数提供原来的重定向功能。launcher 的基础用法是
python3 -m oneflow.distributed.launch --nproc_per_node 2 xxx.py
把 is_multi_client 这个标记从 ProcessCtx 里移到了一个专门的
Global<bool, MultiClient>
里,为了在 single client 时,可以在执行 env.init 之前就获取这个标记的值在 multi client 时,读取 GLOG_log_dir 等 glog 标准的环境变量修改 env proto 里的 CppLoggingConf
oneflow 退出时,只在 single client 下调用 MasterSendAbort
launcher 的测试用例还没有添加,因为需要改动 ci 的测试脚本