# myeongsu-koo/gpu-pulse architecture

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

- Interactive diagram: https://gitdiagram.com/myeongsu-koo/gpu-pulse
- Repository: https://github.com/myeongsu-koo/gpu-pulse

## Overview

GPU Pulse profiles NVIDIA GPUs with passive CUPTI hardware-counter sampling and separately measures workload throughput, then presents observations in a local dashboard or multi-GPU API. The graph preserves the documented Colab demo, precision benchmarking, and multi-GPU capabilities. Several runtime details and the notebook implementation were not sampled, so those connections are omitted rather than inferred.

Main entry points: [`main/observer.py`](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/observer.py) (CUPTI Observer), [`main/node_agent.py`](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/node_agent.py) (Node Supervisor), [`main/webui.py`](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/webui.py) (Local Dashboard Server), [`main/demos/gpu_pulse_all_precisions.py`](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/demos/gpu_pulse_all_precisions.py) (Variable Workload Demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["GPU Capture"]
  node_observer["CUPTI Observer<br/>[observer.py]"]
  node_precision["Precision Sweep<br/>[precision_bench.py]"]
  node_workload["Variable Workload Demo"]
end

subgraph group_analysis["Metric Analysis"]
  node_metrics["Metric Planning<br/>[metrics.py]"]
  node_peak["Peak Registry<br/>[peak_registry.py]"]
end

subgraph group_multi["Multi-GPU"]
  node_gpu_discovery["GPU Discovery<br/>[gpu_discovery.py]"]
  node_supervisor["Node Supervisor<br/>[node_agent.py]"]
  node_aggregation["Snapshot Aggregation<br/>[node_aggregator.py]"]
end

subgraph group_presentation["Presentation"]
  node_state["Observer State<br/>[observer.py]"]
  node_webui["Local Dashboard Server<br/>[webui.py]"]
  node_dashboard["Metrics Dashboard<br/>[dashboard.html]"]
end

node_user(("GPU Operator"))
node_cupit["NVIDIA CUPTI"]
node_gpu["NVIDIA GPU"]

node_user -->|"runs collection"| node_observer
node_user -->|"runs demo"| node_workload
node_observer -->|"samples counters"| node_cupit
node_cupit -.->|"reads counters"| node_gpu
node_observer -->|"normalizes metrics"| node_metrics
node_observer -->|"stores samples"| node_state
node_observer -->|"starts dashboard"| node_webui
node_webui -->|"reads snapshots"| node_state
node_webui -->|"serves page"| node_dashboard
node_user -->|"runs sweep"| node_precision
node_workload -.->|"executes workload"| node_gpu
node_user -.->|"queries node API"| node_supervisor
node_supervisor -->|"discovers devices"| node_gpu_discovery
node_supervisor -->|"aggregates snapshots"| node_aggregation
node_supervisor -->|"matches GPU peaks"| node_peak
node_aggregation -->|"calculates attainment"| node_peak

click node_observer "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/observer.py"
click node_precision "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/precision_bench.py"
click node_workload "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/demos/gpu_pulse_all_precisions.py"
click node_metrics "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/metrics.py"
click node_peak "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/peak_registry.py"
click node_gpu_discovery "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/gpu_discovery.py"
click node_supervisor "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/node_agent.py"
click node_aggregation "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/node_aggregator.py"
click node_state "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/observer.py"
click node_webui "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/webui.py"
click node_dashboard "https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/dashboard.html"

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_observer,node_precision,node_workload toneBlue
class node_metrics,node_peak toneAmber
class node_gpu_discovery,node_supervisor,node_aggregation toneMint
class node_state,node_webui,node_dashboard toneRose
class node_user,node_cupit,node_gpu toneIndigo
```

## Components

### GPU Capture

- [CUPTI Observer](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/observer.py): `main/observer.py`
- [Precision Sweep](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/precision_bench.py): `main/precision_bench.py`
- [Variable Workload Demo](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/demos/gpu_pulse_all_precisions.py): `main/demos/gpu_pulse_all_precisions.py`

### Metric Analysis

- [Metric Planning](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/metrics.py): `main/metrics.py`
- [Peak Registry](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/peak_registry.py): `main/peak_registry.py`

### Multi-GPU

- [GPU Discovery](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/gpu_discovery.py): `main/gpu_discovery.py`
- [Node Supervisor](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/node_agent.py): `main/node_agent.py`
- [Snapshot Aggregation](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/node_aggregator.py): `main/node_aggregator.py`

### Presentation

- [Observer State](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/observer.py): `main/observer.py`
- [Local Dashboard Server](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/webui.py): `main/webui.py`
- [Metrics Dashboard](https://github.com/myeongsu-koo/gpu-pulse/blob/main/main/dashboard.html): `main/dashboard.html`

### Other components

- **GPU Operator**
- **NVIDIA CUPTI**
- **NVIDIA GPU**

## Connections

- GPU Operator → CUPTI Observer: runs collection (evidence: `README.md`)
- GPU Operator → Variable Workload Demo: runs demo (evidence: `README.md`)
- CUPTI Observer → NVIDIA CUPTI: samples counters (evidence: `main/observer.py`)
- NVIDIA CUPTI → NVIDIA GPU: reads counters
- CUPTI Observer → Metric Planning: normalizes metrics (evidence: `main/observer.py`)
- CUPTI Observer → Observer State: stores samples (evidence: `main/observer.py`)
- CUPTI Observer → Local Dashboard Server: starts dashboard (evidence: `main/observer.py`)
- Local Dashboard Server → Observer State: reads snapshots (evidence: `main/webui.py`)
- Local Dashboard Server → Metrics Dashboard: serves page (evidence: `main/webui.py`)
- GPU Operator → Precision Sweep: runs sweep (evidence: `main/precision_bench.py`)
- Variable Workload Demo → NVIDIA GPU: executes workload
- GPU Operator → Node Supervisor: queries node API
- Node Supervisor → GPU Discovery: discovers devices (evidence: `main/node_agent.py`)
- Node Supervisor → Snapshot Aggregation: aggregates snapshots (evidence: `main/node_agent.py`)
- Node Supervisor → Peak Registry: matches GPU peaks (evidence: `main/node_agent.py`)
- Snapshot Aggregation → Peak Registry: calculates attainment (evidence: `main/node_aggregator.py`)
