Skip to main content

NormalizedLoadRequest

Struct NormalizedLoadRequest 

Source
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

Source

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

Source

pub const fn with_prompt_cache_persistence(self, required: bool) -> Self

Requires persisted prompt-prefix import/export independently of state residency.

Source

pub const fn prompt_cache_persistence(&self) -> bool

Returns explicit persisted prompt-prefix import/export intent.

Source

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

Selects the exact reader-cache limit, including fully resident execution.

Source

pub const fn max_cached_shards(&self) -> usize

Returns the source reader-cache bound retained by cold selection.

Source

pub fn with_quantization(quantization: QuantizationRequest) -> Self

Creates a request that quantizes eligible dense weights on load.

Source

pub fn with_parallel_execution( self, parallel: ParallelLoadRequest, ) -> Result<Self, NormalizedLoadRequestError>

Attaches one complete portable parallel-execution request.

Source

pub const fn with_communication_completion_policy( self, policy: CommunicationCompletionPolicy, ) -> Self

Selects the bounded completion policy used by communication or local realtime work.

Source

pub const fn set_communication_completion_policy( &mut self, policy: CommunicationCompletionPolicy, )

Replaces the bounded completion policy without changing another request field.

Source

pub fn with_weight_residency(self, residency: WeightResidency) -> Self

Selects fully resident or bounded checkpoint-weight execution.

Source

pub fn with_state_residency(self, residency: CacheResidencyPolicy) -> Self

Selects mutable-state residency and paging controls.

Source

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

Requires capabilities from the exact inspected and realized session.

Source

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

Selects portable drafting intent.

Source

pub fn with_drafting_plan( self, plan: &DraftingPlan, ) -> Result<Self, NormalizedLoadRequestError>

Applies a portable execution plan’s drafting mode before payload selection.

Source

pub const fn quantization(&self) -> Option<QuantizationRequest>

Returns the requested dense-weight transformation.

Source

pub const fn parallel_execution(&self) -> Option<ParallelLoadRequest>

Returns the complete portable parallel request.

Source

pub const fn parallel_topology(&self) -> Option<ParallelRankTopology>

Returns the selected portable rank, when parallel execution was attached.

Source

pub const fn pipeline_wire_contract(&self) -> Option<PipelineWireContract>

Returns the activation wire contract for parallel execution.

Source

pub const fn has_parallel_execution(&self) -> bool

Reports whether a portable parallel execution request is attached.

Source

pub fn partitioned_invocation_limits(&self) -> Option<(i32, i32)>

Returns invocation limits already validated by parallel construction.

Source

pub fn communication_completion_policy( &self, ) -> Result<Option<CommunicationCompletionPolicy>, NormalizedLoadRequestError>

Returns bounded communication completion for model preparation.

Source

pub fn realtime_completion_policy( &self, ) -> Result<CommunicationCompletionPolicy, NormalizedLoadRequestError>

Returns completion policy for realtime work, including local async evaluation.

Source

pub const fn weight_residency(&self) -> WeightResidency

Returns selected immutable-weight residency.

Source

pub const fn state_residency(&self) -> &CacheResidencyPolicy

Returns selected mutable-state residency.

Source

pub const fn required_session_capabilities(&self) -> SessionCapabilities

Returns capabilities required from the realized session.

Source

pub const fn drafting(&self) -> DraftingLoadRequest

Returns the selected pre-payload drafting intent.

Source

pub fn weight_quantization( &self, ) -> Result<Option<WeightQuantization>, NormalizedLoadRequestError>

Converts the requested transformation to the checkpoint lowering vocabulary.

Source

pub fn validate_model_preparation( &self, ) -> Result<ValidatedModelLoadRequest<'_>, NormalizedLoadRequestError>

Validates the complete ordinary model-preparation request.

Source

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

Source§

fn clone(&self) -> NormalizedLoadRequest

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 NormalizedLoadRequest

Source§

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

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

impl Default for NormalizedLoadRequest

Source§

fn default() -> NormalizedLoadRequest

Returns the “default value” for a type. Read more
Source§

impl Eq for NormalizedLoadRequest

Source§

impl PartialEq for NormalizedLoadRequest

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NormalizedLoadRequest

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> 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, !>

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.