pub enum IntDtype {
Int8,
Int4,
}Expand description
Supported signed-integer quantization widths.
Variants§
Implementations§
Source§impl IntDtype
impl IntDtype
Sourcepub fn from_bits(bits: u32) -> Result<Self, GpuOptimError>
pub fn from_bits(bits: u32) -> Result<Self, GpuOptimError>
Construct an IntDtype from a bit-width, rejecting unsupported widths.
§Errors
Returns GpuOptimError::UnsupportedOperation for any width other than
4 or 8.
Sourcepub fn q_range(self, scheme: QuantScheme) -> (i32, i32)
pub fn q_range(self, scheme: QuantScheme) -> (i32, i32)
Integer clamp range [qmin, qmax] for this width under the given scheme.
Symmetric uses the restricted range (drops the most-negative code) so the grid is symmetric about zero; affine uses the full two’s-complement range.
Trait Implementations§
impl Copy for IntDtype
impl Eq for IntDtype
impl StructuralPartialEq for IntDtype
Auto Trait Implementations§
impl Freeze for IntDtype
impl RefUnwindSafe for IntDtype
impl Send for IntDtype
impl Sync for IntDtype
impl Unpin for IntDtype
impl UnsafeUnpin for IntDtype
impl UnwindSafe for IntDtype
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<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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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