Skip to content
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

Adding ARM64 intrinsics support #268

Closed
BastienVialla opened this issue Jan 15, 2021 · 2 comments
Closed

Adding ARM64 intrinsics support #268

BastienVialla opened this issue Jan 15, 2021 · 2 comments

Comments

@BastienVialla
Copy link
Contributor

Playing with the lib on the new Apple macbook air with M1, I found out that the performance of the native version is slower than the emulation of the x86_64 version.

After a bit of investigation, the performance difference come from the arm version not using intrinsics. A small modification of the cmake header detection script and clang.h/gcc.h files to import arm_neon.h instead of x86intrinsics.h when compiling on arm64, greatly improved the performances, see table. The performance boost should translate to others arm platforms. All tests are OK but I'm not able to check if everything works fine on windows or Android, so I didn't make a pull request.

CKKS performance test, degree 8192, on macbook air M1 8Go, timings in microseconds.

native arm w/o intrinsics native arm with intrinsics
encode 683 441
decode 1309 900
encrypt 4356 2551
decrypt 245 112
add 38 37
multiply 808 280
multiply plain 368 106
square 597 203
relinearize 4253 1931
rescale 1014 474
rotate 1 step 4279 1972
rotate rd 17199 7821
@kimlaine
Copy link
Contributor

Thanks for sharing this! This could be really valuable to get into SEAL, obviously. Could you submit the pull request to the contrib branch and we can help evaluate that it's all good to go.

@kimlaine
Copy link
Contributor

Thanks for your contribution! This is now released. :)

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

No branches or pull requests

2 participants