-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Improvements to Communication Logger #7404
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
Conversation
In `comms_logging.py`, when calling log_all and the `show_straggler` option is enabled, an all_reduce is performed across all nodes to calculate the minimum latency to find stragglers. However, the tensors on which this is performed are not sent to the configured devices. This commit adds this capability using deepspeed's abstract accelerator api. Signed-off-by: Alex Kiefer <[email protected]>
The current implementation of the communication logging api is somewhat limited in its ability to get in depth information about model operations. For example, currently the log is only able to print to stdout, though the information about communications may be useful to have in its raw form, (ie logging to wandb or tensorboard during training). The logs are also cumulative due it being a global variable. If, for example, we would like to get information about each specific epoch/iteration, we could not easily do this. This commit adds the following features - ability to return communication logs as dictionaries, rather than only printing to stdout - convenience helper functions for getting information about current logs - ability to clear existing log operations - additional documentation for logging operations Signed-off-by: Alex Kiefer <[email protected]>
Signed-off-by: Alex Kiefer <[email protected]>
|
|
||
| summary[msg_size] = { | ||
| "count": count, | ||
| "total_latency_ms": total_lat, |
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.
To improve usability (avoid typo issues), it would help to convert this hardcoded constants to enums?
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.
Are you referencing the second parameters passed to trim_mean ? I am not sure which hardcoded constants you are referencing here.
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.
I am referring to constants such as "count", "total_latency_ms", and "avg_straggler_ms". These are used multiple times and prone to typo errors.
These changes add - ability to return communication logs as dictionaries, rather than only printing to stdout - convenience helper functions for getting information about current logs - ability to clear existing log operations - additional documentation for logging operations These address points made in deepspeedai#7403 --------- Signed-off-by: Alex Kiefer <[email protected]> Co-authored-by: Masahiro Tanaka <[email protected]> Co-authored-by: Olatunji Ruwase <[email protected]> Co-authored-by: Hongwei Chen <[email protected]> Co-authored-by: Logan Adams <[email protected]>
These changes add - ability to return communication logs as dictionaries, rather than only printing to stdout - convenience helper functions for getting information about current logs - ability to clear existing log operations - additional documentation for logging operations These address points made in deepspeedai#7403 --------- Signed-off-by: Alex Kiefer <[email protected]> Co-authored-by: Masahiro Tanaka <[email protected]> Co-authored-by: Olatunji Ruwase <[email protected]> Co-authored-by: Hongwei Chen <[email protected]> Co-authored-by: Logan Adams <[email protected]> Signed-off-by: lym <[email protected]>
These changes add - ability to return communication logs as dictionaries, rather than only printing to stdout - convenience helper functions for getting information about current logs - ability to clear existing log operations - additional documentation for logging operations These address points made in deepspeedai#7403 --------- Signed-off-by: Alex Kiefer <[email protected]> Co-authored-by: Masahiro Tanaka <[email protected]> Co-authored-by: Olatunji Ruwase <[email protected]> Co-authored-by: Hongwei Chen <[email protected]> Co-authored-by: Logan Adams <[email protected]>
These changes add
These address points made in #7403