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: usizeBytes per row of ONE prime call (the slab planes above).
prompt_row_bytes: usizeBytes per PROMPT row that live for the whole prime (the returned hiddens stack).
n_layers: usizeTrunk depth, for the auto chunk geometry (prime_chunk_tokens).
Implementations§
Source§impl PrimeWorkspaceShape
impl PrimeWorkspaceShape
Sourcepub fn admission_bytes_with_call_rows(
&self,
prompt_rows: usize,
call_rows: usize,
) -> usize
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).
Sourcepub fn admission_bytes(&self, prompt_rows: usize) -> usize
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
impl Clone for PrimeWorkspaceShape
Source§fn clone(&self) -> PrimeWorkspaceShape
fn clone(&self) -> PrimeWorkspaceShape
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more