Skip to main content

ColumnSet

Struct ColumnSet 

Source
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: bool

Implementations§

Source§

impl ColumnSet

Source

pub fn new(name: &str, formats: &[GgmlType], words: Words) -> ColumnSet

The set formats under name, for jobs at words.

Source

pub fn with_octets(self) -> ColumnSet

The set with its Q8_0 matrices’ blocks taken eight at a time.

Source

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.

Source

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.

Source

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.

Source

pub fn issue_rows(&self) -> usize

The token-rows one issue of the set’s array runs against: two with token pairs, one otherwise.

Source

pub fn issues(&self, tokens: usize) -> usize

The issues a block step of tokens token-rows takes: ⌈tokens / ColumnSet::issue_rows⌉.

Source

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.

Source

pub fn octet(&self, ty: GgmlType) -> bool

Whether ty’s blocks come in octets.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn elems(&self) -> usize

The elements of the set’s widest block.

Source

pub fn word_count(&self) -> usize

The activation words a job of the set may run at.

Source

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.

Source

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.

Source

pub fn act_slots(&self) -> usize

The activation scales a word holds: one, or with octets an octet’s eight blocks’.

Source

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).

Source

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§

Source§

impl Clone for ColumnSet

Source§

fn clone(&self) -> ColumnSet

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ColumnSet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ColumnSet

Source§

fn eq(&self, other: &ColumnSet) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ColumnSet

Source§

impl StructuralPartialEq for ColumnSet

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,