-
Hi, I'm new to ONNX and trying to write a simple compiler based on it. I wonder whether ONNX provides basic optimization passes like operators fusion and constant folds. I'm trying to find related work by reading the official document and googling it but I find nothing. I want a tool that could optimize an ONNX graph and save it as a new one, or I need to implement these passes myself. Thank you for reading this! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi, But there is also a SIG for Optimization: https://github.com/onnx/sigs/tree/main/optimizations The optimization of the graph is hardware-dependent.... so you have to see what suits the target hardware. |
Beta Was this translation helpful? Give feedback.
-
We are developing tools for basic optimization and are expecting to release them soon. Like @andife suggested you may keep an eye on the development in the optimization SIG. |
Beta Was this translation helpful? Give feedback.
Hi,
maybe you will have a look at
https://github.com/daquexian/onnx-simplifier or https://github.com/onnx/optimizer
But there is also a SIG for Optimization: https://github.com/onnx/sigs/tree/main/optimizations
The optimization of the graph is hardware-dependent.... so you have to see what suits the target hardware.
Also https://github.com/openvinotoolkit/nncf might be an interesting tool for you?