| Crates.io | rocm_smi_lib |
| lib.rs | rocm_smi_lib |
| version | 0.3.2 |
| created_at | 2023-08-23 19:37:58.144521+00 |
| updated_at | 2025-05-14 16:31:23.043504+00 |
| description | easy to use crate for using rocm-smi from rust |
| homepage | |
| repository | https://github.com/PTFOPlayer/rocm_lib_sys |
| max_upload_size | |
| id | 952694 |
| size | 74,527 |
Crate bringing support for rocm-smi liblary from C
| Crate version | Rocm version |
|---|---|
| <2.0 | <6.0 |
| 2.1 - 2.2 | PROVEN BROKEN |
| 2.3 | 6.0-6.3 |
Check out How to install ROCM
Example of printing the name of your GPU:
fn print_gpu_name() -> Result<(), RocmErr> {
let rocm = RocmSmi::init()?;
let name = rocm.get_device_identifiers(0)?.name;
println!("{}", name);
Ok(())
}
Same thing as above but with creation of device object
fn print_gpu_name() -> Result<(), RocmErr> {
let rocm = RocmSmi::init()?.into_first_device()?; // into first devic requires enabling `device` feature
let name = rocm.get_identifiers()?.name;
println!("{}", name);
Ok(())
}
Please consider testing rc versions and report bugs in them, api is large and it takes a lot of time to test everything alone on many GPU's.