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

ReferenceRunner

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)

Initialize with ONNX model path.

Parameters:

model (ModelProto)

run(inputs=None)

Run FP32 inference with provided or random inputs.