32 releases (11 breaking)
0.12.4 | Nov 21, 2023 |
---|---|
0.12.1 | Sep 19, 2023 |
0.11.0 | Mar 17, 2023 |
0.7.0 | Dec 25, 2022 |
0.3.0 | Jun 21, 2021 |
#41 in #gpu
1,783 downloads per month
77KB
2K
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;
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.
Dependencies
~185KB