pub struct TPUInfo {Show 17 fields
pub vendor: TPUVendor,
pub model_name: String,
pub architecture: TPUArchitecture,
pub connection_type: TPUConnectionType,
pub tops_performance: Option<f32>,
pub memory_gb: Option<f32>,
pub memory_bandwidth_gbps: Option<f32>,
pub core_count: Option<u32>,
pub driver_version: Option<String>,
pub firmware_version: Option<String>,
pub device_id: Option<String>,
pub supported_frameworks: Vec<String>,
pub power_consumption: Option<f32>,
pub temperature: Option<f32>,
pub clock_frequency: Option<u32>,
pub supported_dtypes: Vec<String>,
pub capabilities: HashMap<String, String>,
}
Expand description
TPU information structure
Fields§
§vendor: TPUVendor
TPU vendor
model_name: String
TPU model name
architecture: TPUArchitecture
TPU architecture/generation
connection_type: TPUConnectionType
Connection type
tops_performance: Option<f32>
Performance in TOPS (Tera Operations Per Second)
memory_gb: Option<f32>
Memory size in GB
memory_bandwidth_gbps: Option<f32>
Memory bandwidth in GB/s
core_count: Option<u32>
Number of cores/processing units
driver_version: Option<String>
Driver version
firmware_version: Option<String>
Firmware version
device_id: Option<String>
Device ID
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
supported_dtypes: Vec<String>
Supported data types
capabilities: HashMap<String, String>
Additional capabilities
Implementations§
Source§impl TPUInfo
impl TPUInfo
Sourcepub fn model_name(&self) -> &str
pub fn model_name(&self) -> &str
Get TPU model name
Sourcepub fn architecture(&self) -> &TPUArchitecture
pub fn architecture(&self) -> &TPUArchitecture
Get TPU architecture
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 TPU supports a specific framework
Sourcepub fn supports_dtype(&self, dtype: &str) -> bool
pub fn supports_dtype(&self, dtype: &str) -> bool
Check if TPU supports a specific data type
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TPUInfo
impl<'de> Deserialize<'de> for TPUInfo
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 TPUInfo
impl RefUnwindSafe for TPUInfo
impl Send for TPUInfo
impl Sync for TPUInfo
impl Unpin for TPUInfo
impl UnwindSafe for TPUInfo
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