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> Freeze for InputBinding<R>
impl<R> !RefUnwindSafe 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>
impl<R> !UnwindSafe 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