Skip to content

Implementaion of dasum, sasum with AVX2 & AVX512 intrinsic #2803

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

Merged
merged 3 commits into from
Sep 6, 2020

Conversation

xiegengxin
Copy link
Contributor

Implement dasum, sasum with AVX2 & AVX512 intrinsic for x86_64 architecture to improve the performance.

@brada4
Copy link
Contributor

brada4 commented Aug 31, 2020

I think you need to force-align presumed jump targets to palign(5) or so , but measure.
What about AMD ZEN and Intel COOPERLAKE ?

@brada4
Copy link
Contributor

brada4 commented Aug 31, 2020

AVX2 and AVX512 needs some warmup, otherwise for small samples it is hundreds of cycles unproductive

@xiegengxin
Copy link
Contributor Author

  1. Align to 64 byte or 32 byte.
  2. When input array size is small (less than 256), using SSE intrinsic to instead of AVX512/AVX2. The performance won't worse too much.
input size Optimizaion vs Before
16 0.96x
32 1.03x
64 1.01x
128 0.99x
256 0.99x
512 0.95x
1024 1.16x
2048 1.18x

@brada4
Copy link
Contributor

brada4 commented Sep 3, 2020

From excellent resource at agner.org

The first YMM or ZMM instruction takes 150-250 clock cycles -probably to start a power-up process

How does it work with intentionally unaligned input, and not ending so round?

@martin-frbg martin-frbg merged commit e72430f into OpenMathLib:develop Sep 6, 2020
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.

3 participants