# ai-dynamo/aiperf architecture

> Architecture diagram of the GitHub repository ai-dynamo/aiperf, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ai-dynamo/aiperf
- Repository: https://github.com/ai-dynamo/aiperf

## Overview

AIPerf is a generative-AI inference benchmarking tool: users configure and launch profiles or sweeps, generate workload against an inference endpoint, then inspect metrics and exported reports. The graph preserves documented dataset, plugin, UI, telemetry, accuracy, analysis, and Kubernetes capabilities. The README and source index support the documented workflow and selected module references; many service-to-service runtime calls were not excerpted, so those links are omitted or marked unverified.

Main entry points: [`src/aiperf/controller/system_controller.py`](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/controller/system_controller.py) (System controller), [`src/aiperf/common`](https://github.com/ai-dynamo/aiperf/tree/main/src/aiperf/common) (Service framework), [`src/aiperf/records/records_manager.py`](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/records/records_manager.py) (Record processing), [`src/aiperf/cli.py`](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/cli.py) (CLI commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Benchmark execution"]
  node_cli["CLI commands<br/>[cli.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_plan["Run planning<br/>[plan.py]"]
  node_datasets["Dataset loading<br/>[dataset_manager.py]"]
  node_controller["System controller"]
  node_timing["Load timing<br/>[manager.py]"]
end

subgraph group_runtime["Runtime services"]
  node_workers["Inference workers"]
  node_endpoints["Endpoint adapters"]
  node_runtime_core["Service framework"]
  node_plugins["Plugin registry<br/>[plugins.py]"]
end

subgraph group_results["Results and analysis"]
  node_records["Record processing<br/>[records_manager.py]"]
  node_accuracy["Accuracy grading"]
  node_server_metrics["Server metrics<br/>[manager.py]"]
  node_gpu_telemetry["GPU telemetry<br/>[manager.py]"]
  node_exporters["Result exporters"]
  node_analysis["Benchmark analysis"]
end

subgraph group_operations["Interfaces and operations"]
  node_api["API service<br/>[api_service.py]"]
  node_dashboard["Live dashboard<br/>[app.js]"]
  node_kubernetes["Kubernetes operator<br/>[main.py]"]
end

node_user(("Benchmark user"))
node_inference["Inference server"]

node_user -->|"launches"| node_cli
node_cli -.->|"sets options"| node_config
node_config -.->|"resolves run"| node_plan
node_plan -.->|"schedules run"| node_controller
node_controller -.->|"coordinates"| node_datasets
node_controller -.->|"coordinates"| node_timing
node_timing -.->|"drives workload"| node_workers
node_workers -->|"formats requests"| node_endpoints
node_endpoints -.->|"sends requests"| node_inference
node_controller -->|"uses shared services"| node_runtime_core
node_datasets -->|"uses shared services"| node_runtime_core
node_plugins -.->|"provides extensions"| node_runtime_core
node_records -->|"uses shared services"| node_runtime_core
node_records -.->|"processes results"| node_accuracy
node_controller -.->|"coordinates collection"| node_server_metrics
node_controller -.->|"coordinates collection"| node_gpu_telemetry
node_controller -.->|"coordinates export"| node_exporters
node_exporters -.->|"exports benchmark data"| node_analysis
node_user -->|"views live metrics"| node_dashboard
node_api -.->|"serves interface"| node_dashboard
node_user -.->|"manages cluster runs"| node_kubernetes

click node_cli "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/cli.py"
click node_config "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/config/config.py"
click node_plan "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/config/resolution/plan.py"
click node_datasets "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/dataset/dataset_manager.py"
click node_controller "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/controller/system_controller.py"
click node_timing "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/timing/manager.py"
click node_workers "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/workers/inference_client.py"
click node_endpoints "https://github.com/ai-dynamo/aiperf/tree/main/src/aiperf/endpoints"
click node_runtime_core "https://github.com/ai-dynamo/aiperf/tree/main/src/aiperf/common"
click node_plugins "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/plugin/plugins.py"
click node_records "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/records/records_manager.py"
click node_accuracy "https://github.com/ai-dynamo/aiperf/tree/main/src/aiperf/accuracy"
click node_server_metrics "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/server_metrics/manager.py"
click node_gpu_telemetry "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/gpu_telemetry/manager.py"
click node_exporters "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/exporters/exporter_manager.py"
click node_analysis "https://github.com/ai-dynamo/aiperf/tree/main/src/aiperf/analysis"
click node_api "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/api/api_service.py"
click node_dashboard "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/api/static-v2/app.js"
click node_kubernetes "https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/operator/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_config,node_plan,node_datasets,node_controller,node_timing,node_user toneBlue
class node_workers,node_endpoints,node_runtime_core,node_plugins toneAmber
class node_records,node_accuracy,node_server_metrics,node_gpu_telemetry,node_exporters,node_analysis,node_inference toneMint
class node_api,node_dashboard,node_kubernetes toneRose
```

## Components

### Benchmark execution

- [CLI commands](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/cli.py): `src/aiperf/cli.py`
- [Configuration](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/config/config.py): `src/aiperf/config/config.py`
- [Run planning](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/config/resolution/plan.py): `src/aiperf/config/resolution/plan.py`
- [Dataset loading](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/dataset/dataset_manager.py): `src/aiperf/dataset/dataset_manager.py`
- [System controller](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/controller/system_controller.py): `src/aiperf/controller/system_controller.py`
- [Load timing](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/timing/manager.py): `src/aiperf/timing/manager.py`

### Runtime services

- [Inference workers](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/workers/inference_client.py): `src/aiperf/workers/inference_client.py`
- [Endpoint adapters](https://github.com/ai-dynamo/aiperf/tree/main/src/aiperf/endpoints): `src/aiperf/endpoints`
- [Service framework](https://github.com/ai-dynamo/aiperf/tree/main/src/aiperf/common): `src/aiperf/common`
- [Plugin registry](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/plugin/plugins.py): `src/aiperf/plugin/plugins.py`

### Results and analysis

- [Record processing](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/records/records_manager.py): `src/aiperf/records/records_manager.py`
- [Accuracy grading](https://github.com/ai-dynamo/aiperf/tree/main/src/aiperf/accuracy): `src/aiperf/accuracy`
- [Server metrics](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/server_metrics/manager.py): `src/aiperf/server_metrics/manager.py`
- [GPU telemetry](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/gpu_telemetry/manager.py): `src/aiperf/gpu_telemetry/manager.py`
- [Result exporters](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/exporters/exporter_manager.py): `src/aiperf/exporters/exporter_manager.py`
- [Benchmark analysis](https://github.com/ai-dynamo/aiperf/tree/main/src/aiperf/analysis): `src/aiperf/analysis`

### Interfaces and operations

- [API service](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/api/api_service.py): `src/aiperf/api/api_service.py`
- [Live dashboard](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/api/static-v2/app.js): `src/aiperf/api/static-v2/app.js`
- [Kubernetes operator](https://github.com/ai-dynamo/aiperf/blob/main/src/aiperf/operator/main.py): `src/aiperf/operator/main.py`

### Other components

- **Benchmark user**
- **Inference server**

## Connections

- Benchmark user → CLI commands: launches
- CLI commands → Configuration: sets options
- Configuration → Run planning: resolves run (evidence: `src/aiperf/config/resolution/plan.py`)
- Run planning → System controller: schedules run (evidence: `src/aiperf/controller/system_controller.py`)
- System controller → Dataset loading: coordinates
- System controller → Load timing: coordinates
- Load timing → Inference workers: drives workload
- Inference workers → Endpoint adapters: formats requests (evidence: `src/aiperf/workers/inference_client.py`)
- Endpoint adapters → Inference server: sends requests
- System controller → Service framework: uses shared services (evidence: `src/aiperf/controller/system_controller.py`)
- Dataset loading → Service framework: uses shared services (evidence: `src/aiperf/dataset/dataset_manager.py`)
- Plugin registry → Service framework: provides extensions (evidence: `src/aiperf/plugin/plugins.py`)
- Record processing → Service framework: uses shared services (evidence: `src/aiperf/records/records_manager.py`)
- Record processing → Accuracy grading: processes results (evidence: `src/aiperf/records/records_manager.py`)
- System controller → Server metrics: coordinates collection
- System controller → GPU telemetry: coordinates collection
- System controller → Result exporters: coordinates export (evidence: `src/aiperf/controller/system_controller.py`)
- Result exporters → Benchmark analysis: exports benchmark data
- Benchmark user → Live dashboard: views live metrics
- API service → Live dashboard: serves interface
- Benchmark user → Kubernetes operator: manages cluster runs
