#[non_exhaustive]pub enum DynamicRangeMode {
Symmetric,
Asymmetric,
}Expand description
Symmetric vs asymmetric (offset) dynamic-range quantization.
Only DynamicRangeMode::Symmetric is wired in the 8.3
trailblazer; DynamicRangeMode::Asymmetric returns
Error::Unsupported and is reserved for a follow-up that wires
the dual max + min reduction + offset compute kernel.
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.
Symmetric
scale = max_abs / qmax, zero_point = 0.
Asymmetric
scale = (xmax - xmin) / (qmax - qmin),
zp = qmin - round(xmin / scale). Reserved.
Trait Implementations§
Source§impl Clone for DynamicRangeMode
impl Clone for DynamicRangeMode
Source§fn clone(&self) -> DynamicRangeMode
fn clone(&self) -> DynamicRangeMode
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 DynamicRangeMode
Source§impl Debug for DynamicRangeMode
impl Debug for DynamicRangeMode
impl Eq for DynamicRangeMode
Source§impl PartialEq for DynamicRangeMode
impl PartialEq for DynamicRangeMode
Source§fn eq(&self, other: &DynamicRangeMode) -> bool
fn eq(&self, other: &DynamicRangeMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DynamicRangeMode
Auto Trait Implementations§
impl Freeze for DynamicRangeMode
impl RefUnwindSafe for DynamicRangeMode
impl Send for DynamicRangeMode
impl Sync for DynamicRangeMode
impl Unpin for DynamicRangeMode
impl UnsafeUnpin for DynamicRangeMode
impl UnwindSafe for DynamicRangeMode
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