pub struct NormalizedLoadRequest { /* private fields */ }Expand description
One normalized backend-neutral request for cold model preparation.
Parallel rank, wire, and invocation fields are represented atomically. A concrete backend may pair this value with a separate native device or resource token, but must not add native identity to this request.
Implementations§
Source§impl NormalizedLoadRequest
impl NormalizedLoadRequest
Sourcepub fn from_execution_plan(
plan: &ExecutionPlan,
diagnostics: ResidencyDiagnostics,
parallel: Option<ParallelLoadRequest>,
) -> Result<Self, ExecutionPlanLoadError>
pub fn from_execution_plan( plan: &ExecutionPlan, diagnostics: ResidencyDiagnostics, parallel: Option<ParallelLoadRequest>, ) -> Result<Self, ExecutionPlanLoadError>
Derives all portable load policy from a plan and optional complete rank request.
Distributed plans supply their exact rank, wire, invocation limits and completion policy explicitly because an execution plan does not contain those values. Native device identity and realized resources never enter this conversion.
Source§impl NormalizedLoadRequest
impl NormalizedLoadRequest
Sourcepub const fn with_prompt_cache_persistence(self, required: bool) -> Self
pub const fn with_prompt_cache_persistence(self, required: bool) -> Self
Requires persisted prompt-prefix import/export independently of state residency.
Sourcepub const fn prompt_cache_persistence(&self) -> bool
pub const fn prompt_cache_persistence(&self) -> bool
Returns explicit persisted prompt-prefix import/export intent.
Sourcepub const fn with_max_cached_shards(self, maximum: NonZeroUsize) -> Self
pub const fn with_max_cached_shards(self, maximum: NonZeroUsize) -> Self
Selects the exact reader-cache limit, including fully resident execution.
Sourcepub const fn max_cached_shards(&self) -> usize
pub const fn max_cached_shards(&self) -> usize
Returns the source reader-cache bound retained by cold selection.
Sourcepub fn with_quantization(quantization: QuantizationRequest) -> Self
pub fn with_quantization(quantization: QuantizationRequest) -> Self
Creates a request that quantizes eligible dense weights on load.
Sourcepub fn with_parallel_execution(
self,
parallel: ParallelLoadRequest,
) -> Result<Self, NormalizedLoadRequestError>
pub fn with_parallel_execution( self, parallel: ParallelLoadRequest, ) -> Result<Self, NormalizedLoadRequestError>
Attaches one complete portable parallel-execution request.
Sourcepub const fn with_communication_completion_policy(
self,
policy: CommunicationCompletionPolicy,
) -> Self
pub const fn with_communication_completion_policy( self, policy: CommunicationCompletionPolicy, ) -> Self
Selects the bounded completion policy used by communication or local realtime work.
Sourcepub const fn set_communication_completion_policy(
&mut self,
policy: CommunicationCompletionPolicy,
)
pub const fn set_communication_completion_policy( &mut self, policy: CommunicationCompletionPolicy, )
Replaces the bounded completion policy without changing another request field.
Sourcepub fn with_weight_residency(self, residency: WeightResidency) -> Self
pub fn with_weight_residency(self, residency: WeightResidency) -> Self
Selects fully resident or bounded checkpoint-weight execution.
Sourcepub fn with_state_residency(self, residency: CacheResidencyPolicy) -> Self
pub fn with_state_residency(self, residency: CacheResidencyPolicy) -> Self
Selects mutable-state residency and paging controls.
Sourcepub const fn with_required_session_capabilities(
self,
capabilities: SessionCapabilities,
) -> Self
pub const fn with_required_session_capabilities( self, capabilities: SessionCapabilities, ) -> Self
Requires capabilities from the exact inspected and realized session.
Sourcepub const fn with_drafting(self, drafting: DraftingLoadRequest) -> Self
pub const fn with_drafting(self, drafting: DraftingLoadRequest) -> Self
Selects portable drafting intent.
Sourcepub fn with_drafting_plan(
self,
plan: &DraftingPlan,
) -> Result<Self, NormalizedLoadRequestError>
pub fn with_drafting_plan( self, plan: &DraftingPlan, ) -> Result<Self, NormalizedLoadRequestError>
Applies a portable execution plan’s drafting mode before payload selection.
Sourcepub const fn quantization(&self) -> Option<QuantizationRequest>
pub const fn quantization(&self) -> Option<QuantizationRequest>
Returns the requested dense-weight transformation.
Sourcepub const fn parallel_execution(&self) -> Option<ParallelLoadRequest>
pub const fn parallel_execution(&self) -> Option<ParallelLoadRequest>
Returns the complete portable parallel request.
Sourcepub const fn parallel_topology(&self) -> Option<ParallelRankTopology>
pub const fn parallel_topology(&self) -> Option<ParallelRankTopology>
Returns the selected portable rank, when parallel execution was attached.
Sourcepub const fn pipeline_wire_contract(&self) -> Option<PipelineWireContract>
pub const fn pipeline_wire_contract(&self) -> Option<PipelineWireContract>
Returns the activation wire contract for parallel execution.
Sourcepub const fn has_parallel_execution(&self) -> bool
pub const fn has_parallel_execution(&self) -> bool
Reports whether a portable parallel execution request is attached.
Sourcepub fn partitioned_invocation_limits(&self) -> Option<(i32, i32)>
pub fn partitioned_invocation_limits(&self) -> Option<(i32, i32)>
Returns invocation limits already validated by parallel construction.
Sourcepub fn communication_completion_policy(
&self,
) -> Result<Option<CommunicationCompletionPolicy>, NormalizedLoadRequestError>
pub fn communication_completion_policy( &self, ) -> Result<Option<CommunicationCompletionPolicy>, NormalizedLoadRequestError>
Returns bounded communication completion for model preparation.
Sourcepub fn realtime_completion_policy(
&self,
) -> Result<CommunicationCompletionPolicy, NormalizedLoadRequestError>
pub fn realtime_completion_policy( &self, ) -> Result<CommunicationCompletionPolicy, NormalizedLoadRequestError>
Returns completion policy for realtime work, including local async evaluation.
Sourcepub const fn weight_residency(&self) -> WeightResidency
pub const fn weight_residency(&self) -> WeightResidency
Returns selected immutable-weight residency.
Sourcepub const fn state_residency(&self) -> &CacheResidencyPolicy
pub const fn state_residency(&self) -> &CacheResidencyPolicy
Returns selected mutable-state residency.
Sourcepub const fn required_session_capabilities(&self) -> SessionCapabilities
pub const fn required_session_capabilities(&self) -> SessionCapabilities
Returns capabilities required from the realized session.
Sourcepub const fn drafting(&self) -> DraftingLoadRequest
pub const fn drafting(&self) -> DraftingLoadRequest
Returns the selected pre-payload drafting intent.
Sourcepub fn weight_quantization(
&self,
) -> Result<Option<WeightQuantization>, NormalizedLoadRequestError>
pub fn weight_quantization( &self, ) -> Result<Option<WeightQuantization>, NormalizedLoadRequestError>
Converts the requested transformation to the checkpoint lowering vocabulary.
Sourcepub fn validate_model_preparation(
&self,
) -> Result<ValidatedModelLoadRequest<'_>, NormalizedLoadRequestError>
pub fn validate_model_preparation( &self, ) -> Result<ValidatedModelLoadRequest<'_>, NormalizedLoadRequestError>
Validates the complete ordinary model-preparation request.
Sourcepub fn preparation_policy(
&self,
) -> Result<PreparationPolicy, NormalizedLoadRequestError>
pub fn preparation_policy( &self, ) -> Result<PreparationPolicy, NormalizedLoadRequestError>
Converts this normalized request into core’s portable preparation policy.
Trait Implementations§
Source§impl Clone for NormalizedLoadRequest
impl Clone for NormalizedLoadRequest
Source§fn clone(&self) -> NormalizedLoadRequest
fn clone(&self) -> NormalizedLoadRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more