Skip to content

TorchScript before TensorRT #1011

Answered by narendasan
AndreiBaraian asked this question in Q&A
Discussion options

You must be logged in to vote

So there were new APIs added in Torch-TensorRT 1.0 that allow you to provide a standard nn.Module. We will pass that through scripting for you then on to the compile function (there is no trace option for guaranteed correctness reasons) . The old API style now resides in torch_tensorrt.ts. You can also pass a torchscript module as to the new api if you like.

Really its just syntax sugar to handle the most common use case but if you hit errors we still recommend manually tracing/scripting then passing it to Torch-TensorRT to determine where the source of the error is coming from.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AndreiBaraian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants