pub struct ExecutionPlan { /* private fields */ }Expand description
A concrete, backend-neutral set of model/session execution choices.
Implementations§
Source§impl ExecutionPlan
impl ExecutionPlan
Sourcepub fn fully_resident(device: DevicePlan) -> Self
pub fn fully_resident(device: DevicePlan) -> Self
Creates the minimal fully-resident, target-only plan for one device.
Sourcepub const fn schema_version(&self) -> u32
pub const fn schema_version(&self) -> u32
Serialized schema version.
Sourcepub const fn device(&self) -> &DevicePlan
pub const fn device(&self) -> &DevicePlan
Selected backend and device.
Sourcepub const fn topology(&self) -> &ParallelTopology
pub const fn topology(&self) -> &ParallelTopology
Distributed topology.
Sourcepub const fn residency(&self) -> &ResidencyPlan
pub const fn residency(&self) -> &ResidencyPlan
Static weight placement.
Sourcepub const fn weight_transformation(&self) -> WeightTransformationPlan
pub const fn weight_transformation(&self) -> WeightTransformationPlan
Load-time weight transformation.
Sourcepub const fn max_cached_shards(&self) -> usize
pub const fn max_cached_shards(&self) -> usize
Maximum simultaneously retained checkpoint readers.
Sourcepub const fn expert_cache(&self) -> Option<&ExpertCachePlan>
pub const fn expert_cache(&self) -> Option<&ExpertCachePlan>
Optional independent routed-parameter cache.
Sourcepub const fn drafting(&self) -> &DraftingPlan
pub const fn drafting(&self) -> &DraftingPlan
Speculative drafting selection.
Sourcepub const fn required_device_capabilities(&self) -> &DeviceCapabilities
pub const fn required_device_capabilities(&self) -> &DeviceCapabilities
Required device capabilities.
Sourcepub const fn required_session_capabilities(&self) -> &SessionCapabilities
pub const fn required_session_capabilities(&self) -> &SessionCapabilities
Required prepared-session capabilities.
Sourcepub fn with_topology(self, topology: ParallelTopology) -> Self
pub fn with_topology(self, topology: ParallelTopology) -> Self
Replaces the distributed topology.
Sourcepub fn with_device(self, device: DevicePlan) -> Self
pub fn with_device(self, device: DevicePlan) -> Self
Replaces the selected backend and device.
Sourcepub fn with_residency(self, residency: ResidencyPlan) -> Self
pub fn with_residency(self, residency: ResidencyPlan) -> Self
Replaces static weight placement.
Sourcepub fn with_weight_transformation(
self,
transformation: WeightTransformationPlan,
) -> Self
pub fn with_weight_transformation( self, transformation: WeightTransformationPlan, ) -> Self
Replaces load-time weight transformation.
Sourcepub fn with_max_cached_shards(self, maximum: usize) -> Self
pub fn with_max_cached_shards(self, maximum: usize) -> Self
Replaces the checkpoint reader bound.
Sourcepub fn with_expert_cache(self, expert_cache: Option<ExpertCachePlan>) -> Self
pub fn with_expert_cache(self, expert_cache: Option<ExpertCachePlan>) -> Self
Replaces the independent routed-parameter cache plan.
Sourcepub fn with_drafting(self, drafting: DraftingPlan) -> Self
pub fn with_drafting(self, drafting: DraftingPlan) -> Self
Replaces speculative drafting selection.
Sourcepub fn with_required_device_capabilities(
self,
capabilities: DeviceCapabilities,
) -> Self
pub fn with_required_device_capabilities( self, capabilities: DeviceCapabilities, ) -> Self
Replaces required device capabilities.
Sourcepub fn with_required_session_capabilities(
self,
capabilities: SessionCapabilities,
) -> Self
pub fn with_required_session_capabilities( self, capabilities: SessionCapabilities, ) -> Self
Replaces required prepared-session capabilities.
Sourcepub fn validate_device_capabilities(
&self,
available: &DeviceCapabilities,
) -> Result<(), ExecutionPlanError>
pub fn validate_device_capabilities( &self, available: &DeviceCapabilities, ) -> Result<(), ExecutionPlanError>
Validates portable plan invariants and fail-closed capabilities.
Sourcepub fn validate_session_capabilities(
&self,
available: &SessionCapabilities,
) -> Result<(), ExecutionPlanError>
pub fn validate_session_capabilities( &self, available: &SessionCapabilities, ) -> Result<(), ExecutionPlanError>
Validates exact prepared-session requirements independently.
Sourcepub fn validate_structure(&self) -> Result<(), ExecutionPlanError>
pub fn validate_structure(&self) -> Result<(), ExecutionPlanError>
Validates schema, topology, and portable resource invariants without a backend.
Trait Implementations§
Source§impl Clone for ExecutionPlan
impl Clone for ExecutionPlan
Source§fn clone(&self) -> ExecutionPlan
fn clone(&self) -> ExecutionPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more