pub enum BackendTensor<B: Backend> {
Float(B::FloatTensorPrimitive),
Int(B::IntTensorPrimitive),
Bool(B::BoolTensorPrimitive),
Quantized(B::QuantizedTensorPrimitive),
}Expand description
Tensor which points to a backend tensor primitive kind.
Variants§
Float(B::FloatTensorPrimitive)
Float tensor handle.
Int(B::IntTensorPrimitive)
Int tensor handle.
Bool(B::BoolTensorPrimitive)
Bool tensor handle.
Quantized(B::QuantizedTensorPrimitive)
Quantized tensor handle.
Trait Implementations§
Source§impl<B: Clone + Backend> Clone for BackendTensor<B>where
B::FloatTensorPrimitive: Clone,
B::IntTensorPrimitive: Clone,
B::BoolTensorPrimitive: Clone,
B::QuantizedTensorPrimitive: Clone,
impl<B: Clone + Backend> Clone for BackendTensor<B>where
B::FloatTensorPrimitive: Clone,
B::IntTensorPrimitive: Clone,
B::BoolTensorPrimitive: Clone,
B::QuantizedTensorPrimitive: Clone,
Source§fn clone(&self) -> BackendTensor<B>
fn clone(&self) -> BackendTensor<B>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<B: Debug + Backend> Debug for BackendTensor<B>where
B::FloatTensorPrimitive: Debug,
B::IntTensorPrimitive: Debug,
B::BoolTensorPrimitive: Debug,
B::QuantizedTensorPrimitive: Debug,
impl<B: Debug + Backend> Debug for BackendTensor<B>where
B::FloatTensorPrimitive: Debug,
B::IntTensorPrimitive: Debug,
B::BoolTensorPrimitive: Debug,
B::QuantizedTensorPrimitive: Debug,
Source§impl<B: Backend> QTensorPrimitive for BackendTensor<B>
impl<B: Backend> QTensorPrimitive for BackendTensor<B>
Source§fn scheme(&self) -> &QuantScheme
fn scheme(&self) -> &QuantScheme
Returns the quantization settings for the given tensor.
Source§fn acc_precision(&self) -> QuantAcc
fn acc_precision(&self) -> QuantAcc
The precision used for the accumulation in various kernels.
Source§fn propagation(&self) -> QuantPropagation
fn propagation(&self) -> QuantPropagation
How quantization is propagated during computation.
Source§fn default_scheme() -> QuantScheme
fn default_scheme() -> QuantScheme
Returns the default tensor quantization scheme.
Auto Trait Implementations§
impl<B> Freeze for BackendTensor<B>where
<B as Backend>::FloatTensorPrimitive: Freeze,
<B as Backend>::IntTensorPrimitive: Freeze,
<B as Backend>::BoolTensorPrimitive: Freeze,
<B as Backend>::QuantizedTensorPrimitive: Freeze,
impl<B> RefUnwindSafe for BackendTensor<B>where
<B as Backend>::FloatTensorPrimitive: RefUnwindSafe,
<B as Backend>::IntTensorPrimitive: RefUnwindSafe,
<B as Backend>::BoolTensorPrimitive: RefUnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B> Send for BackendTensor<B>
impl<B> Sync for BackendTensor<B>
impl<B> Unpin for BackendTensor<B>where
<B as Backend>::FloatTensorPrimitive: Unpin,
<B as Backend>::IntTensorPrimitive: Unpin,
<B as Backend>::BoolTensorPrimitive: Unpin,
<B as Backend>::QuantizedTensorPrimitive: Unpin,
impl<B> UnsafeUnpin for BackendTensor<B>where
<B as Backend>::FloatTensorPrimitive: UnsafeUnpin,
<B as Backend>::IntTensorPrimitive: UnsafeUnpin,
<B as Backend>::BoolTensorPrimitive: UnsafeUnpin,
<B as Backend>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B> UnwindSafe for BackendTensor<B>where
<B as Backend>::FloatTensorPrimitive: UnwindSafe,
<B as Backend>::IntTensorPrimitive: UnwindSafe,
<B as Backend>::BoolTensorPrimitive: UnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: UnwindSafe,
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
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