-
Notifications
You must be signed in to change notification settings - Fork 364
Implementation of the PyTorch Backend API #194
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with other backends and between APIs in TRTorch BREAKING CHANGE: This changes the top level api for setting the specification for compilation, a simple find and replace should allow users to port forward Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
PyTorch Users can now use a direct PyTorch integration by just importing the trtorch package. The only difference between torch._C._jit_to_tensorrt and trtorch.compile is that you need to use the trtorch.TensorRTCompileSpec constructor to build a wrapper around your spec dictionary Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
andi4191
approved these changes
Oct 22, 2020
py/trtorch/_compile_spec.py
Outdated
"refit": false, # enable refit | ||
"debug": false, # enable debuggable engine | ||
"strict_types": false, # kernels should strictly run in operating precision | ||
"allow_gpu_fallback": false, # (DLA only) Allow layers unsupported on DLA to run on GPU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be set as true? It is set to true by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component: api [C++]
Issues re: C++ API
component: api [Python]
Issues re: Python API
component: build system
Issues re: Build system
component: conversion
Issues re: Conversion stage
component: core
Issues re: The core compiler
component: runtime
component: tests
Issues re: Tests
documentation
Improvements or additions to documentation
hacktoberfest-accepted
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for the PyTorch Backend API (the initial version shipped with PyTorch 1.6.0) and associated tests. It also does some refactoring to make TRTorch more consistent with other backends for PyTorch and some clarification of terms.
Fixes #82
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: