pub struct VectorJob {
pub heads: usize,
pub order: Order,
pub fresh: Vec<(Slot, usize)>,
pub loads: Vec<Load>,
pub program: Vec<Op>,
pub puts: Vec<Put>,
}Expand description
A job of the vector unit: for every row of the step, in order, and every head of the row, a pass that loads its
registers, runs program and stores from them.
Fields§
§heads: usize§order: Order§fresh: Vec<(Slot, usize)>Slots the job writes whole, made afresh at its start, each of its width.
loads: Vec<Load>§program: Vec<Op>§puts: Vec<Put>Implementations§
Source§impl VectorJob
impl VectorJob
Sourcepub fn ordered(&self) -> bool
pub fn ordered(&self) -> bool
Whether a pass reads or writes its row’s sequence’s state, so a sequence’s rows must run in order.
Sourcepub fn chunked(&self) -> bool
pub fn chunked(&self) -> bool
Whether the job may run a chunk of its vectors at a time, each chunk’s elements of every vector it loads and stores: its rows cross nowhere — one head, every load a vector of one length from a slot, a tensor or a ring, every store that length from a vector register into a slot or a ring, and every instruction elementwise or a scalar’s, none reducing, turning, rotating or coding across elements — so a chunk of its rows computes that chunk of its result. A ring’s rows are a channel each, so a sequence’s tokens still see each other’s in order.
Sourcepub fn grouped(&self) -> bool
pub fn grouped(&self) -> bool
Whether the job’s passes stand alone, so they may run in groups side by side (logos_vector_side with groups,
each pass’s registers its own): every vector load and store one length, every load a slot’s or a tensor’s, no
ring row stored, no Hadamard or rotary instruction, every register a pass reads — an instruction’s operand, a
store’s value — loaded or written earlier in that pass, and no pass loading store elements an earlier pass of its
row stores (a group loads every pass before it stores any); a job of one chunk at a time is none. A pass’s values
are then its own whatever passes run beside it.
Sourcepub fn kept(&self, i: usize) -> bool
pub fn kept(&self, i: usize) -> bool
Whether load i brings every pass the same elements into a register nothing else of the job writes — a tensor’s
span at stride 0, its register no other load’s and no instruction’s — so a register holding it from the job’s
first pass holds it for every pass after.
Trait Implementations§
impl StructuralPartialEq for VectorJob
Auto Trait Implementations§
impl Freeze for VectorJob
impl RefUnwindSafe for VectorJob
impl Send for VectorJob
impl Sync for VectorJob
impl Unpin for VectorJob
impl UnsafeUnpin for VectorJob
impl UnwindSafe for VectorJob
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.