pub enum DispatchTensorKind {
Flex(BackendTensor<Flex>),
}Expand description
Internal representation of a DispatchTensor.
This enum contains the concrete backend tensor for each enabled backend. It is not intended to be used directly; instead, it is manipulated by the dispatch system to route operations to the correct backend.
Each variant corresponds to a specific backend implementation.
Variants§
Flex(BackendTensor<Flex>)
Available on
default_backend or crate feature flex only.The Flex backend tensor.
Trait Implementations§
Source§impl Clone for DispatchTensorKind
impl Clone for DispatchTensorKind
Source§fn clone(&self) -> DispatchTensorKind
fn clone(&self) -> DispatchTensorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DispatchTensorKind
impl Debug for DispatchTensorKind
Source§impl TensorMetadata for DispatchTensorKind
impl TensorMetadata for DispatchTensorKind
Source§type Device = DispatchDevice
type Device = DispatchDevice
The device type associated with the tensor.
Source§fn device(&self) -> DispatchDevice
fn device(&self) -> DispatchDevice
Get the device associated with the tensor.
Source§fn can_mut(&self) -> bool
fn can_mut(&self) -> bool
Whether the tensor’s buffer can be mutated in place — i.e. this handle
uniquely owns it, so an in-place op (
slice_assign, an inplace kernel)
writes the existing allocation instead of copying it first. Read moreSource§fn scheme(&self) -> QuantScheme
fn scheme(&self) -> QuantScheme
Get the quantization scheme for a quantized float tensor. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for DispatchTensorKind
impl !UnwindSafe for DispatchTensorKind
impl Freeze for DispatchTensorKind
impl Send for DispatchTensorKind
impl Sync for DispatchTensorKind
impl Unpin for DispatchTensorKind
impl UnsafeUnpin for DispatchTensorKind
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> 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