promote pnnx dynamo exported program support
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- C++
- Stars
- 23.8k
- Forks
- 4.5k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 37
Description
https://docs.pytorch.org/docs/stable/export.html
import torch
import torchvision.models as models
net = models.resnet18()
net.eval()
torch.manual_seed(0)
x = torch.rand(1, 3, 224, 224)
a = net(x)
# export pt2
program = torch.export.export(net, (x,))
torch.export.save(program, 'test_resnet18.pt2')
-
./pnnx test_resnet18.pt2(parsing and populate pnnx graph) - generate
export_exported_program()in xxx_pnnx.py - add operator tests for exported program
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked PyTorch export documentation and the provided ResNet18 example, then run ./pnnx test_resnet18.pt2 to inspect current parsing behavior. The work is complete when the exported program parses into a populated pnnx graph, export_exported_program() is generated in the relevant xxx_pnnx.py, and operator tests cover the exported program.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python, pytorch
- Domain
- machine-learning, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100