#amdgpu

amdgpu-sysfs

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

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

Download history 45/week @ 2023-08-11 78/week @ 2023-08-18 113/week @ 2023-08-25 90/week @ 2023-09-01 137/week @ 2023-09-08 141/week @ 2023-09-15 125/week @ 2023-09-22 104/week @ 2023-09-29 78/week @ 2023-10-06 74/week @ 2023-10-13 416/week @ 2023-10-20 163/week @ 2023-10-27 111/week @ 2023-11-03 83/week @ 2023-11-10 453/week @ 2023-11-17 1126/week @ 2023-11-24

1,783 downloads per month

GPL-3.0 license

77KB
2K SLoC

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;

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