-
Notifications
You must be signed in to change notification settings - Fork 713
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
Initial Intel HEXL integration #312
Conversation
@fboemer Great boost. HEXL saves ~50% computation time for my program :). Another concern is that does it possible reuse HEXL's twiddle factors table via the SEAL's NTTTable object, |
Can you share your CPU spec? Does it have |
CPU-Flags:
|
Cool! It's remarkably faster even with |
@fboemer This is superb. Thanks for making SEAL faster. :) A few things to add to this PR:
Questions:
Recommendations to Intel HEXL:
|
Co-authored-by: Gelila Seifu <gelila.seifu@intel.com> Co-authored-by: Jeremy Bottleson <jeremy.bottleson@intel.com> Update to new HEXL Remove unnecessary casts Log options
9ade672
to
3f5f8a9
Compare
Thanks for the feedback, @WeiDaiWD and @fionser. A few notes:
Also a note that this updated PR makes two more changes:
|
@fionser Does your program use BGV or BFV? |
@fboemer Everything looks good now. Would you let me know when you think 1.0.0 is stable enough to freeze the tag? I'm ready to merge this into SEAL at any time, then why not wait for your upcoming commit hashes. Side note: |
@WeiDaiWD , we updated the tag to v1.0.1 after all. No more changes will be made to this tag, so feel free to do any final testing and merge. Thanks for trying out the prime bit-width changes. I'll try them out on an IceLake processor and report my findings here. Edit: findings below. Still need to investigate if the AVX512IFMA52 instructions are being called or not with the smaller primes.
|
Cool. I'll just merge this. Let me know if you see important to update the tag/commit before the next SEAL's release. Thanks! |
One little suggestion: when I build it on a Core i7-10700K that does not have AVX512, I have the following warning: Maybe you want to explain to users what it means. |
CKKS only |
Interestingly, when used HEXL, the BFV decryption slow down quite significantly.
BFV decryption took 3.1ms/ 0.4ms (w and w/o HEXL) in my machine (gcc version 7.2.1, Red Hat 7.2.0-5, Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz) I have tried to turn off HEXL in |
@fiosner, SEAL performs NTT pre-computations during configuration, while HEXL performs NTT pre-computations during the first use of the NTT. So the first run of BFV decryption may be slower, but I would expect repeated runs (e.g. in the benchmark suite using 1000 iterations) using HEXL to be similar to or faster than the SEAL implementation. The default iteration count of 10 seems small enough that a slow first run with HEXL may skew the average runtime. I just tested on a similar machine ( Removing the As another note, I've intermittently seen some very strange slowdowns in the past, similar to https://stackoverflow.com/questions/42358211/adding-a-print-statement-speeds-up-code-by-an-order-of-magnitude. If this problem still persists, perhaps try compiling SEAL with By the way, you may wish to see if the degradation you observe persists in the latest version of HEXL: #332 |
@fboemer Nice thank you for the information. |
Initial integration with Intel HEXL (https://github.com/intel/hexl)
Co-authored-by: Gelila Seifu gelila.seifu@intel.com
Co-authored-by: Jeremy Bottleson jeremy.bottleson@intel.com