pub struct VisionScratch {Show 16 fields
pub buf_f32: DevicePtr,
pub buf_h1: DevicePtr,
pub buf_h2: DevicePtr,
pub buf_wide: DevicePtr,
pub buf_merge_in: DevicePtr,
pub buf_merge_fc1: DevicePtr,
pub buf_out: DevicePtr,
pub buf_pos_resampled: DevicePtr,
pub buf_rope_cos: DevicePtr,
pub buf_rope_sin: DevicePtr,
pub buf_qr: DevicePtr,
pub buf_kr: DevicePtr,
pub buf_vt: DevicePtr,
pub buf_scores: DevicePtr,
pub buf_probs: DevicePtr,
pub buf_o_stage: DevicePtr,
}Expand description
The ViT’s per-image scratch buffers, allocated as one group.
Sizes derive only from the encoder’s geometry (p_max and the head/hidden
dims), so nothing here depends on the image itself — which is why it can be
built once, lazily, and reused for every image after.
Fields§
§buf_f32: DevicePtr§buf_h1: DevicePtr§buf_h2: DevicePtr§buf_wide: DevicePtr§buf_merge_in: DevicePtr§buf_merge_fc1: DevicePtr§buf_out: DevicePtr§buf_pos_resampled: DevicePtr§buf_rope_cos: DevicePtr§buf_rope_sin: DevicePtr§buf_qr: DevicePtr§buf_kr: DevicePtr§buf_vt: DevicePtr§buf_scores: DevicePtr§buf_probs: DevicePtr§buf_o_stage: DevicePtrAuto Trait Implementations§
impl Freeze for VisionScratch
impl RefUnwindSafe for VisionScratch
impl Send for VisionScratch
impl Sync for VisionScratch
impl Unpin for VisionScratch
impl UnwindSafe for VisionScratch
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