-
Notifications
You must be signed in to change notification settings - Fork 206
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
Powerpc s390 support #641
Merged
Merged
Powerpc s390 support #641
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
yspolyakov
approved these changes
Jan 16, 2024
dsuponitskiy
added a commit
that referenced
this pull request
Mar 4, 2024
* 569 fix fast rotations in leveled bfv (#625) * fix for fast rotation bfv leveled * use the already computed digits to drop levels in EvalFastRotation * Basic tests for BFV EvalFastRotation * updated tests * cleanup and clarification * added more tests + comment --------- Co-authored-by: Andreea Alexandru <aalexandru@dualitytech.com> Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * fixed FLEXIBLEAUTOEXT for large ring dimensions (#627) * fixed FLEXIBLEAUTOEXT for large ring dimensions * fixed the new bug introduced by the prior fix --------- Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> * Fixed GetBootstrapDepth (#626) * updated GetBootstrapDepth * Update simple-ckks-bootstrapping.cpp --------- Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> * Scheme switching improvements (#630) * pass BinFHEContext as shared ptr * pre-rebase * pass BinFHEContext as shared ptr * improved linear transform * unittests are passing + cleanup * changed API to separate setup from key gen * data struct for scheme switching parameters * reverted parameters; serialization not fully working * fixed serializing keys, issue with serializing inner cc * changed API for binfhecc access, remaining issue with (de)serialization cc and ctxt compatibility * serialization works * cleanup * prep for cc serialization * incomplete fix for cc serialization * before another rebase * get/set to fix serialization * Added a mechanism to serialize/deserialize all schemeswitching data * Reduced the number parameters passed to the constructor (serialize/deserialize schemeswitching data) * rebased for automorphism keygen revert * Refactored class SchemeSwitchingDataSerializer * cleaned some comments * reverted some old memory changes --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Allow only 2-elem ciphertexts for EvalRotation() (#628) * Allow only 2-elem ciphertexts for EvalRotation() * Addressed comments --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Added <cmath> and std:: to some C++ standard lib function calls (#637) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Some code improvements for scheme switching (#638) * Added a class to hold all parameters for scheme switching setup functions * Added operator<<() and fixed some bugs in unittests * Moved some functions to the private section and optimized some operations with vectors * Fixed an error in scheme-switching-timing.cpp --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Powerpc s390 support (#641) * Powerpc support. (cherry picked from commit 7c40ab3) * Added support to IBM/S390(x) to intnat::MultD (cherry picked from commit 7a7df9e) * Fix the big-endian issue with memcpy in S390/x (cherry picked from commit 7568887) * intnat/ubintnat.h cleanup * eliminate mempy usage * fix for NTL::ConvertToInt<uint128_t>() --------- Co-authored-by: Yuri Victorovich <yuri@FreeBSD.org> Co-authored-by: Marcone Almeida <marcone.almeida@gmail.com> * Moved EvalSum and Automorphism keys to the same map (#639) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Removed ./pke/examples/memory_test.cpp as obsolete (#654) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Fixed a type: replaced __GNUG__ with __GNUC__ (#655) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * 652 fix unittest errors on mingw (#653) * Fixed unittest errors related to the static key maps in CryptoContextImpl on MinGW * Fixed a compiler error * Fixed a compiler error (2) --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Fix for slowdown at a large number of threads (#646) * partial fix for slowdown at a large number of threads * fix for slowdown at a large number of threads; fix for lazy reduction issues in DCRTPoly * fix for 128 bit compilation issue * Use of std::vector::reserve() (#665) * additional use of std::vector::reserve() * fix for clang compilation * additional use of std::vector::reserve() * std::is_integral has compiler/platform-dependent behavior for __int128_t (#671) * fix for -std=c++17; additional checks for int128_t/uit128_t * BE2 ConvertToInt() * Update lwe-pke.cpp (#663) * Update lwe-pke.h Correct the parameters in the comments of the function (cherry picked from commit a41d32b) * Update lwe-pke.cpp The variance of dgg here is the default value of 1.0, but the variance of the lwe private key should be the same as the variance of member m_dgg in lwe-cryptoparameters. (cherry picked from commit 5a0b09e) * Cleaup lwe-pke.cpp * use dgg from CryptoParams --------- Co-authored-by: Wangkaixing <50945983+Wangkaixing@users.noreply.github.com> * 629 correct the use of compress in the scheme switching code (#672) * corrected Compress for FLEXIBLE modes + corrected final scaling factor for all modes * fully corrected scaling factors in scheme switch * moved the specification of the correct scaling factor internally * some cleanup * Fixed unittest failures when the library is linked with clang++ in th… (#659) * Fixed unittest failures when the library is linked with clang++ in the Debug mode and a number of sanitize flags (reported by Google) * Additional unittest fixes * Correction to a unittest * Changes according to the feedback from the review --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * 668 refactor openfhe exception class (#679) * Added a new class OpenFHEException, changed OPENFHE_THROW and updated all files that use OPENFHE_THROW * Overloaded OPENFHE_THROW to ensure compatibility with previous versions --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Moved function's implementation from header to source file (#685) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * fix for compilation on MacOS (#687) * fixed a compilation error affecting python wrapper (#689) Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> * Removed #include <malloc.h> (#693) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * updates the version to v1.1.3 * fixed github vulnerabilities * added the readthedocs.yaml file (#696) Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> --------- Co-authored-by: dsuponitskiy <dmitriy.suponitskiy@gmail.com> Co-authored-by: Andreea Alexandru <aalexandru@dualitytech.com> Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> Co-authored-by: andreea-alexandru <31080521+andreea-alexandru@users.noreply.github.com> Co-authored-by: pascoec <123595534+pascoec@users.noreply.github.com> Co-authored-by: Yuri Victorovich <yuri@FreeBSD.org> Co-authored-by: Marcone Almeida <marcone.almeida@gmail.com> Co-authored-by: Wangkaixing <50945983+Wangkaixing@users.noreply.github.com>
gong-cr
pushed a commit
to gong-cr/openfhe-development
that referenced
this pull request
Mar 6, 2024
* Powerpc support. (cherry picked from commit 7c40ab3) * Added support to IBM/S390(x) to intnat::MultD (cherry picked from commit 7a7df9e) * Fix the big-endian issue with memcpy in S390/x (cherry picked from commit 7568887) * intnat/ubintnat.h cleanup * eliminate mempy usage * fix for NTL::ConvertToInt<uint128_t>() --------- Co-authored-by: Yuri Victorovich <yuri@FreeBSD.org> Co-authored-by: Marcone Almeida <marcone.almeida@gmail.com>
gong-cr
pushed a commit
to gong-cr/openfhe-development
that referenced
this pull request
Mar 6, 2024
* 569 fix fast rotations in leveled bfv (openfheorg#625) * fix for fast rotation bfv leveled * use the already computed digits to drop levels in EvalFastRotation * Basic tests for BFV EvalFastRotation * updated tests * cleanup and clarification * added more tests + comment --------- Co-authored-by: Andreea Alexandru <aalexandru@dualitytech.com> Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * fixed FLEXIBLEAUTOEXT for large ring dimensions (openfheorg#627) * fixed FLEXIBLEAUTOEXT for large ring dimensions * fixed the new bug introduced by the prior fix --------- Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> * Fixed GetBootstrapDepth (openfheorg#626) * updated GetBootstrapDepth * Update simple-ckks-bootstrapping.cpp --------- Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> * Scheme switching improvements (openfheorg#630) * pass BinFHEContext as shared ptr * pre-rebase * pass BinFHEContext as shared ptr * improved linear transform * unittests are passing + cleanup * changed API to separate setup from key gen * data struct for scheme switching parameters * reverted parameters; serialization not fully working * fixed serializing keys, issue with serializing inner cc * changed API for binfhecc access, remaining issue with (de)serialization cc and ctxt compatibility * serialization works * cleanup * prep for cc serialization * incomplete fix for cc serialization * before another rebase * get/set to fix serialization * Added a mechanism to serialize/deserialize all schemeswitching data * Reduced the number parameters passed to the constructor (serialize/deserialize schemeswitching data) * rebased for automorphism keygen revert * Refactored class SchemeSwitchingDataSerializer * cleaned some comments * reverted some old memory changes --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Allow only 2-elem ciphertexts for EvalRotation() (openfheorg#628) * Allow only 2-elem ciphertexts for EvalRotation() * Addressed comments --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Added <cmath> and std:: to some C++ standard lib function calls (openfheorg#637) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Some code improvements for scheme switching (openfheorg#638) * Added a class to hold all parameters for scheme switching setup functions * Added operator<<() and fixed some bugs in unittests * Moved some functions to the private section and optimized some operations with vectors * Fixed an error in scheme-switching-timing.cpp --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Powerpc s390 support (openfheorg#641) * Powerpc support. (cherry picked from commit 7c40ab3) * Added support to IBM/S390(x) to intnat::MultD (cherry picked from commit 7a7df9e) * Fix the big-endian issue with memcpy in S390/x (cherry picked from commit 7568887) * intnat/ubintnat.h cleanup * eliminate mempy usage * fix for NTL::ConvertToInt<uint128_t>() --------- Co-authored-by: Yuri Victorovich <yuri@FreeBSD.org> Co-authored-by: Marcone Almeida <marcone.almeida@gmail.com> * Moved EvalSum and Automorphism keys to the same map (openfheorg#639) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Removed ./pke/examples/memory_test.cpp as obsolete (openfheorg#654) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Fixed a type: replaced __GNUG__ with __GNUC__ (openfheorg#655) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * 652 fix unittest errors on mingw (openfheorg#653) * Fixed unittest errors related to the static key maps in CryptoContextImpl on MinGW * Fixed a compiler error * Fixed a compiler error (2) --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Fix for slowdown at a large number of threads (openfheorg#646) * partial fix for slowdown at a large number of threads * fix for slowdown at a large number of threads; fix for lazy reduction issues in DCRTPoly * fix for 128 bit compilation issue * Use of std::vector::reserve() (openfheorg#665) * additional use of std::vector::reserve() * fix for clang compilation * additional use of std::vector::reserve() * std::is_integral has compiler/platform-dependent behavior for __int128_t (openfheorg#671) * fix for -std=c++17; additional checks for int128_t/uit128_t * BE2 ConvertToInt() * Update lwe-pke.cpp (openfheorg#663) * Update lwe-pke.h Correct the parameters in the comments of the function (cherry picked from commit a41d32b) * Update lwe-pke.cpp The variance of dgg here is the default value of 1.0, but the variance of the lwe private key should be the same as the variance of member m_dgg in lwe-cryptoparameters. (cherry picked from commit 5a0b09e) * Cleaup lwe-pke.cpp * use dgg from CryptoParams --------- Co-authored-by: Wangkaixing <50945983+Wangkaixing@users.noreply.github.com> * 629 correct the use of compress in the scheme switching code (openfheorg#672) * corrected Compress for FLEXIBLE modes + corrected final scaling factor for all modes * fully corrected scaling factors in scheme switch * moved the specification of the correct scaling factor internally * some cleanup * Fixed unittest failures when the library is linked with clang++ in th… (openfheorg#659) * Fixed unittest failures when the library is linked with clang++ in the Debug mode and a number of sanitize flags (reported by Google) * Additional unittest fixes * Correction to a unittest * Changes according to the feedback from the review --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * 668 refactor openfhe exception class (openfheorg#679) * Added a new class OpenFHEException, changed OPENFHE_THROW and updated all files that use OPENFHE_THROW * Overloaded OPENFHE_THROW to ensure compatibility with previous versions --------- Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * Moved function's implementation from header to source file (openfheorg#685) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * fix for compilation on MacOS (openfheorg#687) * fixed a compilation error affecting python wrapper (openfheorg#689) Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> * Removed #include <malloc.h> (openfheorg#693) Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> * updates the version to v1.1.3 * fixed github vulnerabilities * added the readthedocs.yaml file (openfheorg#696) Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> --------- Co-authored-by: dsuponitskiy <dmitriy.suponitskiy@gmail.com> Co-authored-by: Andreea Alexandru <aalexandru@dualitytech.com> Co-authored-by: Dmitriy Suponitskiy <dsuponitskiy@dualitytech.com> Co-authored-by: Yuriy Polyakov <ypolyakod@dualitytech.com> Co-authored-by: andreea-alexandru <31080521+andreea-alexandru@users.noreply.github.com> Co-authored-by: pascoec <123595534+pascoec@users.noreply.github.com> Co-authored-by: Yuri Victorovich <yuri@FreeBSD.org> Co-authored-by: Marcone Almeida <marcone.almeida@gmail.com> Co-authored-by: Wangkaixing <50945983+Wangkaixing@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cherry picked commits from #624 and #579 with some cleanup