Skip to main content

ExecutorPrefillAdmission

Struct ExecutorPrefillAdmission 

Source
pub struct ExecutorPrefillAdmission<'a> {
    pub request_id: &'a RequestId,
    pub input_tokens: &'a [TokenId],
    pub maximum_sequence_tokens: usize,
    pub product_prompt_tokens: usize,
    pub replayed_output_tokens: usize,
    pub request_origin: ExecutorRequestOrigin,
}
Expand description

Borrowed, already-tokenized input used to probe plan-runtime prefill admission before the request can enter a device submission batch.

This carries semantic token identity rather than an aggregate token count: vNext derives the exact resource work shape and its fingerprint from this boundary. The request remains owned by the scheduler while the executor retains any admitted authority internally until ModelExecutor::prefill consumes it or cancellation releases it.

Fields§

§request_id: &'a RequestId§input_tokens: &'a [TokenId]§maximum_sequence_tokens: usize§product_prompt_tokens: usize

Prompt tokens reported in the final product usage.

§replayed_output_tokens: usize

Already-committed output tokens replayed as part of a recompute input.

§request_origin: ExecutorRequestOrigin

Implementations§

Source§

impl<'a> ExecutorPrefillAdmission<'a>

Source

pub const fn for_startup( request_id: &'a RequestId, input_tokens: &'a [TokenId], maximum_sequence_tokens: usize, ) -> Self

Source

pub const fn for_diagnostic( request_id: &'a RequestId, input_tokens: &'a [TokenId], maximum_sequence_tokens: usize, ) -> Self

Source

pub fn for_product_request( request_id: &'a RequestId, input_tokens: &'a [TokenId], maximum_sequence_tokens: usize, product_prompt_tokens: usize, replayed_output_tokens: usize, ) -> Result<Self>

Construct admission for a product request whose execution context may include output tokens replayed after preemption.

Source

pub fn validate(&self) -> Result<()>

Trait Implementations§

Source§

impl<'a> Clone for ExecutorPrefillAdmission<'a>

Source§

fn clone(&self) -> ExecutorPrefillAdmission<'a>

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<'a> Copy for ExecutorPrefillAdmission<'a>

Source§

impl<'a> Debug for ExecutorPrefillAdmission<'a>

Source§

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

Formats the value using the given formatter. Read more

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<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> 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V