# ONNX Optimizer API

API reference for `qairt.optimizer.onnx`. For background — what the
optimizer is, when to apply each transformation, terminology, an end-to-end
example flow, and the framework concepts behind custom passes — see the
[ONNX Optimizer Overview](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-optimizer-overview.html#qairt-optimizer-overview) guide. Worked examples live in
[ONNX Optimizer Examples](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-optimizer-examples.html#qairt-optimizer-examples).

The API is organized into two tiers:

- [Functions](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-optimizer-passes-api.html) — high-level functions, the
recommended entry point for most workflows (MHA→SHA, splitting, MoE
adaptation, AR/CL rewriting).
- [Classes & Passes](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-optimizer-passes-classes.html) — low-level building blocks,
[`GraphContext`](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-optimizer-passes-classes.html#qairt.optimizer.onnx.GraphContext) together with individual passes
for custom pipelines and pass-level control.

Last Published: Jun 19, 2026

[Previous Topic
Next steps](https://docs.qualcomm.com/bundle/publicresource/80-87189-2/topics/qairt-gen-ai-modules-lora.md) [Next Topic
Functions](https://docs.qualcomm.com/bundle/publicresource/80-87189-2/topics/qairt-optimizer-passes-api.md)