pub struct ColumnSet {
pub name: String,
pub formats: Vec<GgmlType>,
pub words: Words,
pub octets: bool,
pub slot: usize,
pub lanes: usize,
pub pe_pairs: bool,
pub token_pairs: bool,
}Expand description
A set of formats one column is built for, under one name, and the activation words its jobs run at: built for one
word, every module of the set has no two and its lanes are one word wide. With octets, a Q8_0 matrix’s blocks
come eight to one of the column’s (its octets, ColumnSet::block_len): an issue’s units hold a row’s eight
blocks, and the lane takes them one a clock, each still a block of its own. With a slot past 1 every block comes
in the image padded with zeros to a multiple of slot bytes (ImageLayout::slot), so the feed gathers its beats
slot bytes at a time. With lanes past 1 an octet’s blocks leave for lanes lanes a row a clock, a token-row’s
next lanes blocks at once: the row’s full lane and lanes − 1 lanes of one scale (logos_lane_slim_p), their
values added into the row’s sum in block order through a chain of lanes adds.
Fields§
§name: String§formats: Vec<GgmlType>§words: Words§octets: bool§slot: usize§lanes: usize§pe_pairs: bool§token_pairs: boolImplementations§
Source§impl ColumnSet
impl ColumnSet
Sourcepub fn new(name: &str, formats: &[GgmlType], words: Words) -> ColumnSet
pub fn new(name: &str, formats: &[GgmlType], words: Words) -> ColumnSet
The set formats under name, for jobs at words.
Sourcepub fn with_octets(self) -> ColumnSet
pub fn with_octets(self) -> ColumnSet
The set with its Q8_0 matrices’ blocks taken eight at a time.
Sourcepub fn with_octet_lanes(self, lanes: usize) -> ColumnSet
pub fn with_octet_lanes(self, lanes: usize) -> ColumnSet
The set with an octet’s blocks leaving for lanes lanes a row a clock: 1, 2, 4 or 8, a divisor of an octet’s
eight blocks.
Sourcepub fn with_pe_pairs(self) -> ColumnSet
pub fn with_pe_pairs(self) -> ColumnSet
The set with its processing elements in a clock of twice its cores’ (the array’s clk2), each set of them
taking two issues’ passes a clock. An array’s cores run in lockstep against one activation word, so a pair of
cores’ elements take one core’s codes and then the other’s (logos_matvec_pass_x2); with token pairs
(ColumnSet::with_token_pairs) each core’s own elements take its beat’s codes against the pair’s first word
and then its second (logos_matvec_pass_x2t). Half the elements for the same passes, each core’s clocks as they
were.
Sourcepub fn with_token_pairs(self) -> ColumnSet
pub fn with_token_pairs(self) -> ColumnSet
The set with each issue of its array’s held beat run against two token-rows a clock, token-rows t and t + 1
for even t (token_pairs): each core takes two activation words a clock, one from each half of its channel’s
copy of the activations (a word a token pair, written a half at a time under the mask), through processing
elements and lanes of each, the beat and the issue’s flags and fields shared; a sum’s place is a token pair’s, and
a step issues ⌈tokens / 2⌉ times (ColumnSet::issues). The ring, the core’s control and its channel’s feed
then serve twice the multiplies. An odd count’s last pair runs its second token-row on whatever its half holds,
and the array’s consumer takes only the token-rows the job has. With ColumnSet::pe_pairs the pair’s two words
run on one set of the core’s elements in clk2. With ColumnSet::lanes past one each token-row of the pair has
its octet lanes.
Sourcepub fn issue_rows(&self) -> usize
pub fn issue_rows(&self) -> usize
The token-rows one issue of the set’s array runs against: two with token pairs, one otherwise.
Sourcepub fn issues(&self, tokens: usize) -> usize
pub fn issues(&self, tokens: usize) -> usize
The issues a block step of tokens token-rows takes: ⌈tokens / ColumnSet::issue_rows⌉.
Sourcepub fn with_slots(self, slot: usize) -> ColumnSet
pub fn with_slots(self, slot: usize) -> ColumnSet
The set with its blocks in slots of slot bytes: a power of two a line’s 64 bytes are a whole number of.
Sourcepub fn block_len(&self, ty: GgmlType) -> usize
pub fn block_len(&self, ty: GgmlType) -> usize
The elements of one of the column’s blocks of ty: its format’s block, or an octet’s 256.
Sourcepub fn block_bytes(&self, ty: GgmlType) -> usize
pub fn block_bytes(&self, ty: GgmlType) -> usize
The bytes of one of the column’s blocks of ty: its format’s block, or an octet’s 272.
Sourcepub fn slot_bytes(&self, ty: GgmlType) -> usize
pub fn slot_bytes(&self, ty: GgmlType) -> usize
The bytes one of the column’s blocks of ty takes in the image: its block’s, then zeros to the set’s slot.
Sourcepub fn hybrid(formats: &[GgmlType], words: Words) -> ColumnSet
pub fn hybrid(formats: &[GgmlType], words: Words) -> ColumnSet
A hybrid engine’s set: formats in their ggml ids’ order under the name step, so one build’s set and the
programs written for it place every format alike.
Sourcepub fn signature(&self) -> String
pub fn signature(&self) -> String
The set as a program and a build name it: its formats in order and its word count, Q8_0+Q4_K:1, a format
taken in octets Q8_0x8, blocks in slots of 16 bytes @16.
Sourcepub fn word_count(&self) -> usize
pub fn word_count(&self) -> usize
The activation words a job of the set may run at.
Sourcepub fn decoded_bits(&self) -> usize
pub fn decoded_bits(&self) -> usize
Bits of one decoded block: its codes, its units’ multipliers and offset terms as bytes, its two scales and its
units’ sums of codes (ColumnSet::decoded_fields), and with octets an octet’s seven scales past its first; a
decoded beat is two, block one’s below block two’s.
Sourcepub fn decoded_fields(&self) -> DecodedFields
pub fn decoded_fields(&self) -> DecodedFields
Where each field of a decoded block starts: the codes, the multipliers, the offset terms, the two scales, the units’ sums of codes, and an octet’s seven scales past its first.
Sourcepub fn act_slots(&self) -> usize
pub fn act_slots(&self) -> usize
The activation scales a word holds: one, or with octets an octet’s eight blocks’.
Sourcepub fn act_bits(&self) -> usize
pub fn act_bits(&self) -> usize
Bits of an activation word in block RAM, whole bytes: each word’s excess codes, then each word’s units’ sums of
them, then each scale’s significand and exponent, 24 bits a scale (ColumnSet::act_fields).
Sourcepub fn act_fields(&self) -> ActFields
pub fn act_fields(&self) -> ActFields
Where each field of an activation word starts: word k‘s excess codes at excess + k·8E, its units’ sums at
sums + k·12U, scale j’s significand at m + 24j and its exponent at e + 24j.
Trait Implementations§
impl Eq for ColumnSet
impl StructuralPartialEq for ColumnSet
Auto Trait Implementations§
impl Freeze for ColumnSet
impl RefUnwindSafe for ColumnSet
impl Send for ColumnSet
impl Sync for ColumnSet
impl Unpin for ColumnSet
impl UnsafeUnpin for ColumnSet
impl UnwindSafe for ColumnSet
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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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
§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
key and return true if they are equal.