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 a fix for single-GPU nsys. #11354

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tfogal
Copy link

@tfogal tfogal commented Nov 21, 2024

The SingleDeviceStrategy never sets the requisite attribute; workaround it in the profiling code.

What does this PR do ?

Fixes using the nsys callback for single-GPU benchmarking.

Collection: core

Changelog

  • Fix for cuda profiling of single-GPU runs

Usage

   nsyscb = nl.pytorch.callbacks.nsys.NsysCallback(
     start_step=0,
     end_step=40,
     ranks=[0],
     gen_shape=False,
   )
  llm.api.finetune(..., callbacks=[nsyscb])

is how I am using it.

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? Not sure how to test this. Let's first get some confirmation that this is even the right approach
  • Did you add or update any necessary documentation? Let's first get some confirmation that this is even the right approach
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc) N/A
    • 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)

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:


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

Thank you for improving NeMo's documentation!

@akoumpa
Copy link
Member

akoumpa commented Nov 21, 2024

@tfogal NeMo commits need to have --signoff can you amend and push again? In the meantime I've started CI since it takes a few hours to complete. If CI has passed before you push we can ask someone to force merge if needed.

@akoumpa akoumpa self-requested a review November 21, 2024 12:47
The SingleDeviceStrategy never sets the requisite attribute;
workaround it in the profiling code.

Signed-off-by: Tom Fogal <60981+tfogal@users.noreply.github.com>
@tfogal tfogal force-pushed the tfogal/potential-single-gpu-nsys-fix branch from dbb1267 to ecc8a1f Compare November 21, 2024 17:57
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.

2 participants