pub struct GpuInfo {
pub name: String,
pub vendor: GpuVendor,
pub memory_total: usize,
pub memory_available: usize,
pub memorybandwidth_gbps: f64,
pub compute_units: usize,
pub base_clock_mhz: usize,
pub memory_clock_mhz: usize,
pub compute_capability: ComputeCapability,
pub features: GpuFeatures,
pub performance: GpuPerformance,
}
Expand description
GPU information and capabilities
Fields§
§name: String
GPU name/model
vendor: GpuVendor
GPU vendor
memory_total: usize
Total GPU memory in bytes
memory_available: usize
Available GPU memory in bytes
memorybandwidth_gbps: f64
Memory bandwidth in GB/s
compute_units: usize
Number of compute units (CUDA cores, stream processors, etc.)
base_clock_mhz: usize
Base clock frequency in MHz
memory_clock_mhz: usize
Memory clock frequency in MHz
compute_capability: ComputeCapability
Compute capability/architecture
features: GpuFeatures
Supported features
performance: GpuPerformance
Performance characteristics
Implementations§
Source§impl GpuInfo
impl GpuInfo
Sourcepub fn detect() -> CoreResult<Self>
pub fn detect() -> CoreResult<Self>
Detect GPU information
Sourcepub fn performance_score(&self) -> f64
pub fn performance_score(&self) -> f64
Calculate performance score (0.0 to 1.0)
Sourcepub fn optimal_workgroup_size(&self) -> usize
pub fn optimal_workgroup_size(&self) -> usize
Get optimal workgroup/block size
Sourcepub fn is_compute_capable(&self) -> bool
pub fn is_compute_capable(&self) -> bool
Check if suitable for compute workloads
Sourcepub fn is_ml_capable(&self) -> bool
pub fn is_ml_capable(&self) -> bool
Check if suitable for machine learning
Sourcepub fn create_from_pci_ids(vendor_id: &str, device_id: &str) -> Self
pub fn create_from_pci_ids(vendor_id: &str, device_id: &str) -> Self
Create GpuInfo from PCI IDs
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuInfo
impl RefUnwindSafe for GpuInfo
impl Send for GpuInfo
impl Sync for GpuInfo
impl Unpin for GpuInfo
impl UnwindSafe for GpuInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more