pub struct Sam3CompiledEncoder {
pub compiled: CompiledGraph,
pub batch: usize,
pub hw: usize,
pub seq: usize,
pub d: usize,
}Expand description
Compiled encoder graph + uploaded parameters, ready for many runs.
Fields§
§compiled: CompiledGraph§batch: usize§hw: usize§seq: usize§d: usizeImplementations§
Source§impl Sam3CompiledEncoder
impl Sam3CompiledEncoder
pub fn new( weights: &Sam3EncoderWeights, batch: usize, hw: usize, seq: usize, device: Device, ) -> Result<Sam3CompiledEncoder, Error>
pub fn new_with_profile( weights: &Sam3EncoderWeights, batch: usize, hw: usize, seq: usize, device: Device, profile: &CompileProfile, ) -> Result<Sam3CompiledEncoder, Error>
pub fn new_with_profile_and_gguf( weights: &Sam3EncoderWeights, batch: usize, hw: usize, seq: usize, device: Device, profile: &CompileProfile, gguf_packed: Option<&GgufPackedParams>, ) -> Result<Sam3CompiledEncoder, Error>
pub fn run( &mut self, src_bchw: &[f32], src_pos_bchw: &[f32], prompt_seq_first: &[f32], prompt_kpm: &[u8], src_h: usize, src_w: usize, ) -> Result<Vec<f32>, Error>
Auto Trait Implementations§
impl !RefUnwindSafe for Sam3CompiledEncoder
impl !Sync for Sam3CompiledEncoder
impl !UnwindSafe for Sam3CompiledEncoder
impl Freeze for Sam3CompiledEncoder
impl Send for Sam3CompiledEncoder
impl Unpin for Sam3CompiledEncoder
impl UnsafeUnpin for Sam3CompiledEncoder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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