pub struct TileInput { /* private fields */ }Expand description
A tile-shaped test input: the device buffer plus the logical Space it’s
viewed in. The sub-tile sizes live in the buffer’s trailing dims, so the view
reads them from there.
Implementations§
Source§impl TileInput
impl TileInput
Sourcepub fn builder(client: &Client, space: Space) -> TileInputBuilder
pub fn builder(client: &Client, space: Space) -> TileInputBuilder
Sourcepub fn view(&self) -> TiledViewLaunch
pub fn view(&self) -> TiledViewLaunch
Launch arg for this tile’s view: the buffer seen in its logical space.
Every logical axis is tiled (num_tiled = space.rank()), recursively for
levels nested tile levels.
Sourcepub fn view_vectorized(&self, vector_size: usize) -> TiledViewLaunch
pub fn view_vectorized(&self, vector_size: usize) -> TiledViewLaunch
Launch arg for this tile’s view vectorized with line size vector_size
along the innermost (contiguous) axis. Same buffer; only the metadata is
reinterpreted in line units (innermost shape ÷ S, every other stride
÷ S), so a kernel reading Vector<E, S> lands on contiguous lines.
vector_size == 1 is exactly view.
Sourcepub fn tensor_arg(&self, vector_size: usize) -> TensorArg
pub fn tensor_arg(&self, vector_size: usize) -> TensorArg
Launch arg for this tile’s raw global buffer: a plain TensorArg over the
[grid…, tile…] buffer, optionally re-lined by vector_size along the inner
axis (so a kernel reading raw Vector<E, S> slices lands on contiguous lines).
vector_size == 1 is the plain buffer. For Tile::of pass the plain buffer:
the kernel’s element type carries the width and the metadata stays scalar-unit.
Sourcepub fn arg<E: Numeric, V: Size>(&self) -> TileArgLaunch<'static, E, V>
pub fn arg<E: Numeric, V: Size>(&self) -> TileArgLaunch<'static, E, V>
The tile as one launch argument: its scalar-unit tensor paired with its
spec. The kernel’s element type carries the width.
Sourcepub fn spec(&self) -> CubekTileSpec
pub fn spec(&self) -> CubekTileSpec
The comptime CubekTileSpec a kernel feeds Tile::of: the axes this tile spans
(its own space’s, in buffer order) paired with its derived storage.
Sourcepub fn handle(&self) -> TensorHandle
pub fn handle(&self) -> TensorHandle
The device handle, for reading an output back.
Auto Trait Implementations§
impl Freeze for TileInput
impl RefUnwindSafe for TileInput
impl Send for TileInput
impl Sync for TileInput
impl Unpin for TileInput
impl UnsafeUnpin for TileInput
impl UnwindSafe for TileInput
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