pub struct NPUInfo {Show 15 fields
pub vendor: NPUVendor,
pub model_name: String,
pub npu_type: NPUType,
pub architecture: NPUArchitecture,
pub tops_performance: Option<f32>,
pub memory_mb: Option<u64>,
pub driver_version: Option<String>,
pub firmware_version: Option<String>,
pub pci_device_id: Option<String>,
pub usb_device_id: Option<String>,
pub supported_frameworks: Vec<String>,
pub power_consumption: Option<f32>,
pub temperature: Option<f32>,
pub clock_frequency: Option<u32>,
pub capabilities: HashMap<String, String>,
}
Expand description
NPU information structure
Fields§
§vendor: NPUVendor
NPU vendor
model_name: String
NPU model name
npu_type: NPUType
NPU type
architecture: NPUArchitecture
NPU architecture
tops_performance: Option<f32>
Performance in TOPS (Tera Operations Per Second)
memory_mb: Option<u64>
Memory size in MB (if applicable)
driver_version: Option<String>
Driver version
firmware_version: Option<String>
Firmware version
pci_device_id: Option<String>
PCI device ID (if applicable)
usb_device_id: Option<String>
USB device ID (if applicable)
supported_frameworks: Vec<String>
Supported frameworks
power_consumption: Option<f32>
Power consumption in watts
temperature: Option<f32>
Operating temperature in Celsius
clock_frequency: Option<u32>
Clock frequency in MHz
capabilities: HashMap<String, String>
Additional capabilities
Implementations§
Source§impl NPUInfo
impl NPUInfo
Sourcepub fn model_name(&self) -> &str
pub fn model_name(&self) -> &str
Get NPU model name
Sourcepub fn tops_performance(&self) -> Option<f32>
pub fn tops_performance(&self) -> Option<f32>
Get performance in TOPS
Sourcepub fn supports_framework(&self, framework: &str) -> bool
pub fn supports_framework(&self, framework: &str) -> bool
Check if NPU supports a specific framework
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NPUInfo
impl<'de> Deserialize<'de> for NPUInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NPUInfo
impl RefUnwindSafe for NPUInfo
impl Send for NPUInfo
impl Sync for NPUInfo
impl Unpin for NPUInfo
impl UnwindSafe for NPUInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more