pub enum TpShardKind {
Replicated,
ColumnParallel,
RowParallel,
}Expand description
TP shard kind for a 2D BF16 weight [out_dim, in_dim].
Variants§
Replicated
Replicated: every TP rank holds the full tensor (norm scalars, embedding-tied weights, MTP heads in v1).
ColumnParallel
Column-parallel: split out_dim evenly across ranks. Rank r keeps
rows [r * out_dim / tp, (r + 1) * out_dim / tp).
RowParallel
Row-parallel: split in_dim evenly across ranks. Rank r keeps
cols [r * in_dim / tp, (r + 1) * in_dim / tp).
Trait Implementations§
Source§impl Clone for TpShardKind
impl Clone for TpShardKind
Source§fn clone(&self) -> TpShardKind
fn clone(&self) -> TpShardKind
Returns a duplicate of the value. Read more
1.0.0 · 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 TpShardKind
impl Debug for TpShardKind
Source§impl PartialEq for TpShardKind
impl PartialEq for TpShardKind
impl Copy for TpShardKind
impl Eq for TpShardKind
impl StructuralPartialEq for TpShardKind
Auto Trait Implementations§
impl Freeze for TpShardKind
impl RefUnwindSafe for TpShardKind
impl Send for TpShardKind
impl Sync for TpShardKind
impl Unpin for TpShardKind
impl UnwindSafe for TpShardKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.