mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 06:06:12 -06:00
[PR #209] feat(api): add GDDR6/GDDR6X VRAM temperature reading via BAR0 registers #210
Labels
No labels
api
bug
bug
cli / tui
dependencies
documentation
documentation
documentation
duplicate
enhancement
exporter
invalid
pull-request
pynvml
question
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/nvitop#210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/XuehaiPan/nvitop/pull/209
Author: @dansolombrino
Created: 4/25/2026
Status: 🔄 Open
Base:
main← Head:feat/gddr6-vram-temperature📝 Commits (2)
2d94ce1feat(api): add GDDR6/GDDR6X VRAM temperature reading via BAR0 registers4a6bf90fix self._name_maxlen access in device panel📊 Changes
7 files changed (+476 additions, -124 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
nvitop/api/device.py(+18 -0)➕
nvitop/api/libgddr6.py(+244 -0)📝
nvitop/tui/library/device.py(+7 -0)📝
nvitop/tui/screens/main/__init__.py(+2 -1)📝
nvitop/tui/screens/main/panels/device.py(+158 -91)📝
nvitop/tui/screens/main/panels/host.py(+45 -32)📄 Description
Summary
/dev/memDevice.vram_temperature()API method returning temperature in Celsius orNARequirements
/dev/memand sysfs)iomem=relaxedkernel parameter requiredN/Awhen any requirement is not met — no errors, no crashesImplementation details
nvitop/api/libgddr6.py: New module with thread-safe singleton context, mmap caching, and PCI device table mapping device IDs to BAR0 register offsetsnvitop/api/device.py:vram_temperature()method with lazy import to avoid/dev/memaccess at import timenvitop/tui/screens/main/panels/device.py: Conditional layout — detects VRAM temp availability at init, selects between 79-col (standard) and 84-col (with MTmp) layouts. All width constants parameterized viabase_widthnvitop/tui/screens/main/panels/host.py: Accepts dynamicbase_widthto match device panelAttribution
Ported from olealgoritme/gddr6 (C implementation).
Test plan
sudo python -m nvitopon a supported GPU — verify MTmp column appears with temperaturespython -m nvitopas non-root — verify original 79-col layout with no MTmp columnfrom nvitop import Device; d = Device(0); print(d.vram_temperature())returns int or NAruff checkandruff format --checkon changed files🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.