pub enum BackendTensor<B: Backend> {
Float(FloatTensor<B>),
AdFloat(FloatTensor<Autodiff<B>>),
Int(IntTensor<B>),
AdInt(IntTensor<Autodiff<B>>),
Bool(BoolTensor<B>),
AdBool(BoolTensor<Autodiff<B>>),
Quantized(QuantizedTensor<B>),
AdQuantized(QuantizedTensor<Autodiff<B>>),
}Variants§
Float(FloatTensor<B>)
AdFloat(FloatTensor<Autodiff<B>>)
Int(IntTensor<B>)
AdInt(IntTensor<Autodiff<B>>)
Bool(BoolTensor<B>)
AdBool(BoolTensor<Autodiff<B>>)
Quantized(QuantizedTensor<B>)
AdQuantized(QuantizedTensor<Autodiff<B>>)
Implementations§
Source§impl<B: Backend> BackendTensor<B>
impl<B: Backend> BackendTensor<B>
pub fn context(&self) -> AutodiffContext
pub fn with_context(self, context: AutodiffContext) -> Self
pub fn device(&self) -> B::Device
Trait Implementations§
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.
Source§impl<B: Backend> TensorMetadata for BackendTensor<B>
impl<B: Backend> TensorMetadata for BackendTensor<B>
Auto Trait Implementations§
impl<B> !RefUnwindSafe for BackendTensor<B>
impl<B> !UnwindSafe for BackendTensor<B>
impl<B> Freeze for BackendTensor<B>where
<B as BackendTypes>::FloatTensorPrimitive: Freeze,
<Autodiff<B> as BackendTypes>::FloatTensorPrimitive: Freeze,
<B as BackendTypes>::IntTensorPrimitive: Freeze,
<Autodiff<B> as BackendTypes>::IntTensorPrimitive: Freeze,
<B as BackendTypes>::BoolTensorPrimitive: Freeze,
<Autodiff<B> as BackendTypes>::BoolTensorPrimitive: Freeze,
<B as BackendTypes>::QuantizedTensorPrimitive: Freeze,
<Autodiff<B> as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B> Send for BackendTensor<B>where
<B as BackendTypes>::FloatTensorPrimitive: Send,
<Autodiff<B> as BackendTypes>::FloatTensorPrimitive: Send,
<B as BackendTypes>::IntTensorPrimitive: Send,
<Autodiff<B> as BackendTypes>::IntTensorPrimitive: Send,
<B as BackendTypes>::BoolTensorPrimitive: Send,
<Autodiff<B> as BackendTypes>::BoolTensorPrimitive: Send,
<B as BackendTypes>::QuantizedTensorPrimitive: Send,
<Autodiff<B> as BackendTypes>::QuantizedTensorPrimitive: Send,
impl<B> Sync for BackendTensor<B>where
<B as BackendTypes>::FloatTensorPrimitive: Sync,
<Autodiff<B> as BackendTypes>::FloatTensorPrimitive: Sync,
<B as BackendTypes>::IntTensorPrimitive: Sync,
<Autodiff<B> as BackendTypes>::IntTensorPrimitive: Sync,
<B as BackendTypes>::BoolTensorPrimitive: Sync,
<Autodiff<B> as BackendTypes>::BoolTensorPrimitive: Sync,
<B as BackendTypes>::QuantizedTensorPrimitive: Sync,
<Autodiff<B> as BackendTypes>::QuantizedTensorPrimitive: Sync,
impl<B> Unpin for BackendTensor<B>where
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<Autodiff<B> as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::IntTensorPrimitive: Unpin,
<Autodiff<B> as BackendTypes>::IntTensorPrimitive: Unpin,
<B as BackendTypes>::BoolTensorPrimitive: Unpin,
<Autodiff<B> as BackendTypes>::BoolTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
<Autodiff<B> as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B> UnsafeUnpin for BackendTensor<B>where
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<Autodiff<B> as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::IntTensorPrimitive: UnsafeUnpin,
<Autodiff<B> as BackendTypes>::IntTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::BoolTensorPrimitive: UnsafeUnpin,
<Autodiff<B> as BackendTypes>::BoolTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
<Autodiff<B> as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
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