pub struct TpBytePlan {
pub axis: TpAxis,
pub local_shape: Vec<usize>,
pub source_bytes: usize,
/* private fields */
}Expand description
Byte ranges from one full checkpoint tensor that form this rank’s tensor. Ranges preserve row-major packed nibbles and their matching E8M0 groups.
Fields§
§axis: TpAxis§local_shape: Vec<usize>§source_bytes: usizeImplementations§
Source§impl TpBytePlan
impl TpBytePlan
pub fn local_bytes(&self) -> usize
pub fn byte_ranges(&self) -> impl Iterator<Item = Range<usize>> + '_
Sourcepub fn validate_source(&self, source: &[u8]) -> Result<()>
pub fn validate_source(&self, source: &[u8]) -> Result<()>
Check storage-only padding before any device allocations. The official K3 export stores 96 trained A_log heads followed by 32 zero F32 values. Keep the logical head count; never truncate an unverified nonzero tail.
Trait Implementations§
Source§impl Clone for TpBytePlan
impl Clone for TpBytePlan
Source§fn clone(&self) -> TpBytePlan
fn clone(&self) -> TpBytePlan
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 moreAuto Trait Implementations§
impl Freeze for TpBytePlan
impl RefUnwindSafe for TpBytePlan
impl Send for TpBytePlan
impl Sync for TpBytePlan
impl Unpin for TpBytePlan
impl UnwindSafe for TpBytePlan
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