Skip to content

Fix ASR decoding issues with CUDA graphs in training - #14184

Merged
artbataev merged 12 commits into
mainfrom
fix_asr_cuda_graphs
Aug 6, 2025
Merged

artbataev merged 12 commits into
mainfrom
fix_asr_cuda_graphs

Conversation

@artbataev

@artbataev artbataev commented Jul 10, 2025 •

Copy link
Copy Markdown
Collaborator

Important

The Update branch button must only be pressed in very rare occassions.
An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.

What does this PR do ?

Fix issue with CUDA graphs in training + crashes when trying to call .predict twice.

  • force reinit CUDA graphs for test/val/predict to avoid failures
  • redesign CUDA graphs toggle to log only changed CUDA graphs state
  • bump minimum requirements for CUDA graphs with conditional nodes to CUDA 12.6 (see also Enable CUDA graphs by default, but require CUDA 12.6 for full graphs #9919) due to multiple observed issues with CUDA 12.4
  • avoid mixed precision in label-looping with CUDA graphs due to issues (not only in DDP)

Collection: [ASR]

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)

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
@github-actions github-actions Bot added the ASR label Jul 10, 2025
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

@github-actions github-actions Bot added the stale label Jul 25, 2025
@artbataev artbataev removed the stale label Jul 31, 2025
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
@github-actions github-actions Bot added the core Changes to NeMo Core label Aug 1, 2025
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
@github-actions github-actions Bot added the common label Aug 5, 2025
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
@artbataev
artbataev marked this pull request as ready for review August 5, 2025 19:54
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
@ko3n1g ko3n1g added Run CICD and removed Run CICD labels Aug 5, 2025
Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
@github-actions

github-actions Bot commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

[🤖]: Hi @artbataev 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

//cc @chtruong814 @ko3n1g @pablo-garay @thomasdhc

def on_validation_epoch_start(self) -> None:
"""
For validation, we enable CUDA graphs to speedup validation.
Force re-enabling required due to issues with trainer and mixed precision.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this happening with any specific version?

Should we comeback and remove when fix happens with latest versions?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I will continue the investigation. Unsure about specific version - currently, I observe it with different settings and versions.

@artbataev
artbataev merged commit f72a99f into main Aug 6, 2025
@artbataev
artbataev deleted the fix_asr_cuda_graphs branch August 6, 2025 14:13
nasretdinovr pushed a commit to nasretdinovr/NeMo that referenced this pull request Aug 8, 2025
* Redesign CUDA graphs toggle

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Fix issues with dtype

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Unify optional CUDA graphs

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Bump CUDA version requirements

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Clean up CUDA graphs toggle

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Fix for pylint

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Fix for pylint

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Add comments

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Fix statement

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Unify label-looping

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

---------

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
guyueh1 pushed a commit to guyueh1/NeMo that referenced this pull request Aug 25, 2025
* Redesign CUDA graphs toggle

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Fix issues with dtype

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Unify optional CUDA graphs

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Bump CUDA version requirements

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Clean up CUDA graphs toggle

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Fix for pylint

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Fix for pylint

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Add comments

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Fix statement

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

* Unify label-looping

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

---------

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
Signed-off-by: Guyue Huang <guyueh@nvidia.com>

This branch was previously deployed

1 inactive deployment
test — 12a3ab76 Deployed Aug 5, 2025 by ko3n1g
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.

4 participants