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

Significantly speed up RNNT loss on CUDA #3653

Merged
merged 3 commits into from
Feb 15, 2022

Conversation

titu1994
Copy link
Collaborator

Signed-off-by: smajumdar titu1994@gmail.com

What does this PR do ?

Speed up CUDA RNNT loss

Collection: [ASR]

Changelog

  • Fix issue with data movement of costs tensor from llForward to pytorch data view in numba
  • This alone costs a linear loop (scaling with batch size) that is roughly 10x the kernel costs themselves.
  • Fix by writing a small kernel to copy the data and update the costs.

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

Signed-off-by: smajumdar <titu1994@gmail.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 11, 2022

This pull request introduces 1 alert when merging 65be55d into 058fa38 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

Signed-off-by: smajumdar <titu1994@gmail.com>
Signed-off-by: smajumdar <titu1994@gmail.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 11, 2022

This pull request introduces 1 alert when merging 961362d into c645c4c - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@titu1994 titu1994 requested a review from VahidooX February 15, 2022 01:27
Copy link
Collaborator

@VahidooX VahidooX left a comment

Choose a reason for hiding this comment

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

LGTM!

@titu1994 titu1994 merged commit 2e16de3 into NVIDIA:main Feb 15, 2022
@titu1994 titu1994 deleted the speedup_rnnt_loss branch February 15, 2022 03:13
fayejf pushed a commit that referenced this pull request Mar 2, 2022
* Significantly speed up RNNT loss on CUDA

Signed-off-by: smajumdar <titu1994@gmail.com>

* Add tests

Signed-off-by: smajumdar <titu1994@gmail.com>

* Add tests

Signed-off-by: smajumdar <titu1994@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants