#[non_exhaustive]pub struct AttentionPlan {
pub kernel: AttentionKernel,
pub scratch_bytes: usize,
pub max_intermediate_bytes: usize,
pub capped: bool,
}Expand description
How an attention call runs and the memory it holds (see plan_attention).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kernel: AttentionKernelThe kernel family.
scratch_bytes: usizeBytes held beyond the inputs and the output while the call runs (for one block when
blocked; see the # Memory section of scaled_dot_product_attention).
max_intermediate_bytes: usizeThe largest single score-sized intermediate: what max_score_bytes bounds.
capped: boolWhether the cap changed the choice.
Trait Implementations§
Source§impl Clone for AttentionPlan
impl Clone for AttentionPlan
impl Copy for AttentionPlan
Source§impl Debug for AttentionPlan
impl Debug for AttentionPlan
impl Eq for AttentionPlan
Source§impl PartialEq for AttentionPlan
impl PartialEq for AttentionPlan
impl StructuralPartialEq for AttentionPlan
Auto Trait Implementations§
impl Freeze for AttentionPlan
impl RefUnwindSafe for AttentionPlan
impl Send for AttentionPlan
impl Sync for AttentionPlan
impl Unpin for AttentionPlan
impl UnsafeUnpin for AttentionPlan
impl UnwindSafe for AttentionPlan
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> Boilerplate for T
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<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