pub struct TileArgLaunch { /* private fields */ }Expand description
The host side of a TileArg: its values, its spec, the element its buffer holds and its
scales. The spec is shared: a rebound operand and the compilation argument it registers as
read the one its launch was settled with.
Implementations§
Source§impl TileArgLaunch
impl TileArgLaunch
Sourcepub fn new(
tensor: TensorArg,
element: ElemType,
width: usize,
spec: TileSpec,
) -> Self
pub fn new( tensor: TensorArg, element: ElemType, width: usize, spec: TileSpec, ) -> Self
tensor, holding element, bound width wide, as spec reads it, under no scales.
Sourcepub fn rebound(
&self,
buffers: &mut impl Iterator<Item = BufferBinding>,
) -> Option<Self>
pub fn rebound( &self, buffers: &mut impl Iterator<Item = BufferBinding>, ) -> Option<Self>
This operand bound again over other buffers of the same layout: each tensor it holds, in the
order it holds them (its values, then its scales’, then its index table’s, then its
codebook’s), takes the next
of buffers and keeps the shape, strides and tiling it was settled at. A launch that binds
the same operands every step keeps its binding and changes only the addresses.
None for a tensor map, whose descriptor holds its buffer, and where buffers runs out.
Sourcepub fn codebook(self, table: TileArgLaunch) -> Result<Self, Refusal>
pub fn codebook(self, table: TileArgLaunch) -> Result<Self, Refusal>
These values, stored as indices (Field::Index), read as the entries of table they
name: a plain one-dim buffer of at least an entry per index, read one value a line.
§Errors
The Refusal for values not stored as indices, or a table that is not a plain one-dim
buffer holding an entry for every index.
Sourcepub fn runtime_map(self, coefficients: Vec<u32>, offsets: Vec<i32>) -> Self
pub fn runtime_map(self, coefficients: Vec<u32>, offsets: Vec<i32>) -> Self
These values read through their projection’s runtime half: a value for each of its
dynamic coefficients and divisors (Scale::Dynamic, Divisor::Dynamic), physical axis
major, each axis’s divisor last, and for each of its dynamic offsets (Offset::Dynamic).
Only how many there are is checked, as the kernel expands.
Sourcepub fn scales(self, scale: TileArgLaunch) -> Self
pub fn scales(self, scale: TileArgLaunch) -> Self
These values under scale, outside the scales they carry already: words of block scales
where scale is a plain level holding u32, scales read as numbers otherwise.
Sourcepub fn indexed(
self,
table: TileArgLaunch,
indexing: Indexing,
) -> Result<Self, Refusal>
pub fn indexed( self, table: TileArgLaunch, indexing: Indexing, ) -> Result<Self, Refusal>
These values with their windows placed by table, whose dims are its keys, as indexing
says (Indexing). The scales they carry move with them wherever they span the placed
axis; state them first, so they are checked here.
A table keyed by the axis it places and one more, [sequence, position] placing the
sequence, reads these values as a pool of pages: the dim the sequence labels holds pages,
the one the position labels a page’s positions, and sequence b’s position s lies in page
table[b, s / page_size], page_size the pool’s extent along the position. The operand’s
extents along the two axes are the table’s, checked on every read. The table is read as
each window is cut, a window holding one page or two reading it once. The scales of a pool
spanning either axis are a pool of their own, placed by the same table before they are
stated.
§Errors
The Refusal for a table that is not plain u32 entries over one dim per key, or for
values, or a scale level spanning the placed axis, whose windows an entry cannot place.
Sourcepub fn indexed_covering(
self,
table: TileArgLaunch,
indexing: Indexing,
) -> Result<Self, Refusal>
pub fn indexed_covering( self, table: TileArgLaunch, indexing: Indexing, ) -> Result<Self, Refusal>
indexed, the table a pool of pages is read through stated to cover the
launch’s extents along both its axes, so a read the launch keeps in bounds is in bounds
through the table: the two axes are checked only where the launch overhangs, as a buffer
read where it lies is. A table that stops short reads its clamped entries there: other
positions of the pool, never past it.
§Errors
As indexed.
Source§impl TileArgLaunch
impl TileArgLaunch
Sourcepub fn tensor_map(
tensor_map: TensorMapArg<Tiled>,
axes: &[Axis],
shape: TmaBox,
) -> Self
pub fn tensor_map( tensor_map: TensorMapArg<Tiled>, axes: &[Axis], shape: TmaBox, ) -> Self
A TMA tensor map as a tile argument over axes: two, or three with shape.batch set.
Auto Trait Implementations§
impl !RefUnwindSafe for TileArgLaunch
impl !UnwindSafe for TileArgLaunch
impl Freeze for TileArgLaunch
impl Send for TileArgLaunch
impl Sync for TileArgLaunch
impl Unpin for TileArgLaunch
impl UnsafeUnpin for TileArgLaunch
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> 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