pub struct GPUInfo {Show 21 fields
pub vendor: GPUVendor,
pub model_name: String,
pub gpu_type: GPUType,
pub memory_mb: u64,
pub memory_type: Option<String>,
pub memory_bandwidth: Option<f32>,
pub base_clock: Option<u32>,
pub boost_clock: Option<u32>,
pub memory_clock: Option<u32>,
pub shader_units: Option<u32>,
pub rt_cores: Option<u32>,
pub tensor_cores: Option<u32>,
pub compute_capabilities: ComputeCapabilities,
pub usage_percent: Option<f32>,
pub temperature: Option<f32>,
pub power_consumption: Option<f32>,
pub power_limit: Option<f32>,
pub driver_version: Option<String>,
pub vbios_version: Option<String>,
pub pci_device_id: Option<String>,
pub pci_subsystem_id: Option<String>,
}Expand description
GPU information and specifications
Fields§
§vendor: GPUVendorGPU vendor
model_name: StringGPU model name
gpu_type: GPUTypeGPU type (discrete, integrated, etc.)
memory_mb: u64GPU memory in MB
memory_type: Option<String>GPU memory type (GDDR6, HBM2, etc.)
memory_bandwidth: Option<f32>GPU memory bandwidth in GB/s
base_clock: Option<u32>GPU base clock in MHz
boost_clock: Option<u32>GPU boost clock in MHz
memory_clock: Option<u32>GPU memory clock in MHz
shader_units: Option<u32>Number of shader units/cores
rt_cores: Option<u32>Number of RT cores (NVIDIA)
tensor_cores: Option<u32>Number of tensor cores (NVIDIA)
compute_capabilities: ComputeCapabilitiesCompute capabilities
usage_percent: Option<f32>Current GPU usage percentage
temperature: Option<f32>Current GPU temperature in Celsius
power_consumption: Option<f32>Current power consumption in watts
power_limit: Option<f32>Maximum power limit in watts
driver_version: Option<String>Driver version
vbios_version: Option<String>VBIOS version
pci_device_id: Option<String>PCI device ID
pci_subsystem_id: Option<String>PCI subsystem ID
Implementations§
Source§impl GPUInfo
impl GPUInfo
Sourcepub fn model_name(&self) -> &str
pub fn model_name(&self) -> &str
Get GPU model name
Sourcepub fn supports_cuda(&self) -> bool
pub fn supports_cuda(&self) -> bool
Check if GPU supports CUDA
Sourcepub fn cuda_capability(&self) -> Option<&str>
pub fn cuda_capability(&self) -> Option<&str>
Get CUDA compute capability
Sourcepub fn supports_rocm(&self) -> bool
pub fn supports_rocm(&self) -> bool
Check if GPU supports ROCm
Sourcepub fn supports_directml(&self) -> bool
pub fn supports_directml(&self) -> bool
Check if GPU supports DirectML
Sourcepub fn supports_opencl(&self) -> bool
pub fn supports_opencl(&self) -> bool
Check if GPU supports OpenCL
Sourcepub fn supports_vulkan(&self) -> bool
pub fn supports_vulkan(&self) -> bool
Check if GPU supports Vulkan
Sourcepub fn supports_metal(&self) -> bool
pub fn supports_metal(&self) -> bool
Check if GPU supports Metal
Sourcepub fn usage_percent(&self) -> Option<f32>
pub fn usage_percent(&self) -> Option<f32>
Get current GPU usage percentage
Sourcepub fn temperature(&self) -> Option<f32>
pub fn temperature(&self) -> Option<f32>
Get current GPU temperature