pub struct MemoryBandwidthModel {
pub peak_bandwidth_gbs: f64,
pub peak_compute_gflops: f64,
}Expand description
GPU memory bandwidth model.
Estimates the effective bandwidth and the roofline-model bound for a kernel.
Fields§
§peak_bandwidth_gbs: f64Peak memory bandwidth in GB/s.
peak_compute_gflops: f64Peak compute throughput in GFLOP/s.
Implementations§
Source§impl MemoryBandwidthModel
impl MemoryBandwidthModel
Sourcepub fn arithmetic_intensity(flops: f64, bytes_accessed: f64) -> f64
pub fn arithmetic_intensity(flops: f64, bytes_accessed: f64) -> f64
Compute the arithmetic intensity (FLOP/byte) of a kernel.
flops – total floating-point operations.
bytes_accessed – total bytes read/written.
Sourcepub fn roofline_performance(&self, arithmetic_intensity: f64) -> f64
pub fn roofline_performance(&self, arithmetic_intensity: f64) -> f64
Roofline performance estimate (GFLOP/s) given arithmetic intensity.
Sourcepub fn estimated_runtime_ms(&self, flops: f64, bytes_accessed: f64) -> f64
pub fn estimated_runtime_ms(&self, flops: f64, bytes_accessed: f64) -> f64
Estimated kernel execution time in milliseconds.
flops – total FLOPs in the kernel.
bytes_accessed – total bytes transferred.
Sourcepub fn is_bandwidth_bound(&self, arithmetic_intensity: f64) -> bool
pub fn is_bandwidth_bound(&self, arithmetic_intensity: f64) -> bool
Whether the kernel is bandwidth-bound or compute-bound.
Returns true if bandwidth-bound (arithmetic intensity below the ridge point).
Trait Implementations§
Source§impl Clone for MemoryBandwidthModel
impl Clone for MemoryBandwidthModel
Source§fn clone(&self) -> MemoryBandwidthModel
fn clone(&self) -> MemoryBandwidthModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MemoryBandwidthModel
impl RefUnwindSafe for MemoryBandwidthModel
impl Send for MemoryBandwidthModel
impl Sync for MemoryBandwidthModel
impl Unpin for MemoryBandwidthModel
impl UnsafeUnpin for MemoryBandwidthModel
impl UnwindSafe for MemoryBandwidthModel
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