GeezerVison is showing github.com — ENH: Speed up umath functions using NEON/SVE | SIMD · Issue #27533 · numpy/numpy
ENH: Speed up umath functions using NEON/SVE | SIMD #27533
Description
Proposed new feature or change:
Similar to how #21955 vectorized umath functions using AVX512 FP16, I'm interested in leveraging NEON/SVE to get similar benefits for aarch64 processors.
I'd be grateful for tips/opinions from domain experts @r-devulap @Mousius and others on whether this is a problem worth solving / a solved problem already.
I'd also like to know how to generate benchmark results in a format similar to earlier PRs that ran run_tests.py- with
before, after, ratio numbers. I've tried running spin bench --compare <branch/tag> but it does not provide a comparison like run_tests.py does.
Thanks!
Activity
r-devulap commented on Oct 9, 2024
Hello @Rohanjames1997. Thank you for your interest! PR #21955 leveraged Intel SVML library which is currently platform specific (x86, AVX-512). We ideally want to convert these from asm to highway intrinsics which would then work on all platforms. Is that something that sounds of interest to you?
Also, spin bench --compare main command seems to produce the output you are looking for. I am able to run it and verify the output. For example: spin bench --compare main -t bench_random.Random
| Change | Before [49e0743d] <main> | After [4efe1c69] <HWY2> | Ratio | Benchmark (Parameter) |
|----------|----------------------------|---------------------------|---------|----------------------------------------|
| - | 7.36±0.07μs | 6.90±0.3μs | 0.94 | bench_random.Random.time_rng('normal') |
Rohanjames4 commented on Oct 9, 2024
Thanks for the info @r-devulap !
I saw a few PRs that converted universal intrinsics to highway, and #25934 is related to what I was hoping to implement, at least for fp32 & fp64.
I can try implementing the fp16 version using highway, keeping #25781 as reference. Although I won't be able to devote much time to this just yet, I'd love to know if there are more examples or references I can follow.
Cheers!
r-devulap commented on Oct 10, 2024
If you want to get started on how to use highway, then converting any of dispatch C sources to highway might be a great start. See example: #27402
Metadata
Metadata
Development
No branches or pull requestsIssue actions