pub struct TileInputBuilder { /* private fields */ }Expand description
Implementations§
Source§impl TileInputBuilder
impl TileInputBuilder
Sourcepub fn split(self, counts: &[usize]) -> Self
pub fn split(self, counts: &[usize]) -> Self
Divide the current tile into counts[axis] sub-tiles per axis: a finer
level. Chain for recursion: .split(&[4, 4]).split(&[2, 2]).
Sourcepub fn tile(self, edges: &[usize]) -> Self
pub fn tile(self, edges: &[usize]) -> Self
Set the current tile to edges[axis] elements per axis: a finer level.
The dual of split (it divides the current edge down to
edges), so .tile(&[16, 16]).tile(&[8, 8]) ≡ .tile(&[16, 16]).split(&[2, 2]).
Sourcepub fn untiled(self) -> Self
pub fn untiled(self) -> Self
No sub-tiling: the buffer is the logical shape itself, row-major (zero tile levels: the view is the identity).
Sourcepub fn arange(self) -> TileInput
pub fn arange(self) -> TileInput
Arange 0, 1, 2, … written straight onto the physical buffer; the
tiled_view then presents it in logical coordinates.
Sourcepub fn uniform(self, seed: u64, lo: f32, hi: f32) -> TileInput
pub fn uniform(self, seed: u64, lo: f32, hi: f32) -> TileInput
Uniformly distributed random values in [lo, hi) range, seeded by seed.
Sourcepub fn packed(self, scheme: &QuantScheme) -> QuantizedTileInputBuilder
pub fn packed(self, scheme: &QuantScheme) -> QuantizedTileInputBuilder
Continue as a packed-u32 quantized input: a container step, like the tiling ones.
the tile will be declared in values (its shape and strides count them) while the
buffer holds the packed words, the binding convention the tile launch expects for a
packed operand. Content comes from the quantized builder’s own finalizer (e.g.
arange), which also mints the scales: a
quantized tensor is one thing (data + scales + scheme). Untiled only: packed storage
has no physically tiled layout.
The kernel meets the three as operands of their own (values_arg, scales_arg,
table_arg) and states the decode where it happens: w.lookup(&table).mul(&scales).
Auto Trait Implementations§
impl !RefUnwindSafe for TileInputBuilder
impl !UnwindSafe for TileInputBuilder
impl Freeze for TileInputBuilder
impl Send for TileInputBuilder
impl Sync for TileInputBuilder
impl Unpin for TileInputBuilder
impl UnsafeUnpin for TileInputBuilder
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