pub struct DsaTpPlan {
pub tp_rank: usize,
pub tp_size: usize,
pub full_heads: usize,
pub local_heads: usize,
pub tensors: Vec<DsaTensorPlan>,
}Expand description
2026-09-25: Per-rank shard plan for one DSA block.
Fields§
§tp_rank: usize§tp_size: usize§full_heads: usize§local_heads: usize§tensors: Vec<DsaTensorPlan>Implementations§
Source§impl DsaTpPlan
impl DsaTpPlan
Sourcepub fn new(
tp_rank: usize,
tp_size: usize,
cfg: &Glm5NextDsaConfig,
) -> Result<Self>
pub fn new( tp_rank: usize, tp_size: usize, cfg: &Glm5NextDsaConfig, ) -> Result<Self>
2026-09-25: cfg.local_heads is already per rank, so the full head count is
local_heads * tp_size, as in TpGdnDims::from_config.
pub fn get(&self, name: &str) -> Option<&DsaTensorPlan>
pub fn local_bytes(&self) -> usize
pub fn full_bytes(&self) -> usize
Sourcepub fn needs_output_all_reduce(&self) -> bool
pub fn needs_output_all_reduce(&self) -> bool
2026-09-25: o_proj is row-parallel, so above tp_size = 1 its output needs the reduce.
Sourcepub fn replicated_bytes(&self) -> usize
pub fn replicated_bytes(&self) -> usize
2026-09-25: Bytes every rank holds in full.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DsaTpPlan
impl RefUnwindSafe for DsaTpPlan
impl Send for DsaTpPlan
impl Sync for DsaTpPlan
impl Unpin for DsaTpPlan
impl UnwindSafe for DsaTpPlan
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