amdgpu-sysfs

Crates.ioamdgpu-sysfs
lib.rsamdgpu-sysfs
version0.19.3
created_at2021-06-17 07:24:52.459676+00
updated_at2025-09-13 06:23:01.07531+00
descriptionLibrary for interacting with the Linux Kernel SysFS interface for GPUs (mainly targeted at the AMDGPU driver).
homepage
repositoryhttps://github.com/ilya-zlobintsev/amdgpu-sysfs-rs/
max_upload_size
id411242
size873,745
Ilya Zlobintsev (ilya-zlobintsev)

documentation

README

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:

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.

Commit count: 110

cargo fmt