Crates.io | test-smi-rs |
lib.rs | test-smi-rs |
version | 0.1.2 |
source | src |
created_at | 2024-11-13 07:08:39.351966 |
updated_at | 2024-11-19 04:11:24.186049 |
description | APIs for managing and monitoring FuriosaAI NPUs |
homepage | |
repository | |
max_upload_size | |
id | 1446080 |
size | 2,070,868 |
Furiosa System Management Interface, is a programmatic interface for managing and monitoring FuriosaAI NPUs.
The interface provides the following API modules, each designed to offer distinct functionalities for managing and monitoring NPU devices. These modules enable developers to access essential hardware information, topology details, system-wide information, and performance metrics.
The goal of the furiosa-smi-rs
crate is to provide wrappers around the C furiosa-smi API.
Provides NPU device discovery and information.
Provides the device topology status within the system.
Provides system-wide information about NPU devices.
Provides NPU device performance status and metrics.
Run the following Cargo command in your project directory:
cargo add furiosa-smi-rs
Or add the following line to your Cargo.toml:
furiosa-smi-rs = "0.1.0"
To get started with Furiosa-smi-rs, simply import the test_smi_rs
crate and utilize its functions to interact with NPU devices. The package provides various methods to access the NPU device information and status.
use test_smi_rs::{Device, SmiResult};
fn main() -> SmiResult<()> {
// Retrieve a list of NPU devices in the system.
let devices: Vec<Device> = test_smi_rs::list_devices()?;
for device in devices.iter() {
// Acquire information about the NPU device.
let device_info = device.device_info()?;
println!("Device Info");
println!("\t\tDevice Arch: {:?}", device_info.arch());
println!("\t\tDevice Cores: {:?}", device_info.core_num());
}
// You can use other APIs. Please refer to the documentation.
Ok(())
}
The expected output is as below.
Device Info
Device Arch: Rngd
Device Cores: 8
...