pub struct Machine {
pub spec: ModelSpec,
pub identity: Identity,
pub layout: Layout,
pub jobs: Vec<Job>,
/* private fields */
}Expand description
A checkpoint on the machine: its layout, its jobs, and the card’s memory they run over.
Fields§
§spec: ModelSpec§identity: IdentityThe cut of the model’s one program the machine’s step was read off.
layout: Layout§jobs: Vec<Job>Implementations§
Source§impl Machine
impl Machine
Sourcepub fn new(
spec: ModelSpec,
source: impl WeightSource,
numerics: EngineNumerics,
sequences: usize,
ctx: usize,
) -> Result<Machine, EngineError>
pub fn new( spec: ModelSpec, source: impl WeightSource, numerics: EngineNumerics, sequences: usize, ctx: usize, ) -> Result<Machine, EngineError>
spec at numerics with room for sequences sequences of ctx positions each, its weight image and rotary
tables written from source.
Sourcepub fn folded(self) -> Machine
pub fn folded(self) -> Machine
The machine with its step’s residual adds and gated products folded into the matrix jobs that alone feed them
(fold): every value the step computes as it was, in fewer jobs over fewer slots.
Sourcepub fn delta_normed(self) -> Machine
pub fn delta_normed(self) -> Machine
The machine with each recurrence job’s gated norm folded into it (fold_delta_norms): every value the step
computes as it was, the norm made where the read-outs are.
Sourcepub fn sequence(&mut self) -> Result<usize, EngineError>
pub fn sequence(&mut self) -> Result<usize, EngineError>
A fresh sequence at position 0 in the first region no sequence holds, the region cleared; its handle, the region’s index.
Sourcepub fn release(&mut self, sequence: usize)
pub fn release(&mut self, sequence: usize)
The sequence sequence ends: its region is free for the next.
pub fn position(&self, sequence: usize) -> usize
Auto Trait Implementations§
impl Freeze for Machine
impl RefUnwindSafe for Machine
impl Send for Machine
impl Sync for Machine
impl Unpin for Machine
impl UnsafeUnpin for Machine
impl UnwindSafe for Machine
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
§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.