pub struct CodecFrameFusedEngine { /* private fields */ }Expand description
Warmed codec-frame engine: host CP greedy + optional megagraph cache (parity/bench).
Implementations§
Source§impl CodecFrameFusedEngine
impl CodecFrameFusedEngine
pub fn open( store: &Qwen3TtsWeightStore, talker_cfg: &TalkerConfig, cp_cfg: &CodePredictorConfig, session_device: Device, ) -> Result<CodecFrameFusedEngine, Error>
pub fn open_at( model_dir: &Path, store: &Qwen3TtsWeightStore, talker_cfg: &TalkerConfig, cp_cfg: &CodePredictorConfig, session_device: Device, ) -> Result<CodecFrameFusedEngine, Error>
pub fn device(&self) -> Device
pub fn warmup( &mut self, talker: &TalkerEngine, horizon: usize, ) -> Result<(), Error>
Sourcepub fn predict_codec_groups(
&mut self,
talker_hidden: &[f32],
group0: u32,
pad: &[f32],
codec_emb: &mut [f32],
) -> Result<Vec<u32>, Error>
pub fn predict_codec_groups( &mut self, talker_hidden: &[f32], group0: u32, pad: &[f32], codec_emb: &mut [f32], ) -> Result<Vec<u32>, Error>
Host CP greedy (groups + summed codec embed); no talker decode.
Sourcepub fn run_codec_frame(
&mut self,
talker: &mut TalkerEngine,
talker_hidden: &[f32],
group0: u32,
pad: &[f32],
codec_emb: &mut [f32],
hidden_out: &mut [f32],
) -> Result<Vec<u32>, Error>
pub fn run_codec_frame( &mut self, talker: &mut TalkerEngine, talker_hidden: &[f32], group0: u32, pad: &[f32], codec_emb: &mut [f32], hidden_out: &mut [f32], ) -> Result<Vec<u32>, Error>
Production path: host CP greedy once, then compiled talker decode.
Sourcepub fn run_talk_decode(
&mut self,
talker: &mut TalkerEngine,
codec_emb: &[f32],
hidden_out: &mut [f32],
) -> Result<(), Error>
pub fn run_talk_decode( &mut self, talker: &mut TalkerEngine, codec_emb: &[f32], hidden_out: &mut [f32], ) -> Result<(), Error>
Talker decode via TalkerEngine bucketed cache (no duplicate graph build per frame).
Sourcepub fn run_full_megagraph(
&mut self,
talker: &mut TalkerEngine,
talker_hidden: &[f32],
codec_emb: &[f32],
step_embeds: &[Vec<f32>],
hidden_out: &mut [f32],
) -> Result<(), Error>
pub fn run_full_megagraph( &mut self, talker: &mut TalkerEngine, talker_hidden: &[f32], codec_emb: &[f32], step_embeds: &[Vec<f32>], hidden_out: &mut [f32], ) -> Result<(), Error>
Full megagraph (CP + talker); parity/bench only — duplicates CP vs Self::run_codec_frame.
Sourcepub fn set_cp_prefill_g0_embed(&mut self, g0_embed: &[f32])
pub fn set_cp_prefill_g0_embed(&mut self, g0_embed: &[f32])
Fill CP prefill row-1 with group-0 codec embed (megagraph feeds).
pub fn codec_embed_row( &self, group_idx: usize, token: u32, ) -> Result<Vec<f32>, Error>
pub fn cp_step_embeds_from_groups( &self, groups: &[u32], ) -> Result<Vec<Vec<f32>>, Error>
Auto Trait Implementations§
impl !RefUnwindSafe for CodecFrameFusedEngine
impl !Sync for CodecFrameFusedEngine
impl !UnwindSafe for CodecFrameFusedEngine
impl Freeze for CodecFrameFusedEngine
impl Send for CodecFrameFusedEngine
impl Unpin for CodecFrameFusedEngine
impl UnsafeUnpin for CodecFrameFusedEngine
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