Command lines#

The onnx-light executable and python -m onnx_light provide the same commands. Each page below describes one command, with its arguments and examples.

Command-line summary#

Command line

Summary

python -m onnx_light

Lists available commands and displays command-specific help.

python -m onnx_light fillshape

Adds inferred shapes and optional memory and shape-tag metadata to a model.

python -m onnx_light optimize

Optimizes a model using default patterns, named groups, or explicit patterns.

python -m onnx_light partition

Extracts repeated layers or low-transfer operator groups as local functions.

python -m onnx_light show

Renders a model as text, a diagram, or code that rebuilds it.

python -m onnx_light run

Generates random inputs and executes a model with the reference evaluator.

python -m onnx_light backend

Measures selected backend test cases and optionally writes a report.

python -m onnx_light kernel

Lists registered kernels, inspects tunable parameters, or calibrates a kernel.

python -m onnx_light.tools.kernel_reports

Collects kernel measurements and verifies persisted tuning profiles.