-
Notifications
You must be signed in to change notification settings - Fork 48
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
LSTM #315
Comments
Looks like there isn't a corresponding torch lstm op. Looking into how to implement it. |
Hi @renxida, there's a corresponding LSTM op in PyTorch, see: https://pytorch.org/docs/stable/generated/torch.nn.LSTM.html. You can add OnnxToTorch and TorchToLinalg lowering for LSTM op. This would be a good learning experience as well. |
You'll likely want to decompose it versus converting to linalg directly. There is rarely value to a compiler to keep lstm as a named op. It is a trivial fusion. |
Yeah, that's a better approach. This might be of some help. https://github.com/pytorch/pytorch/blob/a97d00cca5c1f47e74048f110df5706669a84e6e/torch/_decomp/decompositions.py#L3135 |
Btw @stellaraccident, while importing the onnx models there's a drawback that we can't make use of the existing PyTorch decompositions. |
Yeah, I know. There's no other way to do it though: onnx is a c++ only technology. |
Hi @renxida, are you still working on this op? |
@vivekkhandelwal1 nope currently not. Feel free to grab it. Right now i'm adding onnx end to end test cases in @kumardeepakamd 's SHARK-TestSuite repo |
@vivekkhandelwal1 and @renxida has this landed and can be marked completed? Are e2eshark onnx and/or pytorch tests and torch-mlir lit and torch op tests added? |
This will be fixed by llvm/torch-mlir#2969 |
@renxida need relook |
aw crap looks like i have to support bidirectional onnx for this model to work |
Bidirectional support merged! @pdhirajkumarprasad |
We are not seeing this issue in models so closing this issue |
No description provided.
The text was updated successfully, but these errors were encountered: