pub struct GlmVit {
pub out_hidden_size: usize,
/* private fields */
}Fields§
Implementations§
Source§impl GlmVit
impl GlmVit
Sourcepub fn forward_batched(
&self,
images: &[(&[f32], usize, usize)],
gpu: &dyn GpuBackend,
stream: u64,
) -> Result<Vec<(usize, usize, usize)>>
pub fn forward_batched( &self, images: &[(&[f32], usize, usize)], gpu: &dyn GpuBackend, stream: u64, ) -> Result<Vec<(usize, usize, usize)>>
2026-09-25: Encode images (pixels, grid h, grid w). Returns per-image
(post_h, post_w, merged_p) in image order, the VisionTower::forward_batched contract.
Images are encoded in greedy chunks whose Σpatches fits p_max, and
each chunk’s merged rows land after the previous chunk’s in buf_out.
Refuses a grid not divisible by the merge size, an image larger than
p_max, and a batch whose merged rows exceed buf_out.
Source§impl GlmVit
impl GlmVit
pub fn new( patch_embed_w: DevicePtr, patch_embed_b: DevicePtr, blocks: Vec<GlmVitBlock>, merger: GlmVitMerger, geo: &GlmVitGeometry, gpu: &dyn GpuBackend, ) -> Result<Self>
Auto Trait Implementations§
impl !Freeze for GlmVit
impl RefUnwindSafe for GlmVit
impl Send for GlmVit
impl Sync for GlmVit
impl Unpin for GlmVit
impl UnwindSafe for GlmVit
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