Comments (5)
Hello @Janmajayamall. Unfortunately I no longer have the machines to run HEXL at full (Using AVX512). I can tell you modular reduction works different depending on BitShift variable.
Look at functions on fma_mod that depends on BitShift here: https://github.com/intel/hexl/blob/development/hexl/eltwise/eltwise-fma-mod-avx512.cpp
BitShift definition happens here https://github.com/intel/hexl/blob/development/hexl/eltwise/eltwise-fma-mod.cpp
Would you have the same behavior using logq = 48 or 46? just curious.
Regards,
José Rojas
from hexl.
Hi @Janmajayamall,
You mentioned that you are trying to use the Intel Advanced Vector Extensions 512 Integer Fused Multiply Add (AVX512-IFMA52) instructions. These were introduced in the 3rd Gen Intel® Xeon® Scalable Processors (and onwards), so checking which CPU manufacturer and type you are using will be important.
The AVX512-IFMA52 should only be used for primes below 50–52 bits, assuming it suffices for your computation.
For more information on how HEXL uses the AVX512-IFMA52, please refer to:
https://www.intel.com/content/www/us/en/developer/articles/technical/introducing-intel-hexl.html
and
https://arxiv.org/pdf/2103.16400.pdf
Regards,
Flavio
from hexl.
@Janmajayamall
A description of the AVX512-IFMA52 intrinsics can be found here: https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&cats=Arithmetic
from hexl.
Would you have the same behavior using logq = 48 or 46? just curious.
modulus/elwise_fma_mod_2d/n=32768/logq=48/mod_size=1
time: [9.2788 µs 9.3188 µs 9.3523 µs]
modulus/elwise_fma_mod_2d/n=32768/logq=48/mod_size=3
time: [28.762 µs 28.882 µs 28.987 µs]
modulus/elwise_fma_mod_2d/n=32768/logq=48/mod_size=5
time: [76.355 µs 76.662 µs 76.946 µs]
modulus/elwise_fma_mod_2d/n=32768/logq=48/mod_size=15
time: [273.11 µs 276.14 µs 279.43 µs]
Yeah it behaves same for logq=48 and can confirm same for logq=46.
I don't suspect that this is due to calling code from rust (but will still compare by implementing same in C++).
If I understand correctly the line here sets Bitshift value to 52 and uses IFMA, right?
You mentioned that you are trying to use the Intel Advanced Vector Extensions 512 Integer Fused Multiply Add (AVX512-IFMA52) instructions. These were introduced in the 3rd Gen Intel® Xeon® Scalable Processors (and onwards), so checking which CPU manufacturer and type you are using will be important.
I am using C3 machine on GCP (4th Gen Intel Xeon Scalable processor) that supports AVX512-IFMA. I don't think there are additional configs I need to enable for hexl, or am I missing something?
I am curious whether you have some ideas around what can cause this?
Thanks!
from hexl.
The 4th Gen Intel Xeon Scalable processor does support AVX512-IFMA instructions. But, just in case, assuming you are using Linux, can you check with the command "lscpu".
As far as how to make use of HEXL in an FHE library, I would suggest you study the integration of HEXL with MS SEAL and/or with OpenFHE.
from hexl.
Related Issues (15)
- Wrong cmake condition in the main CMakeLists.txt HOT 1
- tried to build the docker file getting this error HOT 1
- EltwiseReduceMod fails on EltwiseReduceModAVX512 operation with a modulus that is between 51 and 52 bits. HOT 5
- Continue to have master branch HOT 3
- EltwiseFMAMod fails on EltwiseFMAModAVX512 operation with a modulus that is between 51 and 52 bits. HOT 5
- build fails on Mac (M1) HOT 5
- Issue in HEXL_CHECK_BOUNDS debug check in avx512 reduction when output_mod_factor is 2. HOT 1
- I guess i'm the first... LD
- How does hexl performs against NFLLib? HOT 13
- Add a port file to vcpkg? HOT 8
- HEXL slowing down some operations in Microsoft SEAL benchmarks HOT 4
- EltwiseReduceMod Fails with Larger Moduli on 1.2.2 With DQ Processor
- hexl failed microsoft seal HOT 2
- CKKS multiply experimental feature doesn't work correctly when integrated with SEAL HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexl.