pub struct PagedDecodeTokenData {
pub token_ids: Arc<RwLock<Storage>>,
pub rope_cos: Arc<RwLock<Storage>>,
pub rope_sin: Arc<RwLock<Storage>>,
pub block_table: Arc<RwLock<Storage>>,
pub context_lens: Arc<RwLock<Storage>>,
pub offset: Option<Arc<RwLock<Storage>>>,
}Expand description
Per-token re-bound data Consts for one PAGED decode step — the paged twin
of DecodeTokenData. The shapes are stable across tokens (that is the
whole point of the plan-once path); only the bytes change, so each is an
Arc<RwLock<Storage>> overwriting the held PagedDecodeSession’s
base-cache entry for its stable NodeId.
Fields§
§token_ids: Arc<RwLock<Storage>>The single decode token id ([1] U32).
rope_cos: Arc<RwLock<Storage>>RoPE cos table at THIS token’s absolute position ([1, head_dim] F32).
rope_sin: Arc<RwLock<Storage>>RoPE sin table at THIS token’s absolute position ([1, head_dim] F32).
block_table: Arc<RwLock<Storage>>Capacity-padded block table ([1, max_blocks_cap] U32) — the shape is
FIXED by max_blocks_cap; the content grows a physical block whenever
this token crosses a block boundary (padded tail stays 0, masked out).
context_lens: Arc<RwLock<Storage>>Attended prefix length for this row ([1] U32) — the Op::PagedAttn
mask cutoff (Ge(pos, context_len) → −inf) that neutralizes both the
future positions AND the padded block_table tail.
offset: Option<Arc<RwLock<Storage>>>The flattened KV-write offset (linear = phys·block_size + slot as a
rank-0 I64), present ONLY on the device-offset path (CPU/CUDA, where
Op::WriteSliceDoff reads the start device-side). None on the SymEnv
path (Vulkan), where the offset rides write_sym in the per-pass env.
Auto Trait Implementations§
impl Freeze for PagedDecodeTokenData
impl RefUnwindSafe for PagedDecodeTokenData
impl Send for PagedDecodeTokenData
impl Sync for PagedDecodeTokenData
impl Unpin for PagedDecodeTokenData
impl UnsafeUnpin for PagedDecodeTokenData
impl UnwindSafe for PagedDecodeTokenData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more