47 releases
0.17.3 | Nov 13, 2024 |
---|---|
0.17.0 | Sep 6, 2024 |
0.15.0 | Jun 15, 2024 |
0.14.0 | Jan 21, 2024 |
0.3.0 | Jun 21, 2021 |
#113 in Hardware support
5,992 downloads per month
Used in gpu-usage-waybar
120KB
2.5K
SLoC
amdgpu-syfs-rs
This library allows you to interact with the Linux Kernel SysFS interface for GPUs (mainly targeted at the AMDGPU driver).
Basic usage:
use amdgpu_sysfs::gpu_handle::GpuHandle;
# use std::path::PathBuf;
let sysfs_path = PathBuf::from("/sys/class/drm/card0/device");
let gpu_handle = GpuHandle::new_from_path(sysfs_path).unwrap();
let gpu_usage = gpu_handle.get_busy_percent().unwrap();
let total_vram = gpu_handle.get_total_vram().unwrap();
See the documentation for more info.