You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sam-Armstrong
added
PyTorch Frontend
Developing the PyTorch Frontend, checklist triggered by commenting add_frontend_checklist
and removed
Next Release
This issue or PR should only be considered once the next release is out.
Suggestion
A suggestion rather than a detected issue or a definitive task
Ivy API Experimental
Run CI for testing API experimental/New feature or request
labels
Aug 9, 2024
Hi @Sam-Armstrong ,
Are there any specific considerations or challenges we should be aware of when adding frontend functions for these torch._VF operations?
torch._VF.rnn_tanh
torch._VF.rnn_relu
torch._VF.gru
torch._VF.rnn_tanh_cell
torch._VF.rnn_relu_cell
torch._VF.lstm_cell
torch._VF.gru_cell
I'm wondering if there are existing patterns or best practices we should follow to ensure consistency and performance. Any thoughts on how we should approach this?
@muzakkirhussain011 for the gru, lstm_cell and gru_cell implementations, you can generally follow how torch._VF.lstm was written. So the call graph would look something like torch_frontend._VF.lstm -> torch_frontend.lstm -> ivy.lstm.
If we can, the optimal implementation for torch._VF.gru would be something like:
where you implement ivy.gru for all backend frameworks (torch, tensorflow, jax and numpy - but this isn't strictly necessary - you can just use an ivy compositional implementation as has been done in the case of lstm. Just note you'll have to add torch_frontend.gru, as this also doesn't exist in the torch frontend apis yet.
Feel free to message me on discord if you're unsure about anything.
Frontend functions need to be added for the following torch._VF functions:
torch._VF.rnn_tanh
torch._VF.rnn_relu
torch._VF.gru
torch._VF.rnn_tanh_cell
torch._VF.rnn_relu_cell
torch._VF.lstm_cell
torch._VF.gru_cell
The text was updated successfully, but these errors were encountered: