You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ARM64 NEON SIMD kernels for gelu, sigmoid, silu, softmax, layer_norm, and adam_step #6
Difficulty: Medium (help wanted) Mentorship: Yes — comment on this issue or ask in GitHub Discussions anytime for feedback on intrinsics, dispatch, or benchmarks. Contribution Guidelines: Please see CONTRIBUTING.md (dual-licensed under MIT OR Apache-2.0, no CLA required).
What Is Asked
crates/oxideon-core/src/backend/simd_arm.rs currently accelerates add, sub, mul, div, sum, relu, exp, and tanh using ARM64 NEON (std::arch::aarch64), while simd_x86.rs also has AVX2+FMA kernels for gelu, gelu_backward, sigmoid, silu, softmax_row_f32, layer_norm_row_f32, layer_norm_row_bwd_f32, and adam_step_f32_slice.
We want to implement NEON (aarch64) equivalents for those remaining hot f32 kernels and wire them into backend/cpu.rs so Apple Silicon and ARM64 Linux servers get matching speedups.
Expected Outcome
NEON f32 kernels in simd_arm.rs for gelu, sigmoid, silu, softmax_row, layer_norm_row, and adam_step.
Clean cfg(target_arch = "aarch64") dispatch in backend/cpu.rs (preserving portable fallback on other targets and passing cargo clippy --workspace --all-targets -- -D warnings).
Follow the pattern already in simd_arm.rs (#[cfg(target_arch = "aarch64")] mod neon_impl { ... }).
Look at how sigmoid_f32_avx2_impl and softmax_row_f32 in simd_x86.rs structure fast exp + horizontal max/sum reductions (vmaxvq_f32 / vaddvq_f32 on aarch64).
You can test non-aarch64 compilation locally on x86/Windows and validate aarch64 via the CI wheel/test matrix.
Activity