amdgpu-sysfs 0.5.0

Library for interacting with the Linux Kernel SysFS interface for GPUs (mainly targeted at the AMDGPU driver).
Documentation

amdgpu-syfs-rs

Crates.io Docs.rs

This library allows you to interact with the Linux Kernel SysFS interface for GPUs (mainly targeted at the AMDGPU driver).

Basic usage:

let sysfs_path = PathBuf::from_str("/sys/class/drm/card0/device").unwrap();

let gpu_handle = GpuHandle::new_from_path(sysfs_path).await.unwrap();
    
let gpu_usage = gpu_handle.get_busy_percent().await.unwrap();
    
let total_vram = gpu_handle.get_total_vram().await.unwrap();