pub struct ShardInfo {
pub shard_dim: usize,
pub start_idx: usize,
pub shard_size: usize,
pub original_shape: Shape,
pub strategy: TensorParallelStrategy,
}Expand description
Information about how a parameter is sharded
Fields§
§shard_dim: usizeWhich dimension is sharded
start_idx: usizeStart index of this shard
shard_size: usizeSize of this shard
original_shape: ShapeOriginal tensor shape
strategy: TensorParallelStrategyStrategy used for sharding
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ShardInfo
impl RefUnwindSafe for ShardInfo
impl Send for ShardInfo
impl Sync for ShardInfo
impl Unpin for ShardInfo
impl UnsafeUnpin for ShardInfo
impl UnwindSafe for ShardInfo
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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