-
Notifications
You must be signed in to change notification settings - Fork 6
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
C++ Wrapper #37
base: main
Are you sure you want to change the base?
C++ Wrapper #37
Conversation
Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @nindanaoto on file. In order for us to review and merge your code, please sign:
If you already signed one of this document, just wait to be added to the bot config. |
hello @nindanaoto thanks a lot for this PR, as I understand it, this is a C++ wrapper for concrete-fft for use in C++, could you share why you wrote the wrapper, and talk a bit about the desing of the wrapper ? cheers |
Thank you for your reply. I created this C++ wrapper because it was difficult to determine whether this library is the fastest FFT library for TFHE, especially in comparison to SPQLIOS, without actually integrating it into TFHEpp. Additionally, this library appears to support 128-bit FFT, which could be valuable for integrating into TFHEpp to support larger security parameters. Given that OpenFHE and SEAL are also C++ libraries, I believe some users might want to use concrete-fft for their own C++ FHE libraries (or any other lattice related programs?) as well. The wrapper is designed to allow this library to work as a drop-in replacement for SPQLIOS (as you may know, it is the orginal TFHE library's assembly FFT library). While the original SPQLIOS library does not include CMake compatibility, I have added it and using it over several years, so I also added that. If you need further information, let me know. |
I’m curious about performance numbers you measured with this wrapper. |
Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @nindanaoto on file. In order for us to review and merge your code, please sign:
If you already signed one of this document, just wait to be added to the bot config. |
Here is the result on Ryzen 7950X3D running HomNAND with different FFTs.
You can reproduce this with docker. I couldn't find a way to use AVX-512 with concrete-fft, so only AVX2 is used for SPQLIOS and concrete-fft. If you have configured your machine to allow executing docker without |
You can use avx512 with the nightly feature and a nightly rust toolchain |
Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @nindanaoto on file. In order for us to review and merge your code, please sign:
If you already signed one of this document, just wait to be added to the bot config. |
I updated the repository to support AVX512 but seem to be not getting any performance improvement. I guess that this is coming from how AVX512 is implemented in ZEN4.
|
thanks I'm not sure we will take the C++ wrapper as we would have to maintain it and we don't have C++ needs around that FFT, it's cool to see you were able to use though ! |
I have implemented a C++ wrapper for my TFHE library, TFHEpp, using the
cxx
crate. This wrapper is based on the SPQLIOS API and supports CMake. While I recognize that adding a C++ wrapper might currently be outside the scope of this library, my intention with this PR is to provide a clear example, that can be easily reachable by just searching this repository, for users who wish to create their own C++ wrappers for TFHE libraries.I understand that this PR might not be merged (even if the C++ wrapper has a higher value than I expected, I guess that the official API should be more plain), but if the maintainers see value in officially implementing a C++ wrapper into the library by seeing this PR, I'm happy with that.