pub struct PinnedStagingStats {
pub retained_bytes: usize,
pub allocations: u64,
pub limit_bytes: usize,
}Expand description
What a runtime’s download staging retains, and the bound it retains it under.
§Examples
use tenferro_gpu::cuda::{gpu_available, CudaDeviceId, CudaRuntime};
let runtime = CudaRuntime::new(CudaDeviceId::from_ordinal(0))?;
let stats = runtime.pinned_staging_stats();
if stats.retained_bytes > stats.limit_bytes {
runtime.clear_pinned_staging();
}
println!("{stats:?}");Fields§
§retained_bytes: usizeBytes the cached staging buffer holds right now.
allocations: u64Pinned host allocations this runtime made for staging, cumulative: the first download, each later growth, and each temporary buffer used above the bound or re-pinned after a clear.
limit_bytes: usizeLargest download whose staging is retained.
Trait Implementations§
Source§impl Clone for PinnedStagingStats
impl Clone for PinnedStagingStats
impl Copy for PinnedStagingStats
Source§impl Debug for PinnedStagingStats
impl Debug for PinnedStagingStats
impl Eq for PinnedStagingStats
Source§impl PartialEq for PinnedStagingStats
impl PartialEq for PinnedStagingStats
impl StructuralPartialEq for PinnedStagingStats
Auto Trait Implementations§
impl Freeze for PinnedStagingStats
impl RefUnwindSafe for PinnedStagingStats
impl Send for PinnedStagingStats
impl Sync for PinnedStagingStats
impl Unpin for PinnedStagingStats
impl UnsafeUnpin for PinnedStagingStats
impl UnwindSafe for PinnedStagingStats
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more