Skip to content

❓ [Question] Unknown type name '__torch__.torch.classes.tensorrt.Engine' #642

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

You must be logged in to vote

This error occurs when you don't load the trtorch runtime. Make sure the libraries are properly linked in your program. One thing that is pretty common on the inference side if you aren't doing compilation is because you don't directly use any APIs from trtorch, compilers may silently ignore linking the library. Try linking the library with -Wl,--no-as-needed. Also if you aren't compiling the PyTorch model in C++ all you need to link is libtrtorchrt.so which just had the runtime parts. It is a much smaller dependency than the full compiler library

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by narendasan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #632 on September 27, 2021 14:38.