pub enum InputBinding<R: Runtime> {
Normal(TensorBinding<R>, StorageType),
Quantized {
data: TensorBinding<R>,
data_dtype: StorageType,
scale: TensorBinding<R>,
scale_dtype: StorageType,
shape: Shape,
scheme: QuantScheme,
},
}Variants§
Normal(TensorBinding<R>, StorageType)
Quantized
Fields
§
data: TensorBinding<R>§
data_dtype: StorageType§
scale: TensorBinding<R>§
scale_dtype: StorageType§
scheme: QuantSchemeImplementations§
Source§impl<R: Runtime> InputBinding<R>
impl<R: Runtime> InputBinding<R>
pub fn new(data: TensorBinding<R>, dtype: StorageType) -> Self
pub fn swap_dims(&mut self, dim0: usize, dim1: usize)
pub fn quantized( data: TensorBinding<R>, scale: TensorBinding<R>, shape: Shape, scheme: QuantScheme, data_dtype: StorageType, scale_dtype: StorageType, ) -> Self
pub fn data(&self) -> &TensorBinding<R>
pub fn data_elem_size(&self) -> usize
pub fn into_data(self) -> TensorBinding<R>
pub fn data_mut(&mut self) -> &mut TensorBinding<R>
pub fn scale(&self) -> Option<&TensorBinding<R>>
pub fn scheme(&self) -> Option<&QuantScheme>
pub fn shape(&self) -> &Shape
pub fn into_contiguous( self, client: &ComputeClient<R>, ) -> Result<Self, LaunchError>
pub fn required_address_type(&self) -> AddressType
Trait Implementations§
Source§impl<R: Runtime> Clone for InputBinding<R>
impl<R: Runtime> Clone for InputBinding<R>
Auto Trait Implementations§
impl<R> !RefUnwindSafe for InputBinding<R>
impl<R> !UnwindSafe for InputBinding<R>
impl<R> Freeze for InputBinding<R>
impl<R> Send for InputBinding<R>
impl<R> Sync for InputBinding<R>
impl<R> Unpin for InputBinding<R>where
R: Unpin,
impl<R> UnsafeUnpin for InputBinding<R>
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
Mutably borrows from an owned value. Read more
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> 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>
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 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>
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