Examples Gallery¶
A couple of examples to illustrate different implementation of dot product (see also sphinx-gallery).
Getting started¶
pytorch nightly build should be installed, see Start Locally.
git clone https://github.com/sdpython/experimental-experiment.git
pip install onnxruntime-gpu pynvml
pip install -r requirements-dev.txt
export PYTHONPATH=$PYTHONPATH:<this folder>
Compare torch exporters¶
The script evaluates the memory peak, the computation time of the exporters. It also compares the exported models when run through onnxruntime. The full script takes around 20 minutes to complete. It stores on disk all the graphs, the data used to draw them, and the models.
python _doc/examples/plot_torch_export.py -s large
See pytorch and onnx for an organized version of this page.
101: Profile an existing model with onnxruntime
101: Linear Regression and export to ONNX
101: A custom backend for torch
101: Some dummy examples with torch.export.export
102: Convolution and Matrix Multiplication
102: Fuse kernels in a small Llama Model
301: Compares LLAMA exporters for onnxrt backend
201: Evaluate different ways to export a torch model to ONNX