referencerunner
Reference runner module for ONNX model execution.
This module provides functionality for running ONNX models using ONNXRuntime as a reference implementation. It supports both random input generation and user-provided inputs through NPZ or Polygraphy JSON files. The runner is used to analyze model behavior and validate outputs during precision conversion.
Classes
A class to run ONNX models with ONNXRuntime for reference inference. |
- class ReferenceRunner
Bases:
object
A class to run ONNX models with ONNXRuntime for reference inference.
- __init__(model, providers=['cpu'], trt_plugins=[])
Initialize with ONNX model path.
- Parameters:
model (ModelProto)
providers (list[str])
trt_plugins (list[str])
- run(inputs=None)
Run FP32 inference with provided or random inputs.