Skip to content
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

[feature] add pytorch profiling #2182

Merged
merged 4 commits into from
Dec 16, 2024
Merged

[feature] add pytorch profiling #2182

merged 4 commits into from
Dec 16, 2024

Conversation

winglian
Copy link
Collaborator

Screenshot 2024-12-12 at 8 48 59 PM

Copy link
Contributor

@djsaunde djsaunde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but can we add inline comments and / or some documentation of this config option?

):
if state.global_step == self.steps_to_profile:
snapshot = torch.cuda.memory._snapshot() # pylint: disable=protected-access
with open(Path(args.output_dir) / "snapshot.pickle", "wb") as fout:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we maybe output to a non-pickle file for safety reasons (shared to others , tampered, etc)? How would a person also read this file and display it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe there are any other options that the visualizer supports as input. I added docs but forgot to push them earlier.

@winglian winglian merged commit 3309048 into main Dec 16, 2024
djsaunde pushed a commit that referenced this pull request Dec 16, 2024
* add pytorch profiling

* kick off the profiler asap since things may get allcoated before train start

* document feature

* add url for visualizer [skip ci]
djsaunde pushed a commit that referenced this pull request Dec 17, 2024
* add pytorch profiling

* kick off the profiler asap since things may get allcoated before train start

* document feature

* add url for visualizer [skip ci]
djsaunde pushed a commit that referenced this pull request Dec 17, 2024
* add pytorch profiling

* kick off the profiler asap since things may get allcoated before train start

* document feature

* add url for visualizer [skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants