-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat(gpu): speed up packing KS for levels==1 #1875
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hei @andrei-stoian-zama! It looks good to me overall, but I think it would be good that @pdroalves take a look since he was the one to implement the packing keyswitch on GPU.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heyy @andrei-stoian-zama , thanks for this! You followed very closely our conventions and the code is clean and easy to read. Very impressive.
I added a few comments and suggestions to improve it, but nothing serious. Check to see wdyt. As long as Hyperstack allow us to see the CI green we can merge it.
About benchmarks, have you measured the impact for compression?
backends/tfhe-cuda-backend/cuda/src/crypto/fast_packing_keyswitch.cuh
Outdated
Show resolved
Hide resolved
backends/tfhe-cuda-backend/cuda/src/crypto/fast_packing_keyswitch.cuh
Outdated
Show resolved
Hide resolved
backends/tfhe-cuda-backend/cuda/src/crypto/fast_packing_keyswitch.cuh
Outdated
Show resolved
Hide resolved
backends/tfhe-cuda-backend/cuda/src/crypto/fast_packing_keyswitch.cuh
Outdated
Show resolved
Hide resolved
backends/tfhe-cuda-backend/cuda/src/crypto/fast_packing_keyswitch.cuh
Outdated
Show resolved
Hide resolved
backends/tfhe-cuda-backend/cuda/src/crypto/fast_packing_keyswitch.cuh
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. It would be good to run the tests, though. I will try to rerun then before merge.
Thank you very much @andrei-stoian-zama !
a2ec028
to
5c122bb
Compare
5c122bb
to
99a4fe3
Compare
Optimize packing ks for level count == 1
Achieves ~4x speedup for packing keyswitch