pub struct Team { /* private fields */ }Expand description
The process-wide team. Armed by default at min(6, cores) partitions on native
(FTTS_INT8_THREADS overrides; 1 disarms), and explicitly by the host on wasm.
Implementations§
Source§impl Team
impl Team
Sourcepub fn linear_f32(
&self,
x: &[f32],
weight: &[f32],
bias: Option<&[f32]>,
m: usize,
k: usize,
n: usize,
out: &mut [f32],
)
pub fn linear_f32( &self, x: &[f32], weight: &[f32], bias: Option<&[f32]>, m: usize, k: usize, n: usize, out: &mut [f32], )
Runs one f32 dense linear across the team, bit-identically to the serial packed kernel.
§Panics
Panics on shape mismatches, exactly as the serial kernel does.
The argument count mirrors the serial kernel’s signature exactly, which is the point: a caller swaps one call for the other with no reshaping, so any divergence would be a compile error rather than a silent behavioural difference.
Sourcepub fn linear_q8(
&self,
x_q: &[i8],
x_scales: &[f32],
weight: &QuantizedMatrix,
bias: Option<&[f32]>,
m: usize,
out: &mut [f32],
tier: Int8Tier,
)
pub fn linear_q8( &self, x_q: &[i8], x_scales: &[f32], weight: &QuantizedMatrix, bias: Option<&[f32]>, m: usize, out: &mut [f32], tier: Int8Tier, )
Runs one W8A8 linear across the team. Bit-identical to the serial path per element.
§Panics
Panics on shape mismatches, exactly as the serial kernel does.
Sourcepub fn gqa_attention(
&self,
queries: &[f32],
keys: &[f32],
values: &[f32],
mask: &[f32],
query_positions: usize,
key_positions: usize,
q_heads: usize,
kv_heads: usize,
head_dim: usize,
out: &mut [f32],
)
pub fn gqa_attention( &self, queries: &[f32], keys: &[f32], values: &[f32], mask: &[f32], query_positions: usize, key_positions: usize, q_heads: usize, kv_heads: usize, head_dim: usize, out: &mut [f32], )
Runs the default-arithmetic GQA attention across the team, partitioned over query
heads. Bit-identical to the serial f32ref::gqa_attention (same extracted loop).
§Panics
Panics on shape mismatches, exactly as the serial reference does.