pub struct ColumnParallelLinear {
pub weight: Parameter,
pub bias: Option<Parameter>,
pub rank: usize,
pub world_size: usize,
pub barrier: Arc<CollectiveBarrier>,
}Expand description
Linear layer with weight sharded along columns (N dimension).
Forward: Y_t = X @ W_t (no collective).
Backward: grad_X = AllReduce(grad_Y_t @ W_t^T) — handled by normal
autograd + external AllReduce call.
Fields§
§weight: Parameter§bias: Option<Parameter>§rank: usize§world_size: usize§barrier: Arc<CollectiveBarrier>Implementations§
Auto Trait Implementations§
impl Freeze for ColumnParallelLinear
impl !RefUnwindSafe for ColumnParallelLinear
impl Send for ColumnParallelLinear
impl Sync for ColumnParallelLinear
impl Unpin for ColumnParallelLinear
impl UnsafeUnpin for ColumnParallelLinear
impl !UnwindSafe for ColumnParallelLinear
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