pub struct HostLayout {
pub groups: Vec<GroupLayout>,
pub lcm_block_bytes: usize,
pub num_lcm_blocks: usize,
pub owner_rank: usize,
pub tp_rank: usize,
}Expand description
The Host pool’s geometry and this rank’s place among the owners.
Fields§
§groups: Vec<GroupLayout>Each group, in the scheduler’s group order.
lcm_block_bytes: usizeBytes of one LCM block.
num_lcm_blocks: usizeLCM blocks in the pool, the null block excluded.
owner_rank: usizeThis rank among a sharded group’s owners (the KV-parallel rank).
tp_rank: usizeThis rank’s attention-TP rank.
Implementations§
Source§impl HostLayout
impl HostLayout
Sourcepub fn owned_range(
&self,
group: u32,
block: i32,
) -> Result<Option<Range>, LayoutError>
pub fn owned_range( &self, group: u32, block: i32, ) -> Result<Option<Range>, LayoutError>
The bytes of group’s scheduler block block on this rank, or None
when another rank owns it.
Sourcepub fn block_bytes(&self, group: u32) -> Result<usize, LayoutError>
pub fn block_bytes(&self, group: u32) -> Result<usize, LayoutError>
The bytes of one of group’s blocks, owned here or not.
Trait Implementations§
Source§impl Clone for HostLayout
impl Clone for HostLayout
Source§impl Debug for HostLayout
impl Debug for HostLayout
impl Eq for HostLayout
Source§impl PartialEq for HostLayout
impl PartialEq for HostLayout
impl StructuralPartialEq for HostLayout
Auto Trait Implementations§
impl Freeze for HostLayout
impl RefUnwindSafe for HostLayout
impl Send for HostLayout
impl Sync for HostLayout
impl Unpin for HostLayout
impl UnsafeUnpin for HostLayout
impl UnwindSafe for HostLayout
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self with key and returns true if they are equal.