pub struct Pending<T: PendingValue> { /* private fields */ }Expand description
Work that completes later, and the T it produces then.
Implementations§
Source§impl<T: PendingValue> Pending<T>
impl<T: PendingValue> Pending<T>
Sourcepub fn __expand_wait(
scope: &Scope,
this: <Self as CubeType>::ExpandType,
) -> <T as CubeType>::ExpandType
pub fn __expand_wait( scope: &Scope, this: <Self as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
Waits for the work to complete, and returns what it produced.
Source§impl Pending<()>
impl Pending<()>
Sourcepub fn wait_complete(self)
pub fn wait_complete(self)
Waits for the work to fully complete. A TMA store has then also performed its writes to
global memory, which a fence or an atomic after the wait publishes to other cubes.
Anything else completes as Pending::wait waits for it.
Sourcepub fn __expand_wait_complete(
scope: &Scope,
this: <Self as CubeType>::ExpandType,
)
pub fn __expand_wait_complete( scope: &Scope, this: <Self as CubeType>::ExpandType, )
Waits for the work to fully complete. A TMA store has then also performed its writes to
global memory, which a fence or an atomic after the wait publishes to other cubes.
Anything else completes as Pending::wait waits for it.
Source§impl<CD: Numeric> Pending<Accumulator<CD>>
impl<CD: Numeric> Pending<Accumulator<CD>>
Sourcepub fn downcast<O: Numeric>(&self) -> Pending<Accumulator<O>>
pub fn downcast<O: Numeric>(&self) -> Pending<Accumulator<O>>
This accumulator named at O, panicking unless O is the element it holds.
Like a slice’s downcast, this only satisfies the Rust type system: the registers and the
wait are the same, so it costs nothing.
Sourcepub unsafe fn downcast_unchecked<O: Numeric>(&self) -> Pending<Accumulator<O>>
pub unsafe fn downcast_unchecked<O: Numeric>(&self) -> Pending<Accumulator<O>>
Source§impl<CD: Numeric> Pending<Accumulator<CD>>
impl<CD: Numeric> Pending<Accumulator<CD>>
Sourcepub fn execute<A: Scalar, B: Scalar>(
&mut self,
a: &MatrixDescriptor<A>,
b: &MatrixDescriptor<B>,
)
pub fn execute<A: Scalar, B: Scalar>( &mut self, a: &MatrixDescriptor<A>, b: &MatrixDescriptor<B>, )
Issues D = A * B + D, with A and B in shared memory. Each MMA reads 64 rows of A
and n of B, and WgmmaTileLayout::k_step elements of K, from where the
descriptors point.
Sourcepub fn execute_registers<A: Scalar, B: Scalar>(
&mut self,
a: &Fragment<A>,
b: &MatrixDescriptor<B>,
)
pub fn execute_registers<A: Scalar, B: Scalar>( &mut self, a: &Fragment<A>, b: &MatrixDescriptor<B>, )
Issues D = A * B + D, with A in registers and B in shared memory. The fragment
must stay unchanged until the MMA’s group completes.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Waits for every MMA issued into the accumulator, zeroes it, and hands it back to the MMAs
to come, in the same registers: what Accumulator::new then Accumulator::start give,
with no copy written after the fence the MMAs to come read past.
Sourcepub fn commit(&mut self) -> Pending<()>
pub fn commit(&mut self) -> Pending<()>
Commits the MMAs issued since the last commit into a group, and returns its completion. Once it resolves, the MMAs are done reading their tiles and fragments.
Sourcepub fn __expand_execute<A: Scalar, B: Scalar>(
scope: &Scope,
this: &mut <Self as CubeType>::ExpandType,
a: &<MatrixDescriptor<A> as CubeType>::ExpandType,
b: &<MatrixDescriptor<B> as CubeType>::ExpandType,
)
pub fn __expand_execute<A: Scalar, B: Scalar>( scope: &Scope, this: &mut <Self as CubeType>::ExpandType, a: &<MatrixDescriptor<A> as CubeType>::ExpandType, b: &<MatrixDescriptor<B> as CubeType>::ExpandType, )
Issues D = A * B + D, with A and B in shared memory. Each MMA reads 64 rows of A
and n of B, and WgmmaTileLayout::k_step elements of K, from where the
descriptors point.
Sourcepub fn __expand_execute_registers<A: Scalar, B: Scalar>(
scope: &Scope,
this: &mut <Self as CubeType>::ExpandType,
a: &<Fragment<A> as CubeType>::ExpandType,
b: &<MatrixDescriptor<B> as CubeType>::ExpandType,
)
pub fn __expand_execute_registers<A: Scalar, B: Scalar>( scope: &Scope, this: &mut <Self as CubeType>::ExpandType, a: &<Fragment<A> as CubeType>::ExpandType, b: &<MatrixDescriptor<B> as CubeType>::ExpandType, )
Issues D = A * B + D, with A in registers and B in shared memory. The fragment
must stay unchanged until the MMA’s group completes.
Sourcepub fn __expand_reset(scope: &Scope, this: &mut <Self as CubeType>::ExpandType)
pub fn __expand_reset(scope: &Scope, this: &mut <Self as CubeType>::ExpandType)
Waits for every MMA issued into the accumulator, zeroes it, and hands it back to the MMAs
to come, in the same registers: what Accumulator::new then Accumulator::start give,
with no copy written after the fence the MMAs to come read past.
Sourcepub fn __expand_commit(
scope: &Scope,
this: &mut <Self as CubeType>::ExpandType,
) -> <Pending<()> as CubeType>::ExpandType
pub fn __expand_commit( scope: &Scope, this: &mut <Self as CubeType>::ExpandType, ) -> <Pending<()> as CubeType>::ExpandType
Commits the MMAs issued since the last commit into a group, and returns its completion. Once it resolves, the MMAs are done reading their tiles and fragments.
Trait Implementations§
impl Copy for Pending<()>
Source§impl<T: PendingValue> CubeType for Pending<T>
impl<T: PendingValue> CubeType for Pending<T>
type ExpandType = PendingExpand<T>
Auto Trait Implementations§
impl<T> Freeze for Pending<T>where
T: Freeze,
impl<T> RefUnwindSafe for Pending<T>where
T: RefUnwindSafe,
impl<T> Send for Pending<T>where
T: Send,
impl<T> Sync for Pending<T>where
T: Sync,
impl<T> Unpin for Pending<T>where
T: Unpin,
impl<T> UnsafeUnpin for Pending<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Pending<T>where
T: UnwindSafe,
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> 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
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