Enum DTypeUsage
pub enum DTypeUsage {
Storage,
Arithmetic,
Accelerated,
}Expand description
Describes how a data type can be used on a given device.
A data type may be supported for different classes of operations. Not all data types that appear in hardware or kernel implementations are suitable for general-purpose tensor operations.
Variants§
Storage
The type can be stored in device memory and converted to and from other supported data types.
Arithmetic
The type supports general-purpose arithmetic and common tensor operations (e.g. elementwise ops, reductions, etc.).
Accelerated
The type is supported by hardware-accelerated execution paths.
This typically indicates support for accelerator-backed compute units (e.g., tensor cores executing MMA instructions) for high-performance operations such as matrix multiplication and operations that lower to it.
§Notes
- A type can be both
ArithmeticandAcceleratedif it supports general-purpose operations and accelerated paths. - If a type is marked as
Acceleratedbut notArithmetic, it is not suitable for general-purpose tensor operations and may only be used in specific accelerated operations.
Accelerated is a flag, not a detailed descriptor. It does not enumerate which
operations are accelerated or which accelerator features are available.
Implementations§
§impl DTypeUsage
impl DTypeUsage
pub fn general() -> EnumSet<DTypeUsage>
pub fn general() -> EnumSet<DTypeUsage>
Returns the usage set required for general-purpose tensor support.
Trait Implementations§
§impl<O> BitAnd<O> for DTypeUsagewhere
O: Into<EnumSet<DTypeUsage>>,
impl<O> BitAnd<O> for DTypeUsagewhere
O: Into<EnumSet<DTypeUsage>>,
§type Output = EnumSet<DTypeUsage>
type Output = EnumSet<DTypeUsage>
& operator.§impl<O> BitOr<O> for DTypeUsagewhere
O: Into<EnumSet<DTypeUsage>>,
impl<O> BitOr<O> for DTypeUsagewhere
O: Into<EnumSet<DTypeUsage>>,
§type Output = EnumSet<DTypeUsage>
type Output = EnumSet<DTypeUsage>
| operator.§impl<O> BitXor<O> for DTypeUsagewhere
O: Into<EnumSet<DTypeUsage>>,
impl<O> BitXor<O> for DTypeUsagewhere
O: Into<EnumSet<DTypeUsage>>,
§type Output = EnumSet<DTypeUsage>
type Output = EnumSet<DTypeUsage>
^ operator.§impl Clone for DTypeUsage
impl Clone for DTypeUsage
§fn clone(&self) -> DTypeUsage
fn clone(&self) -> DTypeUsage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DTypeUsage
§impl Debug for DTypeUsage
impl Debug for DTypeUsage
impl EnumSetType for DTypeUsage
impl Eq for DTypeUsage
§impl Not for DTypeUsage
impl Not for DTypeUsage
§type Output = EnumSet<DTypeUsage>
type Output = EnumSet<DTypeUsage>
! operator.§impl PartialEq for DTypeUsage
impl PartialEq for DTypeUsage
§impl PartialEq<EnumSet<DTypeUsage>> for DTypeUsage
impl PartialEq<EnumSet<DTypeUsage>> for DTypeUsage
§fn eq(&self, other: &EnumSet<DTypeUsage>) -> bool
fn eq(&self, other: &EnumSet<DTypeUsage>) -> bool
self and other values to be equal, and is used by ==.§impl<O> Sub<O> for DTypeUsagewhere
O: Into<EnumSet<DTypeUsage>>,
impl<O> Sub<O> for DTypeUsagewhere
O: Into<EnumSet<DTypeUsage>>,
§type Output = EnumSet<DTypeUsage>
type Output = EnumSet<DTypeUsage>
- operator.Auto Trait Implementations§
impl Freeze for DTypeUsage
impl RefUnwindSafe for DTypeUsage
impl Send for DTypeUsage
impl Sync for DTypeUsage
impl Unpin for DTypeUsage
impl UnsafeUnpin for DTypeUsage
impl UnwindSafe for DTypeUsage
Blanket Implementations§
impl<T> Boilerplate for T
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
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,
§impl<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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