-
Notifications
You must be signed in to change notification settings - Fork 1
[TEMP]feat: add torch profiler for the function update_weights
#10
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
Changes from all commits
cd23f8b
ea38293
5189204
d3ee45b
3dbbb95
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1050,6 +1050,24 @@ def add_debug_arguments(parser): | |
| default="torch", | ||
| ) | ||
| parser.add_argument("--check-weight-update-equal", action="store_true") | ||
| parser.add_argument( | ||
| "--use-pytorch-profiler-update-weight", | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this impact performance of the run? If not, let's just set it default on
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we're not targeting at merging this feature into the official slime repo, i think it's ok. And i'll also tag this pr with
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aight |
||
| action="store_true", | ||
| default=False, | ||
| help="Enable PyTorch profiler for weight update operations. Requires --tensorboard-dir to be set.", | ||
| ) | ||
| parser.add_argument( | ||
| "--profile-update-weight-start", | ||
| type=int, | ||
| default=0, | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's just have the start default to 1, and log everything afterwards? We only do 3 training steps anyways and this profiler will only be used for our profiling configs.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you mean we could skip the first step? |
||
| help="After enabling PyTorch profiler for weight update operations, start profiling from this point. Requires --tensorboard-dir to be set.", | ||
| ) | ||
| parser.add_argument( | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and I'd prefer we remove this
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or keep it, just like the profiler of slime itself?
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh they have this also?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the interesting part. Slime and Megatron-LM share the same argument Basically, when |
||
| "--profile-update-weight-end", | ||
| type=int, | ||
| default=1, | ||
| help="After enabling PyTorch profiler for weight update operations, end profiling at this point. Requires --tensorboard-dir to be set.", | ||
| ) | ||
| return parser | ||
|
|
||
| def add_network_arguments(parser): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.