Skip to content

ilya-zlobintsev/amdgpu-sysfs-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Rust library for interacting with the AMDGPU kernel interface (partially compatible with other GPU drivers)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages