p2o
A PaddlePaddle New IR (PIR) to ONNX model converter, written in Rust.
Converts PaddlePaddle inference models (inference.json + inference.pdiparams) to the ONNX format.
Installation
Pre-built binaries
Download from GitHub Releases.
From PyPI
From crates.io
Build from source
Usage
Arguments
| Argument | Description |
|---|---|
model.json |
Path to the PaddlePaddle .json model file |
model.pdiparams |
Path to the PaddlePaddle .pdiparams weight file |
output.onnx |
Path to the output .onnx model file |
--opset <N> |
Target ONNX opset version (≥ 10, default: 17) |
--strict |
Reject lossy conversions (e.g. multinomial → ArgMax) |
Example