pub struct DeviceComputeMetrics {
pub device_id: DeviceId,
pub utilization_pct: f64,
pub sm_active_pct: f64,
pub warps_active: u32,
pub warps_max: u32,
pub clock_mhz: u32,
pub clock_max_mhz: u32,
pub power_watts: f64,
pub power_limit_watts: f64,
pub temperature_c: f64,
pub throttle_reason: Option<ThrottleReason>,
pub history: VecDeque<f64>,
}Expand description
Per-device compute metrics
Fields§
§device_id: DeviceIdDevice ID
utilization_pct: f64Compute utilization (0.0-100.0)
sm_active_pct: f64Streaming multiprocessor / Compute unit active percentage
warps_active: u32Active warps
warps_max: u32Maximum warps
clock_mhz: u32Current clock speed in MHz
clock_max_mhz: u32Maximum clock speed in MHz
power_watts: f64Current power in watts
power_limit_watts: f64Power limit in watts
temperature_c: f64Temperature in Celsius
throttle_reason: Option<ThrottleReason>Throttle reason (if any)
history: VecDeque<f64>Utilization history (60-point sparkline)
Implementations§
Source§impl DeviceComputeMetrics
impl DeviceComputeMetrics
Sourcepub const MAX_HISTORY_POINTS: usize = 60
pub const MAX_HISTORY_POINTS: usize = 60
Maximum history points
Sourcepub fn update_utilization(&mut self, pct: f64)
pub fn update_utilization(&mut self, pct: f64)
Update utilization and add to history
Sourcepub fn warp_occupancy_pct(&self) -> f64
pub fn warp_occupancy_pct(&self) -> f64
Get warp occupancy percentage
Sourcepub fn clock_ratio(&self) -> f64
pub fn clock_ratio(&self) -> f64
Get clock ratio (current/max)
Sourcepub fn power_ratio(&self) -> f64
pub fn power_ratio(&self) -> f64
Get power ratio (current/limit)
Sourcepub fn is_throttling(&self) -> bool
pub fn is_throttling(&self) -> bool
Check if device is throttling
Trait Implementations§
Source§impl Clone for DeviceComputeMetrics
impl Clone for DeviceComputeMetrics
Source§fn clone(&self) -> DeviceComputeMetrics
fn clone(&self) -> DeviceComputeMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DeviceComputeMetrics
impl RefUnwindSafe for DeviceComputeMetrics
impl Send for DeviceComputeMetrics
impl Sync for DeviceComputeMetrics
impl Unpin for DeviceComputeMetrics
impl UnsafeUnpin for DeviceComputeMetrics
impl UnwindSafe for DeviceComputeMetrics
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