-
Notifications
You must be signed in to change notification settings - Fork 514
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
How to support self-define torch op? #1212
Comments
Hi @KangHe000, The error you're getting is from PyTorch, not torch-mlir. Namely, the PyTorch function that is in charge of compiling a module into Torchscript does not seem to support In torch-mlir there is currently an open PR that adds custom op support through a different method. The approach is to register a custom op in PyTorch, and then add support for it in torch-mlir. |
@ramiro050 Sorry for replying so late, I will try register a custom op in PyTorch. Thanks! |
…lvm#1212) Signed-off-by: Ettore Tiotto <[email protected]>
Closing this as it appears we found a solution. |
Hi, I have some special self-define torch ops, and want to lower them to torch dialect.
Does torch-mlir provide the export mechanism to support self-define torch ops ?
When export to onnx, I can use torch.autograd.function to meet this kind of needs, but torch-mlir seems don't support that.
I got the error below:
When I try to run my compile code:
The text was updated successfully, but these errors were encountered: