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

torch.fx to MDF #431

Open
davidt0x opened this issue Mar 15, 2023 · 0 comments
Open

torch.fx to MDF #431

davidt0x opened this issue Mar 15, 2023 · 0 comments

Comments

@davidt0x
Copy link
Contributor

The current pipeline for PyTorch to MDF conversion utilizes TorchScript compilation of PyTorch models. The TorchScript graph is created with a call to torch.jit.script. The TorchScript graph is then traversed and converted to an MDF model in a node by node manner (for the most part). The code for this is all contained in modeci_mdf.interfaces.pytorch.importer. The future direction of PyTorch 2.0 PyTorch 2.0 seems to be moving away from TorchScript in favor or torch.fx graphs and torch.compile. It would probably be best to rewrite the TorchScript compilation dependency to utilize these new features. This might have the added advantage that FX graph IR seems to capture some higher level details (hierarchy of nn.Module) of the model which might be carried over to MDF. A good first step would be to implement a simple proof of concept conversion from a simple PyTorch example model to an MDF model. A good first example would be this simple model.

A proof of concept or rough implementation of this feature for this simple model would be a great thing to try for an Outreachy candidate. A a more complete implementation could be pursued by a successful candidate over the summer.

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

No branches or pull requests

3 participants