#devices #npu #monitoring #performance #status #api #information

sys furiosa-smi-rs

APIs for managing and monitoring FuriosaAI NPUs

1 unstable release

new 0.1.0 Dec 2, 2024

#596 in Hardware support

41 downloads per month

Apache-2.0

1MB
810 lines

Contains (WOFF font, 400KB) NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2, (WOFF font, 135KB) FiraSans-Medium-8f9a781e4970d388.woff2, (WOFF font, 130KB) FiraSans-Regular-018c141bf0843ffd.woff2, (WOFF font, 82KB) SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2, (WOFF font, 77KB) SourceSerif4-Regular-46f98efaafac5295.ttf.woff2, (WOFF font, 45KB) SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 and 3 more.

Furiosa System Management Interface Python Binding

Overview

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.

Each module provides the following features:

  • Device module provides NPU device discovery and information including device specification, liveness, and error status

  • Topology module provides the topology status within a system including device-to-device link type and p2p accessibility.

  • System module provides system-wide information of each NPU device, including firmware version and driver version.

  • Performance module provides the device performance metrics including power consumption, temperature, utilization.

Installation

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"

Usage example

To get started with Furiosa-smi-rs, simply import the furiosa_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 furiosa_smi_rs::{Device, SmiResult};

fn main() -> SmiResult<()> {
    // Retrieve a list of NPU devices in the system.
    let devices: Vec<Device> = furiosa_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

        ...

Dependencies

~4–14MB
~163K SLoC