pub enum OpSize {
MatMul {
m: usize,
n: usize,
k: usize,
},
Elementwise(usize),
Reduce {
rows: usize,
cols: usize,
},
ReduceTo {
rows: usize,
cols: usize,
},
Attention {
b: usize,
hq: usize,
hkv: usize,
d: usize,
k_len: usize,
},
}Expand description
Per-op size descriptor. Exposed (not private) so tests can supply
a shrunk size_plan_override; not in the persisted profile
report shape — the report uses the bucketed SizeClass instead.
Variants§
MatMul
Dense matmul [m, k] @ [k, n] -> [m, n].
Elementwise(usize)
Flat 1-D shape used by unary, binary, scalar/affine, clamp, powi
kernels. Probe builds inputs of shape [n].
Reduce
Reduction along the last dim of a 2-D shape [rows, cols].
Total element count = rows × cols. Used for SumReduce /
MaxReduce / MinReduce / MeanReduce.
ReduceTo
Reduce-to-broadcast-target from [rows, cols] → [1, cols]
(sum-reduce-along-rows). Used for ReduceSumTo / ReduceMaxTo.
Attention
Decode-shaped GQA attention for OpKind::FlashAttn. seq_q is
fixed at 1 (autoregressive decode — the regime slice-4’s
flash-vs-decomposed ranking cares about). Builds
q = [b, hq, 1, d], k = v = [b, hkv, k_len, d] (hq % hkv == 0,
GQA), attending the full k_len prefix. Keyed via
SizeClass::attention(hq, k_len, d).
Trait Implementations§
impl Copy for OpSize
impl Eq for OpSize
impl StructuralPartialEq for OpSize
Auto Trait Implementations§
impl Freeze for OpSize
impl RefUnwindSafe for OpSize
impl Send for OpSize
impl Sync for OpSize
impl Unpin for OpSize
impl UnsafeUnpin for OpSize
impl UnwindSafe for OpSize
Blanket Implementations§
impl<T> Boilerplate for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more