#amdgpu #gpu #sysfs #linux #kernel

amdgpu-sysfs

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

14 unstable releases (5 breaking)

0.6.1 Nov 21, 2022
0.6.0 Nov 21, 2022
0.5.0 Apr 30, 2022
0.4.7 Apr 30, 2022
0.1.2 Jun 19, 2021

#137 in Unix APIs

Download history 1/week @ 2022-08-17 24/week @ 2022-08-24 3/week @ 2022-08-31 37/week @ 2022-09-07 12/week @ 2022-09-14 3/week @ 2022-09-21 1/week @ 2022-09-28 1/week @ 2022-10-05 36/week @ 2022-11-02 7/week @ 2022-11-09 47/week @ 2022-11-16 10/week @ 2022-11-23 5/week @ 2022-11-30

69 downloads per month

GPL-3.0 license

31KB
770 lines

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(); 

Dependencies

~160KB