#[non_exhaustive]pub enum DynamicRangeScope {
Tensor,
Channel {
axis: i32,
},
Token,
Group {
axis: i32,
group_size: i32,
},
}Expand description
Per-tensor / per-channel / per-token / per-group granularity for the scale + zero_point computation.
Only DynamicRangeScope::Token is wired in the 8.3 trailblazer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Tensor
One (scale, zp) for the whole tensor. Reserved.
Channel
One (scale, zp) per slice along axis. Reserved.
Token
One (scale, zp) per token row (first axis of a [N, D]
tensor). Trailblazer scope.
Group
One (scale, zp) per group along axis. Reserved.
Trait Implementations§
Source§impl Clone for DynamicRangeScope
impl Clone for DynamicRangeScope
Source§fn clone(&self) -> DynamicRangeScope
fn clone(&self) -> DynamicRangeScope
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 moreimpl Copy for DynamicRangeScope
Source§impl Debug for DynamicRangeScope
impl Debug for DynamicRangeScope
impl Eq for DynamicRangeScope
Source§impl PartialEq for DynamicRangeScope
impl PartialEq for DynamicRangeScope
Source§fn eq(&self, other: &DynamicRangeScope) -> bool
fn eq(&self, other: &DynamicRangeScope) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DynamicRangeScope
Auto Trait Implementations§
impl Freeze for DynamicRangeScope
impl RefUnwindSafe for DynamicRangeScope
impl Send for DynamicRangeScope
impl Sync for DynamicRangeScope
impl Unpin for DynamicRangeScope
impl UnsafeUnpin for DynamicRangeScope
impl UnwindSafe for DynamicRangeScope
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