pub enum ThroughputMode {
ComputeDirect {
dtype: ElemType,
},
ComputeCmma {
dtype: ElemType,
config: ComputeCmmaConfig,
},
Memory,
MemoryRead,
MemoryWrite,
MemoryWorkingSet {
access: MemoryAccess,
bytes: u64,
},
Launch,
}Expand description
Represents the mode of a throughput computation.
Variants§
ComputeDirect
Compute direct calculation without special hardware acceleration.
ComputeCmma
Compute cmma calculation with CMMA hardware acceleration.
Fields
config: ComputeCmmaConfigThe configuration of the CMMA operation.
Memory
Memory input reads and output writes — a copy, at the default working
set. ops_count counts both directions, so this is total traffic across
the memory interface.
MemoryRead
Memory input reads only, no store, at the default working set. The
ceiling for a kernel that streams data it does not write back — a weight
stream, a reduction, a gather. Such a kernel can legitimately exceed
Memory, which is why it needs its own probe rather than
a correction factor.
MemoryWrite
Memory output writes only, no read, at the default working set. The
ceiling for a kernel that streams stores it never reads back: an RNG
fill, a memset, a broadcast. Such a kernel can legitimately exceed
Memory, which is why it needs its own probe rather
than a correction factor.
MemoryWorkingSet
One point of a memory curve: access over a working set of exactly
bytes.
bytes is the traffic one pass moves across the interface, the same
currency the measured rate is in — a Copy splits
it evenly between two buffers of bytes / 2, a
Read moves all of it out of one buffer of
bytes. So a kernel that touches N bytes asks about N regardless of
which access it resembles.
The probe reads cold: every pass moves to a fresh window of a buffer far larger than the working set, so a small size measures what a kernel that size moves rather than the speed of re-reading something already in cache. A size too small to keep the interface busy therefore reports less than the hardware can do, which is not an error — it is the ceiling for a kernel with that little in flight.
Sweeping this over a range of sizes is
MemoryCurve.
Fields
access: MemoryAccessWhich directions of traffic the probe issues.
Launch
Launch overhead measurement.
Implementations§
Source§impl ThroughputMode
impl ThroughputMode
Sourcepub const fn memory_probe(&self) -> Option<(MemoryAccess, u64)>
pub const fn memory_probe(&self) -> Option<(MemoryAccess, u64)>
The access pattern and working set this mode probes, or None for the
modes that don’t measure memory.
The one place the single-size variants are mapped onto their access and size, so nothing downstream has to repeat the equivalence.
Trait Implementations§
Source§impl Clone for ThroughputMode
impl Clone for ThroughputMode
Source§fn clone(&self) -> ThroughputMode
fn clone(&self) -> ThroughputMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ThroughputMode
Source§impl Debug for ThroughputMode
impl Debug for ThroughputMode
Source§impl<'de> Deserialize<'de> for ThroughputMode
impl<'de> Deserialize<'de> for ThroughputMode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThroughputMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThroughputMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ThroughputMode
Source§impl Hash for ThroughputMode
impl Hash for ThroughputMode
Source§impl PartialEq for ThroughputMode
impl PartialEq for ThroughputMode
Source§impl Serialize for ThroughputMode
impl Serialize for ThroughputMode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ThroughputMode
Auto Trait Implementations§
impl Freeze for ThroughputMode
impl RefUnwindSafe for ThroughputMode
impl Send for ThroughputMode
impl Sync for ThroughputMode
impl Unpin for ThroughputMode
impl UnsafeUnpin for ThroughputMode
impl UnwindSafe for ThroughputMode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CompilationArg for T
impl<T> CompilationArg for T
Source§fn dynamic_cast<Arg: CompilationArg>(&self) -> Arg
fn dynamic_cast<Arg: CompilationArg>(&self) -> Arg
impl<T> CubeComptime for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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