Command lines#

Installing the Python package exposes the onnx-light executable:

onnx-light <subcommand> [options]

The equivalent python -m onnx_light invocation is useful from an editable checkout or when the executable is not on PATH. Both forms call the same entry point and accept the same arguments.

Use --help before or after a subcommand to inspect the installed version:

onnx-light --help
onnx-light show --help
python -m onnx_light kernel --help

Command overview#

Command

Purpose

Typical use

fillshape

Infers shapes and optionally writes memory, lifetime, and semantic metadata.

Prepare or inspect a model before optimization or execution.

show

Renders a model as text, a diagram, Python code, or C++ code.

Review a model or generate code that rebuilds it.

run

Generates deterministic inputs and executes a model.

Smoke-test a model with the reference runtime.

backend

Runs and benchmarks selected C++ backend-test cases.

Measure kernels or compare explicit tuning parameters.

kernel

Lists kernels and inspects or calibrates their tuning schemas.

Discover runtime coverage or persist a machine profile.

Output and automation#

show writes its rendering to stdout unless --output is specified. backend can write CSV or XLSX reports and both backend and kernel support --json for machine-readable output. Progress requested with --verbose is written separately from structured output where applicable.

Shell scripts should select an explicit output format rather than parse the human-readable tables. Run onnx-light COMMAND --help in the target environment because optional runtime components and newly added options may differ between installed versions.