Skip to content

Infrastructure

Infrastructure modules provide concrete adapters for configuration, storage, hardware inspection, backends, model loading, reporting, and visualization.

Configuration

Configuration loading from defaults, files, environment, and CLI overrides.

load_configuration(*, config_path=None, env=None, cli_overrides=None, profile=None, defaults=None)

Load and resolve configuration with deterministic precedence.

Precedence is CLI, environment, configuration file, then defaults.

Storage

Filesystem-backed immutable session store.

FilesystemSessionStore

Store immutable benchmark sessions on the local filesystem.

session_path(session_id)

Return the resolved path for a session ID.

create(session)

Persist a new immutable session and return its directory.

load(session_id)

Load a session by ID.

list_sessions()

Return session IDs stored under the root directory.

store_artifact(session_id, source, *, kind, format)

Copy an artifact into a session's artifact directory.

Hardware

Hardware inspection and capability collection.

SystemHardwareInspector dataclass

Bases: HardwareInspector

Collect portable host, accelerator, embedded-target, and capability metadata.

The inspector avoids vendor SDK requirements. Optional runtime probes are used only when their packages are already installed, and static probes are cached per instance.

inspect()

Return a cached static profile with current thermal and power policy values.

Backends

Built-in benchmark backends.

CPUBackend dataclass

Bases: BenchmarkBackend

CPU reference backend for production validation and tests.

FpgaPlaceholderBackend dataclass

Bases: BenchmarkBackend

Validate FPGA-targeted configurations until a board-specific plugin is installed.

GPUBackend dataclass

Bases: BenchmarkBackend

GPU backend that validates accelerator availability before execution.

ReferenceBenchmarkBackend dataclass

A deterministic in-process backend for engine validation and tests.

BackendRegistryImpl dataclass

Bases: BackendRegistry

Register, resolve, select, and validate benchmark backends.

RtlSimulatorBackend dataclass

Bases: BenchmarkBackend

Adapter contract for externally run RTL simulators.

It does not invoke simulator binaries. Integrations pass normalized observations through backend.options so sessions retain cycle and waveform provenance.

default_backend_registry()

Create the built-in registry with CPU and GPU backends.

Model Registry

Registry and built-in model loaders for supported runtime formats.

PyTorchModelLoader

Load and validate PyTorch and TorchScript models.

OnnxRuntimeModelLoader

Load ONNX models through ONNX Runtime.

TensorFlowLiteModelLoader

Load TensorFlow Lite models using the runtime interpreter.

ModelLoaderRegistry

Bases: ModelLoaderCatalog

Registry of format-specific model loaders.

register(loader)

Register a loader by name.

load(request)

Load a model by request, resolving the best matching loader.

load_workload(workload)

Load a model from resolved configuration.

Reporting

Concrete report renderers for JSON, CSV, Markdown, and HTML.

JsonReporter dataclass

Render the canonical report view as structured JSON.

render(view)

Return a deterministic JSON report.

CsvReporter dataclass

Render metric rows as CSV for spreadsheet and automation workflows.

render(view)

Return a CSV report containing one row per metric.

MarkdownReporter dataclass

Render a compact Markdown report for pull requests and release notes.

render(view)

Return a Markdown report.

HtmlReporter dataclass

Render a standalone static HTML report.

render(view)

Return a static HTML report.

default_reporters()

Return all built-in reporters.

default_report_service()

Create a report service with the built-in reporters.

Visualization

Built-in chart providers for benchmark sessions.

LatencyVisualizer dataclass

Build per-iteration latency charts.

build(session)

Return a latency line chart.

ThroughputVisualizer dataclass

Build throughput summary charts.

build(session)

Return a throughput bar chart.

MemoryUsageVisualizer dataclass

Build memory usage charts from resource metrics or observations.

build(session)

Return a memory usage bar chart.

TimelineVisualizer dataclass

Build execution timeline charts.

build(session)

Return a timeline chart using run start order and durations.

HardwareComparisonVisualizer dataclass

Build hardware context comparison charts.

build(session)

Return a hardware summary chart.

PerformanceComparisonVisualizer dataclass

Build single-session performance comparison charts.

build(session)

Return a normalized performance metric chart.

RooflineFoundationVisualizer dataclass

Build a roofline foundation chart from available operation and memory metrics.

build(session)

Return a foundation chart for later roofline analysis.

default_visualizers()

Return all built-in visualizers.

default_visualization_service()

Return the default visualization service.