pub struct ComputeMetrics {
pub devices: Vec<DeviceComputeMetrics>,
pub active_kernels: Vec<KernelExecution>,
pub input_latency_ms: f64,
pub compute_latency_ms: f64,
pub reduce_latency_ms: f64,
pub output_latency_ms: f64,
pub operations_per_second: f64,
pub flops_achieved: f64,
pub flops_theoretical: f64,
pub compute_efficiency_pct: f64,
pub memory_efficiency_pct: f64,
}Expand description
Compute pipeline metrics
Fields§
§devices: Vec<DeviceComputeMetrics>Per-device compute metrics
active_kernels: Vec<KernelExecution>Active kernel executions
input_latency_ms: f64Pipeline stage latencies Input stage latency (H2D transfers)
compute_latency_ms: f64Compute stage latency (kernel execution)
reduce_latency_ms: f64Reduce stage latency (tile reduction)
output_latency_ms: f64Output stage latency (D2H transfers)
operations_per_second: f64Throughput in operations per second
flops_achieved: f64Achieved FLOPS
flops_theoretical: f64Theoretical peak FLOPS
compute_efficiency_pct: f64Compute efficiency percentage
memory_efficiency_pct: f64Memory efficiency percentage
Implementations§
Source§impl ComputeMetrics
impl ComputeMetrics
Sourcepub fn total_latency_ms(&self) -> f64
pub fn total_latency_ms(&self) -> f64
Calculate total pipeline latency
Sourcepub fn throughput_ops(&self) -> f64
pub fn throughput_ops(&self) -> f64
Calculate throughput in operations per second
Sourcepub fn efficiency_percent(&self) -> f64
pub fn efficiency_percent(&self) -> f64
Get compute efficiency as a percentage
Sourcepub fn add_device(&mut self, device_metrics: DeviceComputeMetrics)
pub fn add_device(&mut self, device_metrics: DeviceComputeMetrics)
Add a device’s compute metrics
Sourcepub fn track_kernel(&mut self, kernel: KernelExecution)
pub fn track_kernel(&mut self, kernel: KernelExecution)
Track a kernel execution
Sourcepub fn clear_completed_kernels(&mut self)
pub fn clear_completed_kernels(&mut self)
Clear completed kernels
Trait Implementations§
Source§impl Clone for ComputeMetrics
impl Clone for ComputeMetrics
Source§fn clone(&self) -> ComputeMetrics
fn clone(&self) -> ComputeMetrics
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 moreSource§impl Debug for ComputeMetrics
impl Debug for ComputeMetrics
Auto Trait Implementations§
impl Freeze for ComputeMetrics
impl RefUnwindSafe for ComputeMetrics
impl Send for ComputeMetrics
impl Sync for ComputeMetrics
impl Unpin for ComputeMetrics
impl UnsafeUnpin for ComputeMetrics
impl UnwindSafe for ComputeMetrics
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