# randy420marsh/rtxefficiencytuner architecture

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

- Interactive diagram: https://gitdiagram.com/randy420marsh/rtxefficiencytuner
- Repository: https://github.com/randy420marsh/rtxefficiencytuner

## Overview

This repository provides two GPU-tuning interfaces: a command-line clock sweep that measures compute efficiency and produces plots and recommendations, and a Qt utility for live GPU monitoring and manual controls. The CLI’s documented sweep includes baseline measurement, clock stepping, thermal cooldown, and final cleanup. Source excerpts show the CLI orchestration, workload, sampling, plotting, and selected GUI behavior; other documented features are represented at the owning module without assuming unsampled call details.

Main entry points: [`tune_and_graph.py`](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py) (Sweep orchestration), [`rtx_tuner_v3.py`](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py) (Qt tuner interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI Characterization"]
  node_cli_main["Sweep orchestration<br/>[tune_and_graph.py]"]
  node_gpu_discovery["GPU discovery<br/>[tune_and_graph.py]"]
  node_sweep_modes["Clock sweep modes<br/>[tune_and_graph.py]"]
  node_cooldown["Thermal cooldown<br/>[tune_and_graph.py]"]
  node_stress["Matrix workload<br/>[tune_and_graph.py]"]
  node_sampling["Power and throughput<br/>[tune_and_graph.py]"]
  node_metrics["Efficiency metrics<br/>[tune_and_graph.py]"]
end

subgraph group_gui["GUI Controls"]
  node_gui_app["Qt tuner interface<br/>[rtx_tuner_v3.py]"]
  node_live_monitor["Live GPU monitoring<br/>[rtx_tuner_v3.py]"]
  node_fan_curve["Editable fan curve<br/>[rtx_tuner_v3.py]"]
  node_manual_controls["Manual GPU controls<br/>[rtx_tuner_v3.py]"]
  node_system_info["System information<br/>[rtx_tuner_v3.py]"]
end

subgraph group_interfaces["GPU Interfaces"]
  node_nvidia_smi["NVIDIA management"]
  node_nvidia_settings["NVIDIA settings"]
  node_nvml["NVML telemetry"]
  node_gpu["NVIDIA GPU"]
end

subgraph group_outputs["Results"]
  node_plot["Efficiency plots<br/>[tune_and_graph.py]"]
  node_recommend["Settings recommendations<br/>[tune_and_graph.py]"]
  node_compute_results["Sweep measurements<br/>[tune_and_graph.py]"]
end

node_user(("GPU tuner user"))

node_user -->|"runs sweep"| node_cli_main
node_user -->|"lists GPUs"| node_gpu_discovery
node_cli_main -->|"reads limits"| node_gpu_discovery
node_cli_main -->|"configures sweep"| node_sweep_modes
node_cli_main -->|"waits for stability"| node_cooldown
node_cli_main -->|"launches workload"| node_stress
node_cli_main -->|"collects measurements"| node_sampling
node_cli_main -->|"sets clocks and power"| node_nvidia_smi
node_cli_main -->|"sets and resets fans"| node_nvidia_settings
node_gpu_discovery -->|"queries GPU limits"| node_nvidia_smi
node_stress -->|"runs matrix multiply"| node_gpu
node_sampling -->|"reads GPU stats"| node_nvidia_smi
node_sampling -->|"records measurements"| node_compute_results
node_cli_main -->|"derives efficiency"| node_metrics
node_compute_results -->|"supplies measurements"| node_metrics
node_cli_main -->|"plots sweep results"| node_plot
node_cli_main -->|"prints settings"| node_recommend
node_user -->|"opens tuner"| node_gui_app
node_gui_app -->|"refreshes display"| node_live_monitor
node_live_monitor -->|"reads telemetry"| node_nvml
node_nvml -->|"queries device"| node_gpu
node_gui_app -->|"edits curve"| node_fan_curve
node_gui_app -->|"applies controls"| node_manual_controls
node_manual_controls -->|"sets fan speed"| node_nvidia_settings
node_manual_controls -->|"sets power limit"| node_nvidia_smi
node_gui_app -->|"displays system data"| node_system_info
node_system_info -->|"reads GPU details"| node_nvml

click node_cli_main "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py"
click node_gpu_discovery "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py"
click node_sweep_modes "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py"
click node_cooldown "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py"
click node_stress "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py"
click node_sampling "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py"
click node_metrics "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py"
click node_plot "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py"
click node_recommend "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py"
click node_gui_app "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py"
click node_live_monitor "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py"
click node_fan_curve "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py"
click node_manual_controls "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py"
click node_system_info "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py"
click node_compute_results "https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.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_main,node_gpu_discovery,node_sweep_modes,node_cooldown,node_stress,node_sampling,node_metrics,node_user toneBlue
class node_gui_app,node_live_monitor,node_fan_curve,node_manual_controls,node_system_info toneAmber
class node_nvidia_smi,node_nvidia_settings,node_nvml,node_gpu toneMint
class node_plot,node_recommend,node_compute_results toneRose
```

## Components

### CLI Characterization

- [Sweep orchestration](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`
- [GPU discovery](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`
- [Clock sweep modes](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`
- [Thermal cooldown](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`
- [Matrix workload](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`
- [Power and throughput](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`
- [Efficiency metrics](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`

### GUI Controls

- [Qt tuner interface](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py): `rtx_tuner_v3.py`
- [Live GPU monitoring](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py): `rtx_tuner_v3.py`
- [Editable fan curve](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py): `rtx_tuner_v3.py`
- [Manual GPU controls](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py): `rtx_tuner_v3.py`
- [System information](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/rtx_tuner_v3.py): `rtx_tuner_v3.py`

### GPU Interfaces

- **NVIDIA management**
- **NVIDIA settings**
- **NVML telemetry**
- **NVIDIA GPU**

### Results

- [Efficiency plots](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`
- [Settings recommendations](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`
- [Sweep measurements](https://github.com/randy420marsh/rtxefficiencytuner/blob/main/tune_and_graph.py): `tune_and_graph.py`

### Other components

- **GPU tuner user**

## Connections

- GPU tuner user → Sweep orchestration: runs sweep
- GPU tuner user → GPU discovery: lists GPUs
- Sweep orchestration → GPU discovery: reads limits
- Sweep orchestration → Clock sweep modes: configures sweep
- Sweep orchestration → Thermal cooldown: waits for stability
- Sweep orchestration → Matrix workload: launches workload
- Sweep orchestration → Power and throughput: collects measurements
- Sweep orchestration → NVIDIA management: sets clocks and power
- Sweep orchestration → NVIDIA settings: sets and resets fans
- GPU discovery → NVIDIA management: queries GPU limits
- Matrix workload → NVIDIA GPU: runs matrix multiply
- Power and throughput → NVIDIA management: reads GPU stats
- Power and throughput → Sweep measurements: records measurements
- Sweep orchestration → Efficiency metrics: derives efficiency
- Sweep measurements → Efficiency metrics: supplies measurements
- Sweep orchestration → Efficiency plots: plots sweep results
- Sweep orchestration → Settings recommendations: prints settings
- GPU tuner user → Qt tuner interface: opens tuner
- Qt tuner interface → Live GPU monitoring: refreshes display
- Live GPU monitoring → NVML telemetry: reads telemetry
- NVML telemetry → NVIDIA GPU: queries device
- Qt tuner interface → Editable fan curve: edits curve
- Qt tuner interface → Manual GPU controls: applies controls
- Manual GPU controls → NVIDIA settings: sets fan speed
- Manual GPU controls → NVIDIA management: sets power limit
- Qt tuner interface → System information: displays system data
- System information → NVML telemetry: reads GPU details
