Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cpu.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{HardwareQueryError, Result};
use serde::{Deserialize, Serialize};
use std::fmt;
use std::{fmt, fs};
use sysinfo::System;

/// CPU vendor information
Expand Down Expand Up @@ -471,7 +471,7 @@ impl CPUInfo {
}

fn detect_vulnerabilities() -> Result<Vec<String>> {
let vulnerabilities = Vec::new();
let mut vulnerabilities = Vec::new();

#[cfg(target_os = "linux")]
{
Expand Down
10 changes: 5 additions & 5 deletions src/tpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl TPUInfo {

/// Detect Google Coral Edge TPUs
fn detect_edge_tpus() -> Result<Vec<TPUInfo>> {
let tpus = Vec::new();
let mut tpus = Vec::new();

#[cfg(target_os = "linux")]
{
Expand All @@ -204,7 +204,7 @@ impl TPUInfo {
memory_gb: None, // Uses host memory
memory_bandwidth_gbps: Some(2.0), // USB 3.0 bandwidth
core_count: Some(1),
driver_version: Self::get_edge_tpu_driver_version(),
driver_version: Self::get_tpu_driver_version(),
firmware_version: None,
device_id: Some("18d1:9302".to_string()),
supported_frameworks: vec![
Expand Down Expand Up @@ -242,7 +242,7 @@ impl TPUInfo {
memory_gb: None,
memory_bandwidth_gbps: Some(8.0), // PCIe bandwidth
core_count: Some(1),
driver_version: Self::get_edge_tpu_driver_version(),
driver_version: Self::get_tpu_driver_version(),
firmware_version: None,
device_id: None,
supported_frameworks: vec![
Expand Down Expand Up @@ -272,7 +272,7 @@ impl TPUInfo {

/// Detect Intel Habana accelerators
fn detect_intel_habana() -> Result<Vec<TPUInfo>> {
let tpus = Vec::new();
let mut tpus = Vec::new();

#[cfg(target_os = "linux")]
{
Expand Down Expand Up @@ -303,7 +303,7 @@ impl TPUInfo {
memory_gb: Some(32.0), // Typical for Gaudi
memory_bandwidth_gbps: Some(2400.0), // HBM2E bandwidth
core_count: Some(8), // Typical core count
driver_version: Self::get_habana_driver_version(),
driver_version: Self::get_tpu_driver_version(),
firmware_version: None,
device_id: Some(device.trim().to_string()),
supported_frameworks: vec![
Expand Down