Skip to content

potato2chip is a python tool for translating PyTorch models into PyRTL, a hardware description language.

License

Notifications You must be signed in to change notification settings

calebl42/potato2chip

Repository files navigation

Introducting Potato2Chip: A Tool for Automated convertion from PyTorch models to PyRTL

How to use potato2chip:

  1. Save your PyTorch model using TorchScript to your working directory (recommended method):
    model_scripted = torch.jit.script(model) # Export to TorchScript
    model_scripted.save('model_scripted.pt') # Save
  2. Create a script that loads your saved model, and inside it, import converter.py:
    import converter
    ...
    model = torch.jit.load('model_scripted.pt')
  3. Now add the line
    converter.gen_pyrtl(model)
  4. Execute your script
  5. You will see the outputed pyrtl code in 'output.py'

About

potato2chip is a python tool for translating PyTorch models into PyRTL, a hardware description language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages