pub struct KdaTensorPlan {
pub name: &'static str,
pub kind: KdaShard,
pub elem_bytes: usize,
pub full_rows: usize,
pub full_row_elems: usize,
pub local_rows: usize,
pub local_row_elems: usize,
pub src_row_offset: usize,
pub src_col_offset: usize,
}Expand description
One tensor’s placement. row_elems is the width of a row in elements; for
KdaShard::ChannelCols the roles invert and row_elems is the sharded axis.
Fields§
§name: &'static str§kind: KdaShard§elem_bytes: usize§full_rows: usizeRows of the full, on-disk tensor.
full_row_elems: usizeElements per row of the full tensor.
local_rows: usizeRows this rank keeps.
local_row_elems: usizeElements per row this rank keeps (differs from full only for ChannelCols).
src_row_offset: usizeOffset, in rows, of this rank’s slice into the full tensor. Always 0 for
Replicated and for ChannelCols (which slices columns, not rows).
src_col_offset: usizeOffset, in elements, of this rank’s column slice. Non-zero only for
ChannelCols.
Implementations§
Source§impl KdaTensorPlan
impl KdaTensorPlan
Sourcepub fn local_bytes(&self) -> usize
pub fn local_bytes(&self) -> usize
Bytes this rank stores for this tensor.
Sourcepub fn full_bytes(&self) -> usize
pub fn full_bytes(&self) -> usize
Bytes the full tensor occupies on disk.
Trait Implementations§
Source§impl Clone for KdaTensorPlan
impl Clone for KdaTensorPlan
Source§fn clone(&self) -> KdaTensorPlan
fn clone(&self) -> KdaTensorPlan
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 KdaTensorPlan
impl Debug for KdaTensorPlan
Source§impl PartialEq for KdaTensorPlan
impl PartialEq for KdaTensorPlan
impl Eq for KdaTensorPlan
impl StructuralPartialEq for KdaTensorPlan
Auto Trait Implementations§
impl Freeze for KdaTensorPlan
impl RefUnwindSafe for KdaTensorPlan
impl Send for KdaTensorPlan
impl Sync for KdaTensorPlan
impl Unpin for KdaTensorPlan
impl UnwindSafe for KdaTensorPlan
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.