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

Add NVTX ranges to categorize execution #11945

Merged
merged 22 commits into from
Mar 4, 2025

Conversation

minitu
Copy link
Contributor

@minitu minitu commented Jan 23, 2025

What does this PR do ?

Adds NVTX ranges inside NeMo to categorize different parts of the execution.
For now the PR only adds an NVTX range around the MCore optimizer step.

Collection: [Note which collection this PR will affect]

Changelog

  • Add specific line by line info of high level changes in this PR.

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

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:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

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

  • Related to # (issue)

@github-actions github-actions bot added the core Changes to NeMo Core label Jan 23, 2025
@minitu minitu force-pushed the llama31_automated_breakdown branch from d57eb00 to b4891a4 Compare January 23, 2025 21:24
@minitu
Copy link
Contributor Author

minitu commented Jan 23, 2025

@gautham-kollu

Copy link
Contributor

beep boop 🤖: 🚨 The following files must be fixed before merge!


Your code was analyzed with PyLint. The following annotations have been identified:

************* Module nemo.utils.nvtx
nemo/utils/nvtx.py:26:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/utils/nvtx.py:31:0: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 8.18/10

Mitigation guide:

  • Add sensible and useful docstrings to functions and methods
  • For trivial methods like getter/setters, consider adding # pylint: disable=C0116 inside the function itself
  • To disable multiple functions/methods at once, put a # pylint: disable=C0116 before the first and a # pylint: enable=C0116 after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!

Copy link
Contributor

beep boop 🤖: 🙏 The following files have warnings. In case you are familiar with these, please try helping us to improve the code base.


Your code was analyzed with PyLint. The following annotations have been identified:

************* Module nemo.core.optim.mcore_optim
nemo/core/optim/mcore_optim.py:49:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/optim/mcore_optim.py:52:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/optim/mcore_optim.py:55:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/optim/mcore_optim.py:58:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/optim/mcore_optim.py:94:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/optim/mcore_optim.py:97:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/optim/mcore_optim.py:114:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/optim/mcore_optim.py:117:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/optim/mcore_optim.py:20:4: W0611: Unused MegatronOptimizer imported from megatron.core.optimizer.optimizer (unused-import)

-----------------------------------
Your code has been rated at 8.27/10

Mitigation guide:

  • Add sensible and useful docstrings to functions and methods
  • For trivial methods like getter/setters, consider adding # pylint: disable=C0116 inside the function itself
  • To disable multiple functions/methods at once, put a # pylint: disable=C0116 before the first and a # pylint: enable=C0116 after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!

@minitu
Copy link
Contributor Author

minitu commented Feb 6, 2025

@marcromeyn @hemildesai Pinging for reviews, code has been updated to use NsysCallback and AppState

gautham-kollu
gautham-kollu previously approved these changes Feb 12, 2025
Jaemin Choi and others added 17 commits February 25, 2025 16:57
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: minitu <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: minitu <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: minitu <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: minitu <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: minitu <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
Signed-off-by: minitu <[email protected]>
Signed-off-by: Jaemin Choi <[email protected]>
@minitu minitu force-pushed the llama31_automated_breakdown branch from 153a911 to d55fbac Compare February 26, 2025 00:57
Signed-off-by: Jaemin Choi <[email protected]>
gautham-kollu
gautham-kollu previously approved these changes Mar 1, 2025
Jaemin Choi added 2 commits February 28, 2025 17:16
Copy link
Collaborator

@gautham-kollu gautham-kollu left a comment

Choose a reason for hiding this comment

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

LGTM

@ko3n1g ko3n1g merged commit a1a9745 into NVIDIA:main Mar 4, 2025
206 of 357 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants