# boryoungkim/sdv-bmt architecture

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

- Interactive diagram: https://gitdiagram.com/boryoungkim/sdv-bmt
- Repository: https://github.com/boryoungkim/sdv-bmt

## Overview

SDV-BMT is a model-level accelerator benchmarking system: it validates a planned run, executes a workload against a device under test, records append-only evidence, then computes metrics and validity results from that evidence. The Python control plane coordinates plans, inputs, workloads and evaluation; the C++ native plane records realtime facts, with fake and NVIDIA backends. The README documents the separation and major capabilities; some internal links below are therefore documented rather than verified from sampled implementation.

Main entry points: [`src/sdv_bmt/runner/runner.py`](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/runner/runner.py) (Benchmark Runner), [`src/sdv_bmt/cli/main.py`](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/cli/main.py) (CLI), [`src/sdv_bmt/dut/native.py`](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/dut/native.py) (Native DUT Adapter), [`src/sdv_bmt/evidence/bundle.py`](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/evidence/bundle.py) (Evidence Bundle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Plan and Control"]
  node_cli["CLI<br/>[main.py]"]
  node_plan["Plan Validation<br/>[plan.py]"]
  node_contracts["Run Contracts<br/>[specs.py]"]
end

subgraph group_execution["Run Execution"]
  node_input["Input Fixtures<br/>[dataset_fixture.py]"]
  node_runner["Benchmark Runner<br/>[runner.py]"]
  node_schedule["Request Schedule<br/>[schedule.py]"]
  node_stress["Stress Control<br/>[lifecycle.py]"]
end

subgraph group_native["Native Measurement"]
  node_fake_dut["Fake DUT<br/>[fake.py]"]
  node_native_dut["Native DUT Adapter<br/>[native.py]"]
  node_nvidia["NVIDIA Adapter<br/>[adapter.py]"]
  node_native_runner["Native Measurement<br/>[loop.hpp]"]
  node_native_output["Output Pipelines"]
end

subgraph group_evidence["Evidence and Evaluation"]
  node_bundle[("Evidence Bundle<br/>[bundle.py]")]
  node_reader["Bundle Reader<br/>[reader.py]"]
  node_metrics["Metric Evaluation<br/>[metric_set_v1.py]"]
  node_quality["Task Quality"]
  node_validity["Evidence Validity<br/>[validity.py]"]
end

subgraph group_workloads["Workloads"]
  node_workload["Model Workloads<br/>[yolox.py]"]
  node_deeplab["Segmentation Workload<br/>[deeplab.py]"]
end

node_user(("Benchmark Engineer"))
node_gpu["NVIDIA GPU"]

node_user -->|"runs commands"| node_cli
node_cli -->|"validates plan"| node_plan
node_plan -->|"parses specs"| node_contracts
node_cli -->|"starts run"| node_runner
node_runner -->|"loads items"| node_input
node_runner -->|"issues requests"| node_schedule
node_runner -->|"controls lifecycle"| node_stress
node_runner -->|"runs workload"| node_workload
node_runner -->|"runs workload"| node_deeplab
node_runner -->|"uses adapter"| node_fake_dut
node_runner -->|"uses adapter"| node_native_dut
node_native_dut -->|"invokes measurement"| node_native_runner
node_native_runner -->|"encodes outputs"| node_native_output
node_native_dut -.->|"selects backend"| node_nvidia
node_nvidia -->|"measures on"| node_gpu
node_runner -->|"writes evidence"| node_bundle
node_cli -->|"evaluates run"| node_bundle
node_bundle -->|"reads bundle"| node_reader
node_reader -->|"supplies observations"| node_metrics
node_metrics -->|"computes quality"| node_quality
node_cli -.->|"checks evidence"| node_validity

click node_cli "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/cli/main.py"
click node_plan "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/runner/plan.py"
click node_contracts "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/contracts/specs.py"
click node_input "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/input/dataset_fixture.py"
click node_runner "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/runner/runner.py"
click node_schedule "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/runner/schedule.py"
click node_stress "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/stress/lifecycle.py"
click node_workload "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/workload/yolox.py"
click node_deeplab "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/workload/deeplab.py"
click node_fake_dut "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/dut/fake.py"
click node_native_dut "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/dut/native.py"
click node_nvidia "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/dut/nvidia/adapter.py"
click node_native_runner "https://github.com/boryoungkim/sdv-bmt/blob/main/native/src/common/loop.hpp"
click node_native_output "https://github.com/boryoungkim/sdv-bmt/blob/main/native/src/common/output_pipeline.hpp"
click node_bundle "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/evidence/bundle.py"
click node_reader "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/observation/reader.py"
click node_metrics "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/metrics/metric_set_v1.py"
click node_quality "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/metrics/quality_segmentation.py"
click node_validity "https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/evidence/validity.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_plan,node_contracts toneBlue
class node_input,node_runner,node_schedule,node_stress toneAmber
class node_fake_dut,node_native_dut,node_nvidia,node_native_runner,node_native_output toneMint
class node_bundle,node_reader,node_metrics,node_quality,node_validity toneRose
class node_workload,node_deeplab,node_user,node_gpu toneIndigo
```

## Components

### Plan and Control

- [CLI](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/cli/main.py): `src/sdv_bmt/cli/main.py`
- [Plan Validation](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/runner/plan.py): `src/sdv_bmt/runner/plan.py`
- [Run Contracts](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/contracts/specs.py): `src/sdv_bmt/contracts/specs.py`

### Run Execution

- [Input Fixtures](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/input/dataset_fixture.py): `src/sdv_bmt/input/dataset_fixture.py`
- [Benchmark Runner](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/runner/runner.py): `src/sdv_bmt/runner/runner.py`
- [Request Schedule](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/runner/schedule.py): `src/sdv_bmt/runner/schedule.py`
- [Stress Control](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/stress/lifecycle.py): `src/sdv_bmt/stress/lifecycle.py`

### Native Measurement

- [Fake DUT](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/dut/fake.py): `src/sdv_bmt/dut/fake.py`
- [Native DUT Adapter](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/dut/native.py): `src/sdv_bmt/dut/native.py`
- [NVIDIA Adapter](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/dut/nvidia/adapter.py): `src/sdv_bmt/dut/nvidia/adapter.py`
- [Native Measurement](https://github.com/boryoungkim/sdv-bmt/blob/main/native/src/common/loop.hpp): `native/src/common/loop.hpp`
- [Output Pipelines](https://github.com/boryoungkim/sdv-bmt/blob/main/native/src/common/output_pipeline.hpp): `native/src/common/output_pipeline.hpp`

### Evidence and Evaluation

- [Evidence Bundle](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/evidence/bundle.py): `src/sdv_bmt/evidence/bundle.py`
- [Bundle Reader](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/observation/reader.py): `src/sdv_bmt/observation/reader.py`
- [Metric Evaluation](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/metrics/metric_set_v1.py): `src/sdv_bmt/metrics/metric_set_v1.py`
- [Task Quality](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/metrics/quality_segmentation.py): `src/sdv_bmt/metrics/quality_segmentation.py`
- [Evidence Validity](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/evidence/validity.py): `src/sdv_bmt/evidence/validity.py`

### Workloads

- [Model Workloads](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/workload/yolox.py): `src/sdv_bmt/workload/yolox.py`
- [Segmentation Workload](https://github.com/boryoungkim/sdv-bmt/blob/main/src/sdv_bmt/workload/deeplab.py): `src/sdv_bmt/workload/deeplab.py`

### Other components

- **Benchmark Engineer**
- **NVIDIA GPU**

## Connections

- Benchmark Engineer → CLI: runs commands
- CLI → Plan Validation: validates plan (evidence: `src/sdv_bmt/cli/main.py`)
- Plan Validation → Run Contracts: parses specs (evidence: `src/sdv_bmt/runner/plan.py`)
- CLI → Benchmark Runner: starts run (evidence: `src/sdv_bmt/cli/main.py`)
- Benchmark Runner → Input Fixtures: loads items (evidence: `src/sdv_bmt/runner/runner.py`)
- Benchmark Runner → Request Schedule: issues requests (evidence: `src/sdv_bmt/runner/runner.py`)
- Benchmark Runner → Stress Control: controls lifecycle (evidence: `src/sdv_bmt/runner/runner.py`)
- Benchmark Runner → Model Workloads: runs workload
- Benchmark Runner → Segmentation Workload: runs workload
- Benchmark Runner → Fake DUT: uses adapter
- Benchmark Runner → Native DUT Adapter: uses adapter
- Native DUT Adapter → Native Measurement: invokes measurement
- Native Measurement → Output Pipelines: encodes outputs (evidence: `native/src/common/output_pipeline.hpp`)
- Native DUT Adapter → NVIDIA Adapter: selects backend
- NVIDIA Adapter → NVIDIA GPU: measures on
- Benchmark Runner → Evidence Bundle: writes evidence (evidence: `src/sdv_bmt/runner/runner.py`)
- CLI → Evidence Bundle: evaluates run (evidence: `src/sdv_bmt/cli/main.py`)
- Evidence Bundle → Bundle Reader: reads bundle
- Bundle Reader → Metric Evaluation: supplies observations (evidence: `src/sdv_bmt/metrics/metric_set_v1.py`)
- Metric Evaluation → Task Quality: computes quality (evidence: `src/sdv_bmt/metrics/metric_set_v1.py`)
- CLI → Evidence Validity: checks evidence
