-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
CUDA memory profile #9096
CUDA memory profile #9096
Conversation
Signed-off-by: Sangkug Lym <slym@nvidia.com>
for more information, see https://pre-commit.ci
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.
Hi @erhoo82,
I'm going to approve this as is, with one suggestion:
I searched for hasattr(self, '_memory_profile_enabled')
and found 11 occurrences. Something like self.has_memory_profile_enabled()
would result in cleaner code, for example, if the has_memory_profile_enabled
was defined in modelPT.py.
However, that's not a hard requirement as the hasattr
is widely used in NeMo.
Thank you so much, this is helpful feature to have in NeMo.
* CUDA memory profile Signed-off-by: Sangkug Lym <slym@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Sangkug Lym <slym@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Eric Harper <complex451@gmail.com> Signed-off-by: Boxiang Wang <boxiangw@nvidia.com>
* CUDA memory profile Signed-off-by: Sangkug Lym <slym@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Sangkug Lym <slym@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Eric Harper <complex451@gmail.com>
What does this PR do ?
Profile CUDA memory breakdown. The reference is available in the below link.
https://pytorch.org/blog/understanding-gpu-memory-1/
The memory profile will generate a
pickle file
and a user can load the file in the below page.https://pytorch.org/memory_viz
Changelog
Usage
Add the below knobs to the yaml run config.
GitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information