Documentation
¶
Overview ¶
Package onnx is the module root for the standalone ONNX runtime.
The module exposes no symbols at the root. Consumers import one of the sub-packages directly:
- engine runs inference on a loaded model
- tensor rank-N tensor type and pool
- onnx domain types and the protobuf loader
- graph graph builder and topological sort
- ops operator interface and built-in CPU ops
- provider ExecutionProvider interface and the CPU provider
- validate static model validation
Optional features live in sub-packages that downstream code imports for their side effects (operator or fusion registration):
- graph/fusion/* individual graph rewrites
- ops/winograd Winograd convolution kernels
- tensor/quant Q8_0 tensor quantization and matching gemm kernel
Each optional sub-package is linker-eliminated when it is not imported, so a minimal consumer pays no binary cost for features it does not use.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package engine is the top-level inference entry point for running ONNX models.
|
Package engine is the top-level inference entry point for running ONNX models. |
|
Package graph builds a topologically sorted execution plan from a loaded ONNX model.
|
Package graph builds a topologically sorted execution plan from a loaded ONNX model. |
|
fusion/concatwrite
Package concatwrite registers the (producer-Conv → Concat) tail fusion.
|
Package concatwrite registers the (producer-Conv → Concat) tail fusion. |
|
fusion/conv1x1pair
Package conv1x1pair registers the 1×1 Conv pair fusion.
|
Package conv1x1pair registers the 1×1 Conv pair fusion. |
|
fusion/convleakyrelu
Package convleakyrelu registers the Conv → LeakyReLU fusion.
|
Package convleakyrelu registers the Conv → LeakyReLU fusion. |
|
fusion/convprelu
Package convprelu registers the Conv → PReLU fusion.
|
Package convprelu registers the Conv → PReLU fusion. |
|
fusion/muladd
Package muladd registers the Mul → Add fusion.
|
Package muladd registers the Mul → Add fusion. |
|
fusion/pixelshuffle
Package pixelshuffle registers the PyTorch pixel-shuffle graph rewrite (Reshape → Transpose → Reshape → single DepthToSpace).
|
Package pixelshuffle registers the PyTorch pixel-shuffle graph rewrite (Reshape → Transpose → Reshape → single DepthToSpace). |
|
Package onnx provides functions to load ONNX model files and domain types that represent the computation graph, nodes, tensors, and metadata without any protobuf dependency.
|
Package onnx provides functions to load ONNX model files and domain types that represent the computation graph, nodes, tensors, and metadata without any protobuf dependency. |
|
Package ops provides ONNX operator implementations with a common Operator interface and a registry for looking up operators by type.
|
Package ops provides ONNX operator implementations with a common Operator interface and a registry for looking up operators by type. |
|
Package provider defines the ExecutionProvider interface for routing ONNX operator execution to different compute backends (CPU, GPU).
|
Package provider defines the ExecutionProvider interface for routing ONNX operator execution to different compute backends (CPU, GPU). |
|
Package tensor provides an N-dimensional computation tensor with NCHW memory layout, float32-only data, and factory functions for creating, indexing, slicing, reshaping, and broadcasting tensors.
|
Package tensor provides an N-dimensional computation tensor with NCHW memory layout, float32-only data, and factory functions for creating, indexing, slicing, reshaping, and broadcasting tensors. |
Click to show internal directories.
Click to hide internal directories.