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§
Source§impl DTypeUsage
impl DTypeUsage
Sourcepub fn general() -> EnumSet<DTypeUsage>
pub fn general() -> EnumSet<DTypeUsage>
Returns the usage set required for general-purpose tensor support.
Trait Implementations§
Source§impl<O> BitAnd<O> for DTypeUsage
impl<O> BitAnd<O> for DTypeUsage
Source§impl<O> BitOr<O> for DTypeUsage
impl<O> BitOr<O> for DTypeUsage
Source§impl<O> BitXor<O> for DTypeUsage
impl<O> BitXor<O> for DTypeUsage
Source§impl Clone for DTypeUsage
impl Clone for DTypeUsage
Source§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 moreSource§impl Debug for DTypeUsage
impl Debug for DTypeUsage
Source§impl Not for DTypeUsage
impl Not for DTypeUsage
Source§impl PartialEq<EnumSet<DTypeUsage>> for DTypeUsage
impl PartialEq<EnumSet<DTypeUsage>> for DTypeUsage
Source§impl PartialEq for DTypeUsage
impl PartialEq for DTypeUsage
Source§fn eq(&self, other: &DTypeUsage) -> bool
fn eq(&self, other: &DTypeUsage) -> bool
self and other values to be equal, and is used by ==.Source§impl<O> Sub<O> for DTypeUsage
impl<O> Sub<O> for DTypeUsage
impl Copy for DTypeUsage
impl EnumSetType for DTypeUsage
impl Eq for DTypeUsage
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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.