❓ [Question] Can you convert model that operates on custom classes? #1073
Unanswered
MarekPokropinski
asked this question in
Q&A
Replies: 2 comments
-
You should be able to use the method in this issue to compile your model #876 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also make sure your operation is registered through torchbind https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
❓ Question
I have a torch module that creates objects of custom classes that have tensors as fields. It can be torch.jit.scripted but torch.jit.trace can be problematic. When I torch.jit.script module and then torch_tensorrt.compile it I get the following error:
Unable to get schema for Node %317 : __torch__.src.MyClass = prim::CreateObject() (conversion.VerifyCoverterSupportForBlock)
What you have already tried
torch.jit.trace avoids the problem but introduces problems with loops in module.
Environment
conda
,pip
,libtorch
, source): pipBeta Was this translation helpful? Give feedback.
All reactions