Skip to main content

ExecutionPlan

Struct ExecutionPlan 

Source
pub struct ExecutionPlan { /* private fields */ }
Expand description

A concrete, backend-neutral set of model/session execution choices.

Implementations§

Source§

impl ExecutionPlan

Source

pub fn fully_resident(device: DevicePlan) -> Self

Creates the minimal fully-resident, target-only plan for one device.

Source

pub const fn schema_version(&self) -> u32

Serialized schema version.

Source

pub const fn device(&self) -> &DevicePlan

Selected backend and device.

Source

pub const fn topology(&self) -> &ParallelTopology

Distributed topology.

Source

pub const fn residency(&self) -> &ResidencyPlan

Static weight placement.

Source

pub const fn weight_transformation(&self) -> WeightTransformationPlan

Load-time weight transformation.

Source

pub const fn max_cached_shards(&self) -> usize

Maximum simultaneously retained checkpoint readers.

Source

pub const fn expert_cache(&self) -> Option<&ExpertCachePlan>

Optional independent routed-parameter cache.

Source

pub const fn drafting(&self) -> &DraftingPlan

Speculative drafting selection.

Source

pub const fn required_device_capabilities(&self) -> &DeviceCapabilities

Required device capabilities.

Source

pub const fn required_session_capabilities(&self) -> &SessionCapabilities

Required prepared-session capabilities.

Source

pub fn with_topology(self, topology: ParallelTopology) -> Self

Replaces the distributed topology.

Source

pub fn with_device(self, device: DevicePlan) -> Self

Replaces the selected backend and device.

Source

pub fn with_residency(self, residency: ResidencyPlan) -> Self

Replaces static weight placement.

Source

pub fn with_weight_transformation( self, transformation: WeightTransformationPlan, ) -> Self

Replaces load-time weight transformation.

Source

pub fn with_max_cached_shards(self, maximum: usize) -> Self

Replaces the checkpoint reader bound.

Source

pub fn with_expert_cache(self, expert_cache: Option<ExpertCachePlan>) -> Self

Replaces the independent routed-parameter cache plan.

Source

pub fn with_drafting(self, drafting: DraftingPlan) -> Self

Replaces speculative drafting selection.

Source

pub fn with_required_device_capabilities( self, capabilities: DeviceCapabilities, ) -> Self

Replaces required device capabilities.

Source

pub fn with_required_session_capabilities( self, capabilities: SessionCapabilities, ) -> Self

Replaces required prepared-session capabilities.

Source

pub fn validate_device_capabilities( &self, available: &DeviceCapabilities, ) -> Result<(), ExecutionPlanError>

Validates portable plan invariants and fail-closed capabilities.

Source

pub fn validate_session_capabilities( &self, available: &SessionCapabilities, ) -> Result<(), ExecutionPlanError>

Validates exact prepared-session requirements independently.

Source

pub fn validate_structure(&self) -> Result<(), ExecutionPlanError>

Validates schema, topology, and portable resource invariants without a backend.

Trait Implementations§

Source§

impl Clone for ExecutionPlan

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutionPlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ExecutionPlan

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ExecutionPlan

Source§

impl PartialEq for ExecutionPlan

Source§

fn eq(&self, other: &ExecutionPlan) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ExecutionPlan

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ExecutionPlan

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.