pub struct ExecutionPlan {
pub family: DecoderFamily,
pub rope: RopeLayout,
pub qk_norm: QkNormStyle,
pub ffn_activation: FfnActivation,
pub memory: MemoryPlan,
pub fused: FusedOpCaps,
pub embedding_scale: Option<f32>,
pub attention_scale: Option<f32>,
pub rope_theta_swa: Option<f32>,
pub attn_logit_softcap: Option<f32>,
pub final_logit_softcap: Option<f32>,
}Expand description
Per-model execution plan: everything the forward path needs that is constant across tokens.
Fields§
§family: DecoderFamily§rope: RopeLayout§qk_norm: QkNormStyle§ffn_activation: FfnActivation§memory: MemoryPlan§fused: FusedOpCaps§embedding_scale: Option<f32>§attention_scale: Option<f32>§rope_theta_swa: Option<f32>§attn_logit_softcap: Option<f32>§final_logit_softcap: Option<f32>Implementations§
Source§impl ExecutionPlan
impl ExecutionPlan
Sourcepub fn from_config(
config: &ModelConfig,
family: DecoderFamily,
memory_kind: MemoryKind,
fused: FusedOpCaps,
) -> Self
pub fn from_config( config: &ModelConfig, family: DecoderFamily, memory_kind: MemoryKind, fused: FusedOpCaps, ) -> Self
Build from a resolved crate::config::ModelConfig + profile.
Sourcepub fn caps_for_geometry(
&self,
cache: &mut HashMap<PlanGeometry, FusedOpCaps>,
geom: PlanGeometry,
) -> FusedOpCaps
pub fn caps_for_geometry( &self, cache: &mut HashMap<PlanGeometry, FusedOpCaps>, geom: PlanGeometry, ) -> FusedOpCaps
Look up or insert fused-op caps for a decode/prefill geometry.
Sourcepub fn probe_metal_caps() -> FusedOpCaps
pub fn probe_metal_caps() -> FusedOpCaps
Probe Metal fused-op availability without changing the Llama default path. Returns conservative caps when Metal is off.
Trait Implementations§
Source§impl Clone for ExecutionPlan
impl Clone for ExecutionPlan
Source§fn clone(&self) -> ExecutionPlan
fn clone(&self) -> ExecutionPlan
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 moreSource§impl Debug for ExecutionPlan
impl Debug for ExecutionPlan
Source§impl PartialEq for ExecutionPlan
impl PartialEq for ExecutionPlan
impl StructuralPartialEq for ExecutionPlan
Auto Trait Implementations§
impl Freeze for ExecutionPlan
impl RefUnwindSafe for ExecutionPlan
impl Send for ExecutionPlan
impl Sync for ExecutionPlan
impl Unpin for ExecutionPlan
impl UnsafeUnpin for ExecutionPlan
impl UnwindSafe for ExecutionPlan
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
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