pub struct StageRing {
pub stages_in_flight: NonZeroUsize,
pub prefetch: Prefetch,
}Expand description
How a walk through shared memory holds its stages: a staged cube’s, or each plane’s own, whatever operands it stages.
One stage in flight fills a stage and contracts it, two cube barriers a step. Two fill the next
stage before contracting this one, at twice the shared memory. Where the next stage waits while
this one is contracted is prefetch. The tile DSL drives every depth through
one schedule each, so neither is a kernel of its own. Who fills the stages is the microkernel’s
own question.
Fields§
§stages_in_flight: NonZeroUsizeStages the ring holds at once.
prefetch: PrefetchWhere the next stage’s loads wait while this one is contracted: in its own slot, the
whole fill running before the contraction of the stage before it (the tile DSL’s
Stages::pipelined), or in registers, each unit reading its share of the next stage before
the contraction and writing it into its slot after (the tile DSL’s Stages::prefetched).
Implementations§
Source§impl StageRing
impl StageRing
Sourcepub const TRIPLE: Self
pub const TRIPLE: Self
The next two stages filled while this one is contracted: what a fill that runs beside the contraction, the TMA engine’s, keeps ahead of it.
Sourcepub const SINGLE_THROUGH_REGISTERS: Self
pub const SINGLE_THROUGH_REGISTERS: Self
One stage, the next held in registers while it is contracted.
Sourcepub const DOUBLE_THROUGH_REGISTERS: Self
pub const DOUBLE_THROUGH_REGISTERS: Self
Two stages, the next held in registers while this one is contracted.
Sourcepub fn bytes(&self, stage_bytes: usize) -> usize
pub fn bytes(&self, stage_bytes: usize) -> usize
Bytes of shared memory the ring holds, one stage holding stage_bytes.
Sourcepub fn resolve(
self,
hw: &Hardware,
operands: &[StagedOperand],
units: usize,
) -> Self
pub fn resolve( self, hw: &Hardware, operands: &[StagedOperand], units: usize, ) -> Self
The ring that fills stages of operands on a cube of units units: this one, prefetching
into its slots where the tile DSL would refuse to hold the next stage in registers. A
refusal is made at expansion, where it is a launch that writes nothing; so every setting
runs on every problem, and where it resolves to another’s ring it compiles that one’s
launch.
Asked before the operands’ widths are settled, so each operand’s share is its most over
every width it could bind at: the powers of two up to the widest line hw reads.
An operand of an element no buffer stores, e2m1 or tf32, is read from words: the register prefetch, which reads a plain source at its own width, does not carry it, and its ring prefetches into its slots.
The tile DSL holds one stage ahead in registers, so a ring of more than two stages would
leave the slots past the second idle; and it holds at most Prefetch::fits scalars a unit
of every operand’s stage (StagedOperand::most_prefetched).
Trait Implementations§
impl Copy for StageRing
Source§impl Display for StageRing
Nothing for a single stage filled in its slot, so the settings that hold one keep their names.
impl Display for StageRing
Nothing for a single stage filled in its slot, so the settings that hold one keep their names.
impl Eq for StageRing
impl StructuralPartialEq for StageRing
Auto Trait Implementations§
impl Freeze for StageRing
impl RefUnwindSafe for StageRing
impl Send for StageRing
impl Sync for StageRing
impl Unpin for StageRing
impl UnsafeUnpin for StageRing
impl UnwindSafe for StageRing
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>(&self) -> Argwhere
Arg: CompilationArg,
fn dynamic_cast<Arg>(&self) -> Argwhere
Arg: CompilationArg,
impl<T> CubeComptime for T
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<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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