Struct furiosa_device::perf_regs::PerformanceCounter
source · pub struct PerformanceCounter { /* private fields */ }
Implementations§
source§impl PerformanceCounter
impl PerformanceCounter
sourcepub fn read<P: AsRef<Path>>(
base_dir: P,
dev_name: &str
) -> PerformanceCounterResult<PerformanceCounter>
pub fn read<P: AsRef<Path>>( base_dir: P, dev_name: &str ) -> PerformanceCounterResult<PerformanceCounter>
Read performance counters about specific device.
sourcepub fn cycle_count(&self) -> usize
pub fn cycle_count(&self) -> usize
Returns cycle count of the device file.
sourcepub fn task_execution_cycle(&self) -> u32
pub fn task_execution_cycle(&self) -> u32
Returns task execution cycle count of the device file.
sourcepub fn tensor_execution_cycle(&self) -> u32
pub fn tensor_execution_cycle(&self) -> u32
Returns tensor execution cycle count of the device file.
sourcepub fn calculate_increased(&self, other: &Self) -> Self
pub fn calculate_increased(&self, other: &Self) -> Self
Returns the difference between two counters.
sourcepub fn calculate_utilization(&self, other: &Self) -> Utilization
pub fn calculate_utilization(&self, other: &Self) -> Utilization
Returns NPU utilization based on the difference between two counters.
Trait Implementations§
source§impl Clone for PerformanceCounter
impl Clone for PerformanceCounter
source§fn clone(&self) -> PerformanceCounter
fn clone(&self) -> PerformanceCounter
Returns a copy 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 PerformanceCounter
impl Debug for PerformanceCounter
source§impl Default for PerformanceCounter
impl Default for PerformanceCounter
impl Copy for PerformanceCounter
Auto Trait Implementations§
impl RefUnwindSafe for PerformanceCounter
impl Send for PerformanceCounter
impl Sync for PerformanceCounter
impl Unpin for PerformanceCounter
impl UnwindSafe for PerformanceCounter
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