paddlefx is an experimental project for building PaddlePaddle Python IR.
pip install -r requirements_dev.txt
pip install -e .
pytest -n3 tests
Here are some examples of what paddlefx can do:
- Capture and compile python bytecodes into a fx graph. See this example.
- Trace ResNet and 10 other vision models. See this example and this test.
- Edit fx graphs. See this example.
- Profile ResNet. See this example.
- Demonstrate how to lower the fx graph IR to a native interpreter. See this example.
This is a community driven project, maintenance of this project is on a "best effort" basis. The ideas and even lots of codes are borrowed from pytorch 2.0.
If you'd like to contribute, please feel free to raise a pull request, discuss in issues or discussions.