Skip to main content

compute_silu

Function compute_silu 

Source
pub fn compute_silu(input: &[f32], output: &mut [f32])
Expand description

Compute elementwise SiLU output = input / (1 + exp(-input)) over equal-length contiguous f32 slices. MLAS runtime-dispatches to its fused one-pass AVX-512F kernel when available and uses a portable fallback elsewhere. Single threaded; callers shard across threads themselves.