Skip to main content

PrimeWorkspaceShape

Struct PrimeWorkspaceShape 

Source
pub struct PrimeWorkspaceShape {
    pub call_row_bytes: usize,
    pub prompt_row_bytes: usize,
    pub n_layers: usize,
}
Expand description

The largest number of token rows any ONE mHC prime call carries under hyper_prime_ranges. Every per-call transient in the walk — the t*streams*hidden stream state, the MLA query planes, and the DSA indexer’s t * n_pools score plane — is proportional to this, so it is the single number a capacity assertion needs. Admission workspace shape of the NON-hyper prime (memra#144): the GDN / dense-MoE trunk (ornith, qwen-hybrid) and the step-TP trunk (step-3.7). prime_layers keeps its trunk transients in the retained prime slab pool sized by the CALL’s row count (prime_slabs_get): seven f32 [t, n_embd] planes (h, x1, z, xa, xb, ffn_out, mixed), two f16 mirrors (h16, z16), three f32 [t, n_ff_max] planes (act, gate, up), plus the per-call f16 activation (a16), the f16 pre-norm operand, and the x/hn copies the tail takes. The whole-prompt hiddens stack ([t, n_embd] f32) lives for the prime. Before this shape existed the admission line charged 0MB prefill-workspace on these paths, which is how a 164k ornith prompt was admitted onto a card that could not hold its monolithic prime (darklanes research/memra146-ornith-repro-20260904: 22 GB more resident after a 257k sweep with MEMRA_PRIME_CHUNK=0 than with 4096) and how a 91k step37 prompt stepped into a CUDA OOM after admission priced it at 3.1 GB.

Fields§

§call_row_bytes: usize

Bytes per row of ONE prime call (the slab planes above).

§prompt_row_bytes: usize

Bytes per PROMPT row that live for the whole prime (the returned hiddens stack).

§n_layers: usize

Trunk depth, for the auto chunk geometry (prime_chunk_tokens).

Implementations§

Source§

impl PrimeWorkspaceShape

Source

pub fn admission_bytes_with_call_rows( &self, prompt_rows: usize, call_rows: usize, ) -> usize

The charge for prompt_rows with an explicit per-call row count (pure arithmetic, what the tests pin).

Source

pub fn admission_bytes(&self, prompt_rows: usize) -> usize

The charge under the deployment’s prime chunking: MEMRA_PRIME_CHUNK (0 = monolithic up to the launch cap, so the call rows are the whole prompt) or the auto geometry.

Trait Implementations§

Source§

impl Clone for PrimeWorkspaceShape

Source§

fn clone(&self) -> PrimeWorkspaceShape

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for PrimeWorkspaceShape

Source§

impl Debug for PrimeWorkspaceShape

Source§

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

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

impl Eq for PrimeWorkspaceShape

Source§

impl PartialEq for PrimeWorkspaceShape

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PrimeWorkspaceShape

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
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.