TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

Loop Conversion

Open abhi-iyer opened this issue 5 years ago • 9 comments

Description

Dynamic loop conversion from PyTorch to TRT. A few limitations with this approach, as of now:

  • all recurrent values inside loop can be Tensors only
  • works with for loops, albeit with a comparative threshold (i.e. TRT vs JIT) that is greater than the set limit of 2e-5
  • breaks converter contract: all primitive types (e.g. int, float, etc.) could potentially be Tensors when processed inside the converter

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • [ ] My code follows the style guidelines of this project
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas and hacks
  • [ ] I have made corresponding changes to the documentation and have regenerated the documentation (make html in docsrc)
  • [ ] I have added tests to verify my fix or my feature
  • [ ] New and existing unit tests pass locally with my changes

abhi-iyer avatar Aug 01 '20 03:08 abhi-iyer

For more information on Loop Conversion, please see:

TensorRT Loops - A Rundown.pdf

abhi-iyer avatar Aug 01 '20 03:08 abhi-iyer

TRT has no guarantee about output binding order.

e.g. an RNN loop that outputs hidden state hx and cell state cx might be reversed when outputs are processed, even if they were marked as inputs in the right order

abhi-iyer avatar Aug 14 '20 00:08 abhi-iyer

This PR has not seen activity for 30 days, Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Sep 28 '20 00:09 github-actions[bot]

This PR has not seen activity for 30 days, Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Nov 11 '20 00:11 github-actions[bot]

This PR has not seen activity for 30 days, Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Dec 31 '20 00:12 github-actions[bot]

This PR has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days

github-actions[bot] avatar Apr 05 '21 00:04 github-actions[bot]

This PR has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days

github-actions[bot] avatar Feb 11 '22 00:02 github-actions[bot]

Hi @abhi-iyer!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar May 12 '22 22:05 facebook-github-bot

This PR has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days

github-actions[bot] avatar Aug 11 '22 00:08 github-actions[bot]

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot avatar Oct 03 '22 03:10 facebook-github-bot

This PR has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days

github-actions[bot] avatar Jan 02 '23 00:01 github-actions[bot]