pub struct RealtimeTopologyPolicy { /* private fields */ }Expand description
Architecture-admitted replicated and pure tensor-parallel topology policy.
Implementations§
Source§impl RealtimeTopologyPolicy
impl RealtimeTopologyPolicy
Sourcepub fn new(
identity: RealtimeIdentity,
replicated: bool,
pure_tensor_parallel_sizes: impl IntoIterator<Item = usize>,
) -> Result<Self, RealtimeContractError>
pub fn new( identity: RealtimeIdentity, replicated: bool, pure_tensor_parallel_sizes: impl IntoIterator<Item = usize>, ) -> Result<Self, RealtimeContractError>
Creates an exact fail-closed topology policy.
Sourcepub const fn identity(&self) -> &RealtimeIdentity
pub const fn identity(&self) -> &RealtimeIdentity
Returns the stable architecture topology-policy identity.
Sourcepub const fn admits_replicated(&self) -> bool
pub const fn admits_replicated(&self) -> bool
Returns whether replicated execution is admitted.
Sourcepub const fn pure_tensor_parallel_sizes(&self) -> &BTreeSet<usize>
pub const fn pure_tensor_parallel_sizes(&self) -> &BTreeSet<usize>
Returns admitted pure tensor-parallel sizes.
Sourcepub fn admits(&self, topology: ParallelTopology) -> bool
pub fn admits(&self, topology: ParallelTopology) -> bool
Returns whether an exact topology is architecture-admitted.
Trait Implementations§
Source§impl Clone for RealtimeTopologyPolicy
impl Clone for RealtimeTopologyPolicy
Source§fn clone(&self) -> RealtimeTopologyPolicy
fn clone(&self) -> RealtimeTopologyPolicy
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 moreSource§impl Debug for RealtimeTopologyPolicy
impl Debug for RealtimeTopologyPolicy
impl Eq for RealtimeTopologyPolicy
Source§impl PartialEq for RealtimeTopologyPolicy
impl PartialEq for RealtimeTopologyPolicy
impl StructuralPartialEq for RealtimeTopologyPolicy
Auto Trait Implementations§
impl Freeze for RealtimeTopologyPolicy
impl RefUnwindSafe for RealtimeTopologyPolicy
impl Send for RealtimeTopologyPolicy
impl Sync for RealtimeTopologyPolicy
impl Unpin for RealtimeTopologyPolicy
impl UnsafeUnpin for RealtimeTopologyPolicy
impl UnwindSafe for RealtimeTopologyPolicy
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