Skip to main content

TileArgLaunch

Struct TileArgLaunch 

Source
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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts 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>

Converts 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)

Converts &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)

Converts &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
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoComptime for T

Source§

fn comptime(self) -> Self

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more