pub struct GraphDecodeState {
pub token_d: CudaSlice<u32>,
pub pos_d: CudaSlice<i32>,
pub graphs: HashMap<(bool, usize), CudaGraph>,
pub bucket_max: HashMap<(bool, usize), usize>,
pub captures: usize,
}Expand description
Persistent CUDA-graph decode state (CUDA-GRAPH-PLAN Phase 3). Holds the device-resident counters
the captured graph reads/writes (token_d = current/next token id, pos_d = rope position) — both
at FIXED addresses baked into every captured graph — plus the per-t_kv-bucket graph cache. The
bucket key is the eager (fa_vec, n_splits) pair (see Engine::fa_bucket_key): every t_kv that
maps to the same key reproduces eager’s split geometry, so one captured graph replays bit-identically
for the whole bucket. A new key triggers a re-capture (n_splits changes ~every 64 tokens).
Fields§
§token_d: CudaSlice<u32>§pos_d: CudaSlice<i32>§graphs: HashMap<(bool, usize), CudaGraph>§bucket_max: HashMap<(bool, usize), usize>§captures: usizeImplementations§
Auto Trait Implementations§
impl !Send for GraphDecodeState
impl !Sync for GraphDecodeState
impl Freeze for GraphDecodeState
impl RefUnwindSafe for GraphDecodeState
impl Unpin for GraphDecodeState
impl UnsafeUnpin for GraphDecodeState
impl UnwindSafe for GraphDecodeState
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
Mutably borrows from an owned value. Read more