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

log TFLOPs #9932

Merged
merged 5 commits into from
Aug 4, 2024
Merged

log TFLOPs #9932

merged 5 commits into from
Aug 4, 2024

Conversation

malay-nagda
Copy link
Collaborator

@malay-nagda malay-nagda commented Jul 26, 2024

What does this PR do ?

Log TFLOPs per sec per GPU (for LLMs)

Collection: [common, nlp, Run CICD]

Changelog

  • callbacks.append(FLOPsMeasurementCallback(self.cfg))

Usage

from pytorch_lightning import Trainer
from nemo.collections.common.metrics.perf_metrics import FLOPsMeasurementCallback

callbacks = []
flops_measurement_callback =  FLOPsMeasurementCallback(self.cfg)
callbacks.append(flops_measurement_callback)

trainer = Trainer(..., callbacks=callbacks)
...
trainer.fit(model)

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

Signed-off-by: Malay Nagda <[email protected]>
@malay-nagda malay-nagda marked this pull request as ready for review July 30, 2024 07:31
@elliottnv elliottnv requested a review from pablo-garay July 31, 2024 18:17
pablo-garay
pablo-garay previously approved these changes Aug 1, 2024
@pablo-garay
Copy link
Collaborator

Was functionality tested? All is working well - as per the testing process & results?

malay-nagda and others added 3 commits August 2, 2024 21:08
Signed-off-by: malay-nagda <[email protected]>
Signed-off-by: Malay Nagda <[email protected]>
Signed-off-by: Malay Nagda <[email protected]>
Signed-off-by: Malay Nagda <[email protected]>
@pablo-garay pablo-garay merged commit d899549 into NVIDIA:main Aug 4, 2024
221 of 222 checks passed
@TJ-Solergibert
Copy link

Hi @malay-nagda , This callback just computes the TFLOPs on training end. Do you guys have in the roadmap logging other metrics such tokens per second during training instead of just on training end? I could work on that feature!

adityavavre pushed a commit to adityavavre/NeMo that referenced this pull request Sep 15, 2024
* log TFLOPs

Signed-off-by: Malay Nagda <[email protected]>

* Apply isort and black reformatting

Signed-off-by: malay-nagda <[email protected]>
Signed-off-by: Malay Nagda <[email protected]>

* err handling

Signed-off-by: Malay Nagda <[email protected]>

* Apply isort and black reformatting

Signed-off-by: malay-nagda <[email protected]>

* cosmetic

Signed-off-by: Malay Nagda <[email protected]>

---------

Signed-off-by: Malay Nagda <[email protected]>
Signed-off-by: malay-nagda <[email protected]>
Co-authored-by: Malay Nagda <[email protected]>
Co-authored-by: malay-nagda <[email protected]>
Signed-off-by: adityavavre <[email protected]>
monica-sekoyan pushed a commit that referenced this pull request Oct 14, 2024
* log TFLOPs

Signed-off-by: Malay Nagda <[email protected]>

* Apply isort and black reformatting

Signed-off-by: malay-nagda <[email protected]>
Signed-off-by: Malay Nagda <[email protected]>

* err handling

Signed-off-by: Malay Nagda <[email protected]>

* Apply isort and black reformatting

Signed-off-by: malay-nagda <[email protected]>

* cosmetic

Signed-off-by: Malay Nagda <[email protected]>

---------

Signed-off-by: Malay Nagda <[email protected]>
Signed-off-by: malay-nagda <[email protected]>
Co-authored-by: Malay Nagda <[email protected]>
Co-authored-by: malay-nagda <[email protected]>
hainan-xv pushed a commit to hainan-xv/NeMo that referenced this pull request Nov 5, 2024
* log TFLOPs

Signed-off-by: Malay Nagda <[email protected]>

* Apply isort and black reformatting

Signed-off-by: malay-nagda <[email protected]>
Signed-off-by: Malay Nagda <[email protected]>

* err handling

Signed-off-by: Malay Nagda <[email protected]>

* Apply isort and black reformatting

Signed-off-by: malay-nagda <[email protected]>

* cosmetic

Signed-off-by: Malay Nagda <[email protected]>

---------

Signed-off-by: Malay Nagda <[email protected]>
Signed-off-by: malay-nagda <[email protected]>
Co-authored-by: Malay Nagda <[email protected]>
Co-authored-by: malay-nagda <[email protected]>
Signed-off-by: Hainan Xu <[email protected]>
XuesongYang pushed a commit to paarthneekhara/NeMo that referenced this pull request Jan 18, 2025
* log TFLOPs

Signed-off-by: Malay Nagda <[email protected]>

* Apply isort and black reformatting

Signed-off-by: malay-nagda <[email protected]>
Signed-off-by: Malay Nagda <[email protected]>

* err handling

Signed-off-by: Malay Nagda <[email protected]>

* Apply isort and black reformatting

Signed-off-by: malay-nagda <[email protected]>

* cosmetic

Signed-off-by: Malay Nagda <[email protected]>

---------

Signed-off-by: Malay Nagda <[email protected]>
Signed-off-by: malay-nagda <[email protected]>
Co-authored-by: Malay Nagda <[email protected]>
Co-authored-by: malay-nagda <[email protected]>
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