Skip to content

Optimize l2_norm_f32 op with SIMD #14970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TIKki43
Copy link

@TIKki43 TIKki43 commented Jul 30, 2025

I added an optimized version of ggml_compute_forward_l2_norm_f32 op in ops.cpp.

I replaced naive scalar loop with ggml_vec* operations based on SIMD.

  • Passed all test-backend-ops test -o L2_NORM -b CPU
  • Verifed correctness
  • Benchmarked perfomance and got 6% more time efficiency on function

I hope this helps^)

@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant