Skip to content
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

Add Fx Pass to remove unbind -> getitem chains #361

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Groverkss
Copy link
Contributor

RNN lowerings provided by pytorch use unbind to convert hidden layer outputs into a list, and then index it later. This doesn't fit well with FxImporter, because it doesn't really have a concept of a list. This pass takes these chains, and converts them into torch.select, so that we don't have lists again.

RNN lowerings provided by pytorch use unbind to convert hidden layer
outputs into a list, and then index it later. This doesn't fit well
with FxImporter, because it doesn't really have a concept of a list.
This pass takes these chains, and converts them into torch.select,
so that we don't have lists again.
@Groverkss
Copy link
Contributor Author

I don't think the patch should be landed in its current state. I don't really know where to put users custom fx passes, so I had to plumb them through the jittable pipeline instead. This PR also needs some tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant