pub enum StateTensorDimension {
Batch,
PrefixTokens,
PrefixTokensDiv(NonZeroU32),
PrefixTokensRem(NonZeroU32),
Fixed(NonZeroU32),
Scalar,
}Expand description
One dimension in a persisted fixed-state tensor.
Variants§
Batch
Manifest batch size.
PrefixTokens
Exact prompt token count.
PrefixTokensDiv(NonZeroU32)
Quotient of prompt tokens and a positive divisor.
PrefixTokensRem(NonZeroU32)
Remainder of prompt tokens and a positive divisor.
Fixed(NonZeroU32)
Positive architecture-defined dimension.
Scalar
Scalar dimension list marker; valid only as the sole entry.
Implementations§
Source§impl StateTensorDimension
impl StateTensorDimension
Sourcepub fn fixed(value: i32) -> Result<Self, CachePolicyError>
pub fn fixed(value: i32) -> Result<Self, CachePolicyError>
Constructs a positive fixed dimension.
Trait Implementations§
Source§impl Clone for StateTensorDimension
impl Clone for StateTensorDimension
Source§fn clone(&self) -> StateTensorDimension
fn clone(&self) -> StateTensorDimension
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 StateTensorDimension
Source§impl Debug for StateTensorDimension
impl Debug for StateTensorDimension
Source§impl<'de> Deserialize<'de> for StateTensorDimension
impl<'de> Deserialize<'de> for StateTensorDimension
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StateTensorDimension
Source§impl Hash for StateTensorDimension
impl Hash for StateTensorDimension
Source§impl PartialEq for StateTensorDimension
impl PartialEq for StateTensorDimension
Source§impl Serialize for StateTensorDimension
impl Serialize for StateTensorDimension
impl StructuralPartialEq for StateTensorDimension
Auto Trait Implementations§
impl Freeze for StateTensorDimension
impl RefUnwindSafe for StateTensorDimension
impl Send for StateTensorDimension
impl Sync for StateTensorDimension
impl Unpin for StateTensorDimension
impl UnsafeUnpin for StateTensorDimension
impl UnwindSafe for StateTensorDimension
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