Skip to content

Add SSD - TRTorch demo #165

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

Merged
merged 10 commits into from
Aug 26, 2020
Merged

Conversation

shashank3959
Copy link
Contributor

@shashank3959 shashank3959 commented Aug 5, 2020

Description

Adds a TRTorch demo notebook for SSD300 Objection Detection model.
It includes inference speedup comparison between models with/without
TRTorch-TRT.

Type of change

  • New feature (non-breaking change which adds functionality)
  • 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

narendasan and others added 4 commits August 5, 2020 13:34
- Change adds a TRTorch demo notebook for SSD
Objection Detection model.
- Observing ~100x speedup with TRTorch/TRT
as compared to without it, as tested on a
Tesla V100 32GB

Signed-off-by: Shashank Verma <[email protected]>
- Renames the SSD TRTorch demo
- Cleans up the parent directory

Signed-off-by: Shashank Verma <[email protected]>
- Fixes broken link for lenet notebook
- Adds link for ssd demo notebook

Signed-off-by: Shashank Verma <[email protected]>
Change adds the ssd demo notebook in index.rst
so it is added to the TRTorch website as well.

Signed-off-by: Shashank Verma <[email protected]>
@shashank3959 shashank3959 changed the title Add SSD demo TRTorch demo Add SSD - TRTorch demo Aug 5, 2020
@vinhngx
Copy link
Contributor

vinhngx commented Aug 6, 2020

Thanks.
@narendasan @mengdih could you pls review

- Increases the number of iterations to
run the benchmark for.
- Adds batch average time calculation for traced
Torchscript model.
- Fixes minor typo

Signed-off-by: Shashank Verma <[email protected]>
- Module needs to compile with the same batch-size
it is intended to be used with
- Change also addresses review comments

Signed-off-by: Shashank Verma <[email protected]>
Change does the following:
- Compile the module with the same batch-size it
is intended to be tested on
- Earlier, the Torchscript compile TS traced module
was getting evaluated in place of script module.
Change fixes this.

Signed-off-by: Shashank Verma <[email protected]>
@shashank3959
Copy link
Contributor Author

shashank3959 commented Aug 12, 2020

@narendasan I addressed the above review comments in the latest commit. Does it look good to go?

Added visualization of pre-TRTorch results as well.
This will enable performance comparision too in addition
to speedup.

Signed-off-by: Shashank Verma <[email protected]>
@narendasan
Copy link
Collaborator

Have you hit an error importing the trtorch package in the jupyter notebook? for some reason I get errors specifically in Jupyter but can run the program outside it?

- ave --> avg
- Notebook was run on a V100-16GB

Signed-off-by: Shashank Verma <[email protected]>
@shashank3959
Copy link
Contributor Author

shashank3959 commented Aug 18, 2020

Have you hit an error importing the trtorch package in the jupyter notebook? for some reason I get errors specifically in Jupyter but can run the program outside it?
@narendasan I did not encounter any such issue on my fork/branch that I created the pull request from. But I see that my fork has diverged from Nvidia/TRTorch starting after "Merge pull request #161 from NVIDIA/local_linux_build_fix" (83eb3ad 858d8c3)".
Maybe a PR that merged later into Nvidia/TRTorch changed something?

@vinhngx
Copy link
Contributor

vinhngx commented Aug 19, 2020

I was able to run this notebook end to end with the following sequence:

  • pull the latest master branch
  • build the notebook docker container
  • run Lenet example successfully
  • checkout this PR branch to get the SSD notebook
  • run the SSD demo notebook end to end successfully

LGTM!

@narendasan
Copy link
Collaborator

Cool, I was able to run it, not sure what the issue was

@narendasan narendasan merged commit 489516c into pytorch:master Aug 26, 2020
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.

3 participants