Skip to content

perf(linalg): run SiLU on a dedicated AVX-512 kernel - #2589

Draft
cverrier wants to merge 3 commits into
sonos:mainfrom
cverrier:perf/run-silu-on-dedicated-avx512-kernel
Draft

perf(linalg): run SiLU on a dedicated AVX-512 kernel#2589
cverrier wants to merge 3 commits into
sonos:mainfrom
cverrier:perf/run-silu-on-dedicated-avx512-kernel

Conversation

@cverrier

@cverrier cverrier commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

x86 hosts with AVX2+FMA but no AVX-512 ran SiLU through the generic
scalar kernel; they now get a vectorized one, which improves the
throughput. Accuracy follows the FMA sigmoid.
AVX-512 hosts ran silu_f32 and silu_f16 through a kernel composed over
the zmm sigmoid, which pays a scratch copy and an extra traversal that
the fused FMA kernel avoids. They now use the fused kernel at both
widths. The composed kernel has no remaining users, and is removed.
AVX-512 hosts ran SiLU through the 256-bit FMA kernel for both f32 and
f16. A 16-wide kernel is faster on both, worth ~8% on f32 buffers and
~29% on f16 — the latter only once the f16 wrapper hands it a slice long
enough to amortize the fixed cost every f32 kernel call pays regardless
of its length.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant