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

fboemer/hexl-1.1.0 #332

Merged
merged 10 commits into from May 11, 2021
Merged

fboemer/hexl-1.1.0 #332

merged 10 commits into from May 11, 2021

Conversation

fboemer
Copy link
Contributor

@fboemer fboemer commented May 10, 2021

Update to HEXL v1.1.0:

  • Integrates hexl::EltwiseReduceMod (for SEAL modulo_poly_coeffs, i.e. Barrett reduce 64)

  • Integrates hexl::EltwiseAddMod / hexl::EltwiseSubMod

  • Uses memory pool wrapper around NTT allocations. This way, the reported memory allocation reported by SEAL is more accurate, since it includes memory allocated by HEXL as well.

  • Fixes failing tests when SEAL_USE_ZLIB=OFF and SEAL_USE_ZTD=OFF

  • Fixes shared library build when SEAL_USE_HEXL=ON

See below for performance improvement compared to previous HEXL integration. Data generated from the N=8192 / log(q) = 218 benchmark with 1000 iterations. Note, we see occasional slowdowns in some functions, e.g. in EvaluateAddCt. This slowdown does not seem to persist across compilations.

ICX improvement and CLX improvement (3)

n=8192 / log(q) = 218 ICX improvement CLX improvement ICX - Current SEAL ICX - New SEAL CLX - Current SEAL CLX - New SEAL
KeyGen / Secret 0.99 1.03 425 428 1063 1035
KeyGen / Public 1.01 1.03 1755 1745 2472 2394
KeyGen / Relin 1.00 1.04 6967 6933 9951 9580
KeyGen / Galois 1.00 1.04 7050 7024 10048 9706
EncryptSecret 1.00 1.03 1686 1681 2536 2474
EncryptPublic 1.07 1.10 1917 1800 3419 3097
BFV / Decrypt 1.01 1.04 508 505 1157 1110
BFV / EncodeBatch 1.01 1.02 20.7 20.5 82.6 80.6
BFV / DecodeBatch 1.00 1.01 23.5 23.4 74.3 73.3
BFV / EvaluateAddCt 1.01 0.88 54.2 53.7 90.1 102
BFV / EvaluateAddPt 0.98 1.02 187 190 279 274
BFV / EvaluateMulCt 1.01 1.00 8581 8491 13653 13590
BFV / EvaluateMulPt 1.01 1.00 531 526 1427 1433
BFV / EvaluateSquare 1.00 1.01 6365 6335 9923 9832
BFV / EvaluateModSwitchInplace 1.93 2.25 245 127 319 142
BFV / EvaluateRelinInplace 1.08 1.10 1500 1391 3968 3604
BFV / EvaluateRotateRows 1.07 1.11 1597 1489 4111 3711
BFV / EvaluateRotateCols 1.08 1.09 1613 1491 4093 3749
CKKS / EncryptSecret 1.00 1.04 1394 1389 1876 1809
CKKS / EncryptPublic 1.02 1.04 1773 1731 3974 3822
CKKS / Decrypt 1.00 1.03 87.2 86.9 127 123
CKKS / EncodeDouble 0.99 1.02 330 332 755 741
CKKS / DecodeDouble 0.99 0.98 1136 1148 1799 1833
BFV / EvaluateAddCt 1.03 0.90 55.3 53.8 94 104
BFV / EvaluateAddPt 1.24 1.00 30.8 24.8 35.4 35.5
CKKS / EvaluateMulCt 1.05 1.03 214 204 337 328
CKKS / EvaluateMulPt 1.01 1.00 68.9 68.2 101 101
CKKS / EvaluateSquare 1.02 1.04 163 160 255 246
CKKS / EvaluateRescaleInplace 1.17 1.19 327 279 843 708
CKKS / EvaluateRelinInplace 1.07 1.08 1484 1387 3948 3661
CKKS / EvaluateRotate 1.08 1.10 1566 1456 4111 3736

@fboemer fboemer changed the title Fboemer/seal pr fboemer/hexl-1.1.0 May 10, 2021
@WeiDaiWD
Copy link
Contributor

In benchmark results, ICX - Current SEAL means SEAL with Intel HEXL 1.0.1, right?

@WeiDaiWD WeiDaiWD merged commit cbd1cbe into microsoft:contrib May 11, 2021
@fboemer fboemer deleted the fboemer/seal-pr branch November 3, 2021 18:24
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.

None yet

3 participants