pub struct EngineFactory { /* private fields */ }Expand description
Constructs engines with one process-local timing provider.
The serializable engine configuration contains only a provider descriptor. A Runner resolves external timing providers before constructing this factory, which then shares the provider across all attention-DP ranks.
Implementations§
Source§impl EngineFactory
impl EngineFactory
Sourcepub fn new(config: EngineConfig) -> Result<Self>
pub fn new(config: EngineConfig) -> Result<Self>
Construct a factory for a built-in timing model.
Sourcepub fn with_timing_model(
config: EngineConfig,
timing: Arc<dyn TimingModel>,
) -> Result<Self>
pub fn with_timing_model( config: EngineConfig, timing: Arc<dyn TimingModel>, ) -> Result<Self>
Construct a factory with a process-local timing provider.
Sourcepub fn build_rank(&self, identity: RankIdentity) -> Result<SchedulerRank>
pub fn build_rank(&self, identity: RankIdentity) -> Result<SchedulerRank>
Build one scheduler/KV/timing rank with an explicit identity.
Sourcepub fn build(
&self,
identity: EngineIdentity,
dp_size: NonZeroU32,
) -> Result<Engine>
pub fn build( &self, identity: EngineIdentity, dp_size: NonZeroU32, ) -> Result<Engine>
Build a single-rank or attention-DP logical engine.
Trait Implementations§
Source§impl Clone for EngineFactory
impl Clone for EngineFactory
Source§fn clone(&self) -> EngineFactory
fn clone(&self) -> EngineFactory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for EngineFactory
impl !UnwindSafe for EngineFactory
impl Freeze for EngineFactory
impl Send for EngineFactory
impl Sync for EngineFactory
impl Unpin for EngineFactory
impl UnsafeUnpin for EngineFactory
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