Skip to content

feat: per-GPU health gauges on NVLink/XGMI tabs and capacity-based bar colors#36

Merged
crazyguitar merged 3 commits into
mainfrom
feature/gpu-metrics
Jul 12, 2026
Merged

feat: per-GPU health gauges on NVLink/XGMI tabs and capacity-based bar colors#36
crazyguitar merged 3 commits into
mainfrom
feature/gpu-metrics

Conversation

@crazyguitar

@crazyguitar crazyguitar commented Jul 11, 2026

Copy link
Copy Markdown
Member

Purpose

Adds simple GPU monitoring to the GPU tabs (inspired by all-smi/nv-monitor) and makes bar colors reflect link saturation.

Test Result

Screenshot 2026-07-11 at 5 26 42 PM

Checklist

  • cargo fmt --check passes
  • cargo clippy -- -D warnings passes
  • cargo test passes
  • Tested on RDMA-capable hardware (or explained why not in the Test Plan)
  • Docs/README updated if behavior or flags changed

Signed-off-by: chang-ning <spiderpower02@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a shared per-GPU “health” metric struct and wires NVML (NVLink) + amdsmi (XGMI) readers to populate it, then renders those metrics as a gauge strip and extra detail lines in the GPU tabs. It also updates throughput bar coloring to reflect saturation against link capacity (when known), rather than absolute Gbps.

Changes:

  • Introduces GpuMetrics (util/VRAM/temp/power/clock) and populates it from both NVML (NVIDIA) and amdsmi (AMD).
  • Renders per-GPU health gauges in the GPU tabs and adds a utilization sparkline (fixed 0–100 scale) in detail panes.
  • Colors throughput bars by % of link capacity when available, with a fallback to the prior absolute-Gbps coloring.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/xgmi.rs Adds amdsmi FFI structs/entry points and captures per-GPU health metrics in XGMI snapshots.
src/nvlink.rs Captures per-GPU health metrics via NVML and attaches them to NVLink snapshots.
src/gpu.rs New shared GpuMetrics struct used by both GPU backends and the TUI.
src/tui/ui.rs Adds gauge strip + detail rendering for GPU health; adds capacity-based color helpers and refactors bar rendering.
src/tui/app.rs Threads metrics into TUI metadata and records utilization history for sparklines.
src/tui/theme.rs Adds a good_dim color used in the new capacity gradient.
src/main.rs Registers the new gpu module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/xgmi.rs Outdated
Comment thread src/nvlink.rs Outdated
Comment thread src/tui/ui.rs Outdated
Signed-off-by: chang-ning <spiderpower02@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Signed-off-by: chang-ning <spiderpower02@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@crazyguitar
crazyguitar merged commit b027e10 into main Jul 12, 2026
5 checks passed
@crazyguitar
crazyguitar deleted the feature/gpu-metrics branch July 12, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants